Memory Game - Typescript, React, Tailwind css

Solution retrospective
Thinking about the solution gave me tough time especially when I have to track the selected items and if they match.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Skidragon
Hi Victoria, good job at making this and I had fun playing with it. I'm also working on this project and working with Xstate and spawning player instances depending on what the user chooses. Just some ideas that I'm throwing out here: Use a custom component using radio element to create the create game form buttons for accessibility purposes. Xstate.js is simplifying the game making process for me at the moment, essentially I have a game actor and spawn player actors to talk to each other. The game actor state holds the tokens, spawn the amount of players selected, keeps track of player's turn. The player actor tells the game actor that I matched these tokens correctly by storing it in its own state. Also the game actor has different phases like initializingGame -> choosingPlayer -> playerMoves -> checkWin -> choosingPlayer or gameOver. Here is the idea thus far: https://github.com/Skidragon/monorepo-portfolio/tree/memory/apps/memory
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord