|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|
#2
|
|||
|
|||
|
RE: capture the flag, script recursive?
The script will be run each turn, so it has to exit befere the next turn starts.
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
RE: capture the flag, script recursive?
Thanks, just wanted to make sure this was the common consensus.
|
|
#5
|
||||
|
||||
|
RE: RE: capture the flag, script recursive?
Quote:
You need to read input.txt as well... |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > capture the flag, script recursive? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|