Skip to content

matt-de-young/minesweeper

Repository files navigation

Minesweeper

This is the result of a 1 hour coding challenge to create the classic game Minesweeper using React, TypeScript, and Vite.

Description

Minesweeper is a single-player puzzle game where the objective is to clear a rectangular board containing hidden "mines" without detonating any of them. You win by revealing all safe squares while avoiding the mines.

Setup

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Run the development server:
npm run dev

How to Play

  • Left click to reveal a square
  • Right click to flag a potential mine
  • Numbers indicate how many mines are adjacent to that square
  • Avoid clicking on mines!

Features

  • Classic Minesweeper gameplay
  • Configurable board size and mine count
  • First-click protection
  • Timer and mine counter
  • Victory and defeat conditions

Technologies Used

  • React 18
  • TypeScript
  • Vite
  • ESLint for code quality

Development

To build for production:

npm run build

To preview the production build:

npm run preview

About

This is the result of a 1 hour coding challenge to create the classic game Minesweeper using React, TypeScript, and Vite.

Resources

License

Stars

Watchers

Forks

Contributors