Skip to content
Snippets Groups Projects
Commit 434c94c4 authored by Bariatti Francesco's avatar Bariatti Francesco
Browse files

Fixed error in game class: current player always switched

parent 7fd4f5c6
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ namespace game ...@@ -64,7 +64,7 @@ namespace game
std::string move; std::string move;
std::cin >> move; std::cin >> move;
g.play(m[move]); g.play(m[move]);
player = 1 - player; player = g.current_player();
} }
std::cout << g.to_string() << std::endl; std::cout << g.to_string() << std::endl;
if (g.won(0)) std::cout << g.player_to_string(0) << " won"; if (g.won(0)) std::cout << g.player_to_string(0) << " won";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment