-
Notifications
You must be signed in to change notification settings - Fork 0
/
chainReaction.cpp
34 lines (29 loc) · 1.01 KB
/
chainReaction.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
This is a Chain Reaction game.
https://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal
Developer : Amruthjith Sunil
Begin Date : 10/10/2018
*/
#include<iostream>
const int size = 6;
int Box[size][size] = {}; //Play Field
int playerCount; //Number of players
int round = 1; //To count rounds
int winnerID = -1;
#include "./allFunctions.cpp"
using namespace std;
int main(int argc, char const *argv[]) {
std::cout << "\t" ;
cout << "\033[1;31mCHAIN REACTION\033[0m\n";
cout << "Enter the Number of players : ";
std::cin >> playerCount;
containerDisplay(); //Displays the container
while (1) {
play(); //each player gets a turn to play.
if(winnerID > -1){
break;
}
}
cout << "\nPlayer " << winnerID << " wins\n";
return 0;
}