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:
  #1  
Old August 6th, 2002, 11:48 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
capture the flag, script recursive?

The rules mention a data.txt file that will contain information your script wants to store. If my script never exits can't I just store information in memory? Are other people writing scripts that exit after each turn, or can I fashion a while() loop that will exit after I've won the game? (I realize the previous statement is presumpsous; it’s my competitive nature shining through Should my script exit after each turn, or can I just monitor the turn's output file for updates, and then act accordingly? Does it matter? What’s the ideal way for judging?

Reply With Quote
  #2  
Old August 6th, 2002, 11:52 PM
ygreg ygreg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Warsaw, Poland
Posts: 21 ygreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: capture the flag, script recursive?

The script will be run each turn, so it has to exit befere the next turn starts.

Reply With Quote
  #3  
Old August 6th, 2002, 11:53 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
RE: capture the flag, script recursive?

My understanding is that your script _has_ to exit, because the controller script will execute your script once for each turn. Thus, when you need to store your data in data.txt in order to keep your program state.

1) Read Data.txt
2) Evaluate Move
3) Write Move to File
4) Write new state data
5) Exit

Reply With Quote
  #4  
Old August 6th, 2002, 11:56 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
RE: capture the flag, script recursive?

Thanks, just wanted to make sure this was the common consensus.

Reply With Quote
  #5  
Old August 7th, 2002, 05:44 AM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
RE: RE: capture the flag, script recursive?


Quote:
1) Read Data.txt
2) Evaluate Move
3) Write Move to File
4) Write new state data
5) Exit


You need to read input.txt as well...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > capture the flag, script recursive?


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 6 hosted by Hostway