Created
September 30, 2015 12:05
-
-
Save DanLuchi/404d84de4f18bc5d1e4c to your computer and use it in GitHub Desktop.
Building Letterpress in React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1: Board | |
2D array 5x5 | |
value of each entry is a letter | |
Step 2: create game | |
initially randomize each letter | |
this will probably need to get more complicated later (like redo unless vowels > 3 or something) | |
game board is immutable | |
Step 3: Game State | |
another 2D array 5x5 | |
value is either "player 1, player 2 or open" | |
does it make sense to track locked up tiles here or is that a computed property? | |
Step 4: Turn | |
a turn is a request with a list of coordinates in order | |
possibly letters and their coordinates so that we don't need to look up the letters, but we would need to double check | |
it is accpeted if the word is in the letterpress dictionary: https://github.com/atebits/Words | |
We can start with a 1 player game initially | |
An accepted turn generates a new game state | |
Step 5: Victory! | |
The game is over when the game state has no open tiles | |
Step 6: Score | |
The score is the number of tiles owned by each player in the game state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment