Re: Botmatch

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

C & K L wrote:
>Your bot will have to track where it's been...
>the screen can't be drawn to, because if another
>bot encounters your drawn tracks, it could get confused.
what about this?:
constant
   BRIGHT = 8,
   North  = 1,
   South  = 2,
   East   = 3,
   West   = 4
function lookdirection(integer dir,sequence pos)
--pseudocode folks...
integer peekpxl
   case dir of
   North: peekpxl=read_pixel(pos+{ 0,-1},1)
   South: peekpxl=read_pixel(pos+{ 0,+1},1)
   East : peekpxl=read_pixel(pos+{ 1, 0},1)
   West : peekpxl=read_pixel(pos+{-1, 0},1)
   else Error("sumfin wrong")
   end case
   if peekpxl > BRIGHT then
        return peekpxl - BRIGHT
   else return peekpxl
   end if
end function

now, when you set a marker to where you have been,
just set it to the color that is on the floor where
you are standing + BRIGHT, and your bot will
ignore it when you call lookdirection()
does that solve the prob??? :)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu