aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzedarider <ymherklotz@gmail.com>2016-02-24 01:21:51 +0000
committerzedarider <ymherklotz@gmail.com>2016-02-24 01:21:51 +0000
commita7ad35b0eee5cbc851d3438bf2d488ded2ca87bf (patch)
tree30ecf93434687cc4249fd67a0ac5071b4d59226c
parentd3cad948f71e079339b5910e0a0075c346a2e6cd (diff)
downloadimperial_2015-a7ad35b0eee5cbc851d3438bf2d488ded2ca87bf.tar.gz
imperial_2015-a7ad35b0eee5cbc851d3438bf2d488ded2ca87bf.zip
finaly finish
-rw-r--r--2048 Game/Game.cpp20
-rw-r--r--2048 Game/configFile.txt7
2 files changed, 0 insertions, 27 deletions
diff --git a/2048 Game/Game.cpp b/2048 Game/Game.cpp
index 7fac05a..f2ddf44 100644
--- a/2048 Game/Game.cpp
+++ b/2048 Game/Game.cpp
@@ -6,10 +6,7 @@
#include <string>
#include <sstream>
#include <cstdlib>
-<<<<<<< HEAD
#include <ctime>
-=======
->>>>>>> 0a5ef9619d59eeb0769e1195298ba2f5a37fc6b5
/*
* defines names for the constants we want to use
@@ -38,11 +35,7 @@ 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
@@ -90,13 +83,7 @@ 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) {
@@ -107,10 +94,7 @@ 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
@@ -281,8 +265,4 @@ 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/configFile.txt b/2048 Game/configFile.txt
index daa81a6..485ce3e 100644
--- a/2048 Game/configFile.txt
+++ b/2048 Game/configFile.txt
@@ -1,11 +1,4 @@
-<<<<<<< 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