diff options
author | zedarider <ymherklotz@gmail.com> | 2016-02-24 01:18:54 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2016-02-24 01:18:54 +0000 |
commit | d3cad948f71e079339b5910e0a0075c346a2e6cd (patch) | |
tree | ab6b38c1130a59efa4fc2749ad6b8ce48791b9d6 | |
parent | 08fdf56e21bcd9fe77508e98c9f65b9847d538ac (diff) | |
parent | 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 (diff) | |
download | imperial_2015-d3cad948f71e079339b5910e0a0075c346a2e6cd.tar.gz imperial_2015-d3cad948f71e079339b5910e0a0075c346a2e6cd.zip |
final changes to game done
-rw-r--r-- | 2048 Game/Game.cpp | 20 | ||||
-rw-r--r-- | 2048 Game/Random (1) | bin | 0 -> 8704 bytes | |||
-rw-r--r-- | 2048 Game/configFile.txt | 7 |
3 files changed, 27 insertions, 0 deletions
diff --git a/2048 Game/Game.cpp b/2048 Game/Game.cpp index f2ddf44..7fac05a 100644 --- a/2048 Game/Game.cpp +++ b/2048 Game/Game.cpp @@ -6,7 +6,10 @@ #include <string> #include <sstream> #include <cstdlib> +<<<<<<< HEAD #include <ctime> +======= +>>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 /* * defines names for the constants we want to use @@ -35,7 +38,11 @@ bool checkGameOver(int(&) [GRIDSIZE][GRIDSIZE]); * as this is easier done by a seperate function */ int main(int argc, char* argv[]) { +<<<<<<< HEAD // defines the 2D and tmp array that is used to check change +======= + // defines the 2D and tmp array +>>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 int grid[GRIDSIZE][GRIDSIZE]; int before[GRIDSIZE][GRIDSIZE]; // defines tmp string file name to check if file exists @@ -83,7 +90,13 @@ int main(int argc, char* argv[]) { */ while(!checkGameOver(grid)) { // gets user input +<<<<<<< HEAD cin >> usrInput; +======= + cout << "Select move [w,a,s,d]: "; + cin >> usrInput; + cout << endl; +>>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 // copies the grid into the before grid for(int i = 0; i < GRIDSIZE; ++i) { for(int j = 0; j < GRIDSIZE; ++j) { @@ -94,7 +107,10 @@ int main(int argc, char* argv[]) { moveGrid(grid, usrInput); // check if grid has changed which means that the movement was valid if(checkGridChange(grid, before)){ +<<<<<<< HEAD cout << endl; +======= +>>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 // places the random number in the correct base defined above placeBase(grid); // prints the grid @@ -265,4 +281,8 @@ bool checkGameOver(int (&gridArray)[GRIDSIZE][GRIDSIZE]) { } // if none of the if statements is true it will end the games return true; +<<<<<<< HEAD +} +======= } +>>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 diff --git a/2048 Game/Random (1) b/2048 Game/Random (1) Binary files differnew file mode 100644 index 0000000..4907ab1 --- /dev/null +++ b/2048 Game/Random (1) diff --git a/2048 Game/configFile.txt b/2048 Game/configFile.txt index 485ce3e..daa81a6 100644 --- a/2048 Game/configFile.txt +++ b/2048 Game/configFile.txt @@ -1,4 +1,11 @@ +<<<<<<< HEAD 2 4 8 16 4 2 16 8 2 4 8 16 4 2 128 128 +======= +4 2 2 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +>>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5 |