Light's Out is a classic puzzle game where the objective is to turn off all the lights on a grid. The game starts with a grid of lights that can be either on or off. All the grid are randomly generated but always solvable.
The grid consists of m * n cells, each of which can be either on (indigo) or off (white). Clicking a cell toggles its state and also toggles the state of its adjacent cells (up, down, left, right). The challenge lies in finding the right sequence of clicks to turn off all the lights.
The game is won when all the cells in the grid are turned off.
-
Clone the project:
git clone https://github.com/ryan-hmd/lights-out.git cd lights-out -
Install the dependencies and build the project:
npm install npm run build
-
Open the game in your browser:
open index.html
You can also play the game on CodePen, but keep in mind that this version may not be up to date compared to the repository.
Enjoy solving these grid !