Re: Contest 2 Update:

new topic     » goto parent     » topic index » view thread      » older message » newer message

Patrick Barnes wrote:
> 
> On Tue, 30 Nov 2004 12:20:40 -0800, cklester <guest at rapideuphoria.com>
> wrote:
> > Remember to check the bounds before the next statement! :)
> <snip>
> 
> Oops... of course.
> Sorry, that was just a quick example written in the email.

I know. That was a reminder for newbies. :)

> > Maybe you could make it a function?
> > 
> >     temp = arena( x, y )
> > 
> > and have the bounds checking done by the engine/eubots code.
> > 
> > Or not.
> 
> Well all bounds checking is, is:
> if x > 0 and x <= metrics[WIDTH] and y > 0 and y <= metrics[HEIGHT] then
>      *is valid point*
> end if

Yeah, I have code for that already. I was just wondering if you could
develop/extend the EuBots API, although since each bot is a separate
running program, there really shouldn't be shared code. I remember back
long ago when the bots were going to be include files, not actual running
programs (in contests of yore). Just a different paradigm, that's all. :)

I also tend to think about it in an object-oriented paradigm.

s = arena.size()
e = arena.adjacentEnemies(Self) <-- a function of the arena
e = Self.scanForEnemies() <-- a function of the bot

Is it up to the arena to provide location details? The game engine (which
is not just the arena)? The bots? I tend to want to avoid duplication of
data, and what I'm doing now is storing the arena in a variable when I
could just be asking the engine for that data.

No biggie either way. Just some thoughts.

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu