Search

Thursday, August 16, 2012

Day 8: Main loop



Until now, the engine played, the "outside" played and that's all. Now, I want some "flow". For now I will make a loop so the game will go until I type "Pass" or "Resign". I think that adding some things to the translator it will work better. I will put some conditions to coordinateToPosition method. If from the outside there is a pass it will return a -1 and if it receives a Resign it will return a -2.
Then if the number is a -2 for now it will end the program, -1 only will change the turn.

At first I thought this would be a really easy task for a day where I didn't want to code a lot. But... this project is evil...

I just had to change code everywhere!!!!!!! From Human class to translator. But, well, it is working now.

I will publish code on future posts, when I change more things (just lazy to put code for every change).


No comments:

Post a Comment