Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old May 24th, 2004, 11:14 AM
magicmonkey magicmonkey is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 magicmonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
[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...

Reply With Quote
  #2  
Old May 24th, 2004, 11:32 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[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.

Reply With Quote
  #3  
Old May 26th, 2004, 07:19 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[appleeaters]RE: Apples not getting eaten?

Also shouldn't line 202:
php Code:
Original - php Code
  1. $this->i_deadrobots["$robot[0];$robot[1]"] = $robot_count;

be
php Code:
Original - php Code
  1. $this->i_deadrobots["$robot[0];$robot[1]"] += $robot_count;


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.

Reply With Quote
  #4  
Old May 26th, 2004, 08:01 PM
fidian fidian is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 45 fidian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[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]

Reply With Quote
  #5  
Old May 26th, 2004, 08:04 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[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

Reply With Quote
  #6  
Old May 26th, 2004, 08:10 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[appleeaters]RE: Apples not getting eaten?

Tyler, I'm getting a 404 error at that address...

Chris B

Reply With Quote
  #7  
Old May 27th, 2004, 04:57 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[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.

Reply With Quote
  #8  
Old May 27th, 2004, 02:37 PM
fidian fidian is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 45 fidian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[appleeaters]RE: Apples not getting eaten?

Fixed the URL in my message.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [appleeaters]Apples not getting eaten?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway