The solution of React project "Minesweeper game" at JetBrains Academy (Hyperskill.org). At the time of completion that project was in the beta stage, and currently this project could be modified or removed.
The solution covers/reflects only the main concepts/basics of React. Also, contains tests which was not the part of the project task.
As this is my very first React project, it is definitely not the best idea to copy/paste my smell/dirty code. It's just note to self in case I want to remember something in the future, how it was in the old days.
nodejs
and npm
must be installed. For Mac users:
brew install node
Go to desired folder in the command line, for example "Minesweeper":
cd Minesweeper
Create React project "minesweeper"
npm init react-app minesweeper
or
npx create-react-app minesweeper
Notes:
- This will create "minesweeper" folder inside "Minesweeper" folder.
- If prompted to install
create-react-app
package — just agree with that.
Place files from this repository to /Minesweeper/minesweeper
and run project from "minesweeper" folder:
cd minesweeper
npm start
That's all. You can play the game in your browser: http://localhost:3000
Open any cell by clicking it, or flag it with a right-click. Click emoji to reset game.