Giter Site home page Giter Site logo

lightsout's Introduction

LightsOut

Rules and Explanation:

The game initially consists of a 5 by 5 grid of lights. When the game starts, a random number of these lights is switched on. Pressing any of the lights will toggle it and the adjacent lights. The goal of the puzzle is to switch all the lights off, preferably in as few button presses as possible.

The Textbox display the counts of user click so far.

Users can press Undo button to go back to the previous state (This will also decrease the move count).

Users can press Reset button to reset the whole display of the game.

Users can press Difficulty button to choose a different board size (Currently only board size of 3-7 is supported).

Possible Improvements:

  1. Automatically resize the form and rearrange the buttons appropriately, according to the board size of lights. (completed)

  2. Add a score board. Save different users’ score in a file. Display the highest score at the end of each game.

  3. Find solutions for each lights pattern and compute the minimum move required. Offer hints when user get stuck.

lightsout's People

Contributors

csy99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.