|
@ -1,5 +1,6 @@ |
|
|
#include "Game.h"
|
|
|
#include "Game.h"
|
|
|
#include <algorithm>
|
|
|
#include <algorithm>
|
|
|
|
|
|
#include <limits.h>
|
|
|
using namespace std; |
|
|
using namespace std; |
|
|
|
|
|
|
|
|
SnakeGame::SnakeGame() |
|
|
SnakeGame::SnakeGame() |
|
@ -60,7 +61,8 @@ void SnakeGame::play(void){ |
|
|
|
|
|
|
|
|
play(playerName); //get the player to play the game
|
|
|
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): "; |
|
|
cout << "Do you want to play again? (yes or no): "; |
|
|
string ans; |
|
|
string ans; |
|
|
|
|
|
|
|
|