From 71317ff776230f44ecda915ed71c29f61b9a24f1 Mon Sep 17 00:00:00 2001 From: "Joseph2.Gillespie@live.uwe.ac.uk" <joseph2.gillespie@live.uwe.ac.uk> Date: Thu, 1 May 2025 13:47:41 +0000 Subject: [PATCH] Delete naughts_and_crosses_c++ --- naughts_and_crosses_c++ | 56 ----------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 naughts_and_crosses_c++ diff --git a/naughts_and_crosses_c++ b/naughts_and_crosses_c++ deleted file mode 100644 index 8ad35e2..0000000 --- a/naughts_and_crosses_c++ +++ /dev/null @@ -1,56 +0,0 @@ -#include <iostream> -#include "header.hpp" -using namespace std; - -char square[10] = {'0','1','2','3','4','5','6','7','8','9'}; - -int checkwin() { - if (square[1] == square[2] && square[2] == square[3]) { - return 1; - } - else if (square[4] == square[5] && square[5] == square[6]) { - return 1; - } - else if (square[7] == square[8] && square[8] == square[9]) { - return 1; - } - else if (square[1] == square[4] && square[4] == square[7]) { - return 1; - } - else if (square[2] == square[5] && square[5] == square[8]) { - return 1; - } - else if (square[3] == square[6] && square[6] == square[9]) { - return 1; - } - else if (square[1] == square[5] && square[5] == square[9]) { - return 1; - } - else if (square[3] == square[5] && square[5] == square[7]) { - return 1; - } - else if (square[1] != '1' && square[2] != '2' && square[3] != '3' - && square[4] != '4' && square[5] != '5' && square[6] != '6' - && square[7] != '7' && square[8] != '8' && square[9] != '9') { - return 0; - } - else { - return -1; - } -} - -void board() { - system("cls"); - cout << "\n\n\tNaughts and Crosses\n\n"; - cout << "Player 1 (X) - Player 2 (O)" << endl << endl; - cout << endl; - cout << " | | " << endl; - cout << " " << square[1] << " | " << square[2] << " | " << square[3] << endl; - cout << "_____|_____|_____" << endl; - cout << " | | " << endl; - cout << " " << square[4] << " | " << square[5] << " | " << square[6] << endl; - cout << "_____|_____|_____" << endl; - cout << " | | " << endl; - cout << " " << square[7] << " | " << square[8] << " | " << square[9] << endl; - cout << " | | " << endl << endl; -} \ No newline at end of file -- GitLab