Back to General discussions forum
Firstly, Awesome! Great potential for new problems.
Minor feedback, would be much easier if we could use POST parameters instead of raw data in the requests.
Hey guys, long time no see.
Those interactive problems are really cool. We need more. :)
Hello, Guy! We were really missing you! Hope you are well! :)
> would be much easier if we could use POST parameters
I think I can add such a feature easily enough (at least I'll try). Are you going to post the data with html form? :)
Not really, but the bot implementation will not require a parser, if the I/O happens via parameters.
Hi, Guy! Glad to see you!
would be much easier if we could use POST parameters
It's not convenient for me, but i'll accept the rules.
I try to make some illegal moves at Nim Game.
===SEND===
token: j7mfYku0s2sVRxqZtkH65zY2
move: 0 0
===RECEIVE===
end: game is lost
error: You are trying to take too many elements from the heap
0 is too many?
===SEND===
token: yH+IxFUT5W7HzUspengInTE4
move: -1 -1
===RECEIVE===
end: game is lost
error: Move should have a form of two integers
-1 -1 are integers.
Hope we can support both formats (and perhaps some more in future).
From now on it should be possible to send either raw data as initially or url-encoded.
For latter it is important to set the Content-Type: application/x-www-form-urlencoded
.
I also created page with examples in Python
after Nicolas Patrois hinted this could be helpful in some
cases: Post Requests in Python.
> I try to make some illegal moves at Nim Game.
Ha-ha :)
It is quite good you decided to test this thoroughly! I'm especially interested to know that there is no some simple way of cheating with tokens...
I'll try to take care of these vague error messages, thanks for pointing this!
P.S.:
if ($x < 1 || $x > $this->state->heaps[$p]) {
return 'You are trying to take too many elements from the heap';
}
I agree, this is bit too stupid piece of code - I'm afraid I was too hasty... :)