You will need to have node and npm installed on your computer for this.
You can find instructions for downloading them here.
-
Clone down this project onto your local machine.
-
Navigate to
/backend(one level down from root.) -
Run
npm installto install all dependencies, and thennode server.js -
Navigate back up to root, and then down to
/frontend(it should be next tobackend.) -
Again, run
npm install. Then runnpm run start. -
This should open a page in your browser at
localhost:3000and you can start playing.
The frontend is a create-react-app. The backend is a basic node server, using the ws library.
- Build deck creation
- Build visible cards
- Choose shuffling algo for deck
- Switch in SVGs instead of emojis for card suits
- set up the WebSocket
- get card to each player as they join a game
- keep track of all players in a game
- allow players to move cards (by dealing) and emit changes to all players
- store player names to keep track of whose cards are whose
- build basic skeleton for tracking progress of the game (which step are you at)
(Rooms)
- Create a room for each game, with a unique string identifier
- Allow users to log into a "room" using the correct string identifier
- Add in this step in the game steps
- Limit room size to 2, with appropriate messaging to explain this to the user
- Show list of rooms that opt-in to be joined by random people
(Card interfaces)
- Keep track of which cards are highlighted (when flipped face-up) so you can see your opponent highlight cards for sets?
- Make image for the deck and add it
- Move "deal" logic onto the deck
- Disable deal except for when appropriate
- Create the display (or displays) for "played" cards
- Create the display for the card on top of the deck
- Create the crib
- Add a graphic for the backs of the cards
(Cribbage board)
- Create an appropriate image for the cribbage board itself (preferring the snake layout?)
- Create an image for the pegs of the cribbage board
- Write logic for displaying the score on the cribbage board
(Scoring)
- Make a list of the different types of scoring combos. It might be type and number for each.
- Make an interface for the user to declare a scoring combo, both for pegging and for final count-up
- Decide on how to display each scoring combo as they're enacted
(End game logic)
- wrap it up as appropriate!
- clean up the room.
(Chat feature...?)
- add in a very basic chat feature.
- This should be surprisingly lightweight, and would help with scoring. It could have presets for scoring?
