diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 40920f6..d1d7c2d 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,38 @@ Recreate as much of the original game as is reasonable in the one week we have a ### Project Baseline - Play a couple games of [2048](http://gabrielecirulli.github.io/2048/). Think about everything that's likely happening in the code to support what's happening on the screen. Once you've got a feel for the game, talk with your pair and answer the following questions: 1. How does scoring work? + We will add the total of all new tiles at the end of the turn. This means that a board with a 2 + 2 collision will accrue points for both the 4 that is created and the new tile that spawns. The total for such a board would be 10 coming from 2 + 2, + 4, +2 as the new tile. + 1. When do tiles enter the game? + At the end of every non-losing turn. + 1. How do you know if you've won? + The background color becomes much more obnoxious, which occurs if we have a tile that is 2048 or greater. + 1. How do you know if you've lost? + There are no more available moves. Also, it's possible that the game will mock you. This feature to be added at some point. + 1. What makes tiles move? + A keypress event of the right, left, up, or down arrows. To humor old school gamers, we will also accept A, S, D, and W. + 1. What happens when they move? + - Tiles move their available spaces (which changes our data matrix to reflect the new values, as calculated by our collision math). + - The new tile is spawned + - The board is redrawn as necessary in the browser + - The score is updated + 1. How would you know how far a tile should move? + A tile slides until it hits a !null square. Collsion math will then determine if it moves one further. + 1. How would you know if tiles would collide? + If tile_value === next_square_value, tiles should collide. + 1. What happens when tiles collide? + - In our data matrix, the values of the tiles are combined in the slot furthest in the direction of movement. + - The moving tile's slot is then "zeroed out" by being reset to null. + - The representation of the board is updated + - The score is recalculated using the combined total. + - Document your answers to these questions in this README. - Use your discussion and answers to create tasks for a trello board. Organize those tasks into deliverable components (e.e., _Scoring_, _Tile Collision_, _Win/Loss_). - Open a PR with your discussion notes and answers to the above questions. Include a link to your Trello board. Indicate in the PR which deliverable(s) you are targeting first. diff --git a/assets/move-down.svg b/assets/move-down.svg new file mode 100644 index 0000000..fe707a3 --- /dev/null +++ b/assets/move-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/move-left.svg b/assets/move-left.svg new file mode 100644 index 0000000..de07eee --- /dev/null +++ b/assets/move-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/move-right.svg b/assets/move-right.svg new file mode 100644 index 0000000..b622311 --- /dev/null +++ b/assets/move-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/move-up.svg b/assets/move-up.svg new file mode 100644 index 0000000..7d5b662 --- /dev/null +++ b/assets/move-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html index 4740408..96fbd00 100644 --- a/index.html +++ b/index.html @@ -7,26 +7,28 @@
-