Skip to content

ryan-hmd/lights-out

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Light's Out

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.

How to Play

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.

How to Run Locally

  1. Clone the project:

    git clone https://github.com/ryan-hmd/lights-out.git
    cd lights-out
  2. Install the dependencies and build the project:

    npm install
    npm run build
  3. 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 !

About

Light's out is a mind game in which you have to turn off all the lights in a grid.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published