Skip to content

BrianLusina/minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minesweeper

Build Status codecov CircleCI

A simple classic minesweeper game built in ReactJS.

Rules of the game:

  1. The goal of the game is to find all the mines on the board.
  2. You reveal mines by clicking the cells, if you reveal a mine you loose.
  3. If you reveal a cell without mine it will show number of mines surrounding the cell.
  4. You can flag a field by right clicking it.
  5. You win the game if you are able to reveal all the cells that is not a mine or you have flagged all the cells that is a mine.

Pre-requisites

  1. Node, npm or yarn

    Have these installed on your development machine

  2. Docker

    Used to package the application in a container and allow it to run as a microservice

  3. Kubectl

    Allows interacting with the kubernetes API from your development machine

  4. Minikube Allows creating and setting up a Kubernetes Cluster on your development machine

  5. Hadolint

    Used to lint Dockerfiles. Or, you can set this up by running:

    make setup-hadolint

    This will install hadolint to the bin directory

Setup Environment

You can setup the environment by running:

npm install
# or
yarn install
# or
make install

These will install the dependencies.

After which you can run the application with:

npm run start
# or
yarn start
# or
make start

Will start up the application on this address

Tests

Tests can be found in the tests directory and can be run with:

yarn test
# or
npm run test
# or
make test

Generating a coverage report can be done with:

npm run test:coverage
# or
yarn test:coverage
# or 
make test-cover

Deployment

First create an optimized production build with:

npm run build
# or
yarn build
# or
make build

This will have the production build in the build folder

To serve locally, you can use:

npm run serve
# or
yarn serve

You can now deploy the build to any static server (surge, netlify, etc).

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Also read CODE_OF_CONDUCT.md for details on our code of conduct.

License

This project is licensed under the MIT License - see the LICENSE file for details

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

forthebadge forthebadge forthebadge forthebadge