Make client output and read in game state and order files

This commit is contained in:
mdiluzio 2015-01-03 19:27:08 +00:00
parent 18cfcff264
commit b532f1c9c8
4 changed files with 88 additions and 71 deletions

View file

@ -114,10 +114,12 @@ int runClient(int argc, char* argv[])
gamestate+=buffer;
}
std::cout<<gamestate<<std::endl;
// Output the gamestate file for this game
CTTRTSGame thisGame = GetGameFromString(gamestate);
OutputGameStateFile(thisGame, getGamesDir());
// Output orders
std::string orders = "END";
// Get the order file for this turn
std::string orders = GetOrdersFromPlayerFile(thisGame,myPlayer);
std::cout<<"Sending orders"<<std::endl;
std::cout<<orders<<std::endl;