From d530affc693ac946feeb980da8a6bc3801be860b Mon Sep 17 00:00:00 2001 From: jason riggs Date: Wed, 13 Mar 2019 03:47:38 +0000 Subject: [PATCH] change --- mainOthello.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/mainOthello.cpp b/mainOthello.cpp index 5626ac4..e5242d5 100644 --- a/mainOthello.cpp +++ b/mainOthello.cpp @@ -8,8 +8,37 @@ int main() { // Seeding random number genrator cout << "Please enter a random seed: "; cin >> seed; - srand(seed); + srand(seed); + bool winner = false; + int turn = 1; + + // ask for difficulty level + + + + + + // start the game + displayBoard board; + board.start(); + + // loop until finish + do { + board.printBoard(); + cout << "Enter the (X,Y) coordinates of where you would like to place a chip: " ; + int x,y; + + cin >> x >> y; + + if (turn == 1) { + board.playerMove1(x,y); + turn++; + } else if (turn == 2) { + board.playerMove2(x,y); + turn--; + } + } while (winner == false); return 0; -- GitLab