Re: Contest 2 Update:
- Posted by Patrick Barnes <mrtrick at gmail.com> Nov 30, 2004
- 578 views
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. > 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 I already have a function that does just that inside the engine code. (Judge.e) If you want to, you can copy it to your program. I've tried to keep the eubots library free of functions that the user calls, that's all. -- MrTrick