|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
[appleeaters]Apples not getting eaten?
Hi,
I think there's a bug in the current robotslib.php library. Whenever I get to an apple, I get the points for it but it doesn't disappear from the board. Somewhat handily, my script just hangs around on that apple eating it again every turn I think that the following (or something like it) should be on line 190: unset($this->i_apples["{$this->player[0]};{$this->player[1]}"]); Hope this helps, and if it's a bogus bug report then my apologies... |
|
#2
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
As an aside, are we allowed to access the new variables? (ie anything other than $robots->game[]). I assume not (robotslib may change etc...) but could be worth checking.
|
|
#3
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
Also shouldn't line 202:
be I think the way it is, colliding robots on a dead robots place, reset the number of already dead robots. Another solution would be to first check for robots with dead robots collission and then robots with robots. |
|
#4
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
In case others want it, I've modified my robotslib.php to include these changes and to make it so that if you accidentally modify $game['player'], you don't actually set the player position.
You can get it at http://rumkin.com/reference/php_contest/ until the contest ends. [edit - fixed url] |
|
#5
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
I'm experiencing the same problem with the apples. They never disappear, so my script just sits on the first apple it comes to until it is forced away by the robots.
Chris B |
|
#6
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
Tyler, I'm getting a 404 error at that address...
Chris B |
|
#7
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
I am having the same problem with apples not getting eaten. Sure makes it easy to get a high score though - just keep eating the same apple over and over until a robot forces you to move on :-)
magicmonkey's suggestion fixes the problem for me. |
|
#8
|
|||
|
|||
|
[appleeaters]RE: Apples not getting eaten?
Fixed the URL in my message.
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > [appleeaters]Apples not getting eaten? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|