Browse Source

fixed the bug described in the first issue

master
VissaMoutafis 5 years ago
parent
commit
be153f01b9
  1. 1
      src/Controller.cpp
  2. 4
      src/Game.cpp

1
src/Controller.cpp

@ -1,6 +1,7 @@
#include "Controller.h"
#include <assert.h>
#include <string>
using namespace std;
Controller::Controller()

4
src/Game.cpp

@ -1,5 +1,6 @@
#include "Game.h"
#include <algorithm>
#include <limits.h>
using namespace std;
SnakeGame::SnakeGame()
@ -60,7 +61,8 @@ void SnakeGame::play(void){
play(playerName); //get the player to play the game
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cout << "Do you want to play again? (yes or no): ";
string ans;

Loading…
Cancel
Save