Skip to content

javy99/Light-Bulb-Placement-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript home assignment — Light Bulb Placement

Once upon a time, King Unnamed of Nowhereland was both smiling and crying at the same time. He was smiling because his enormous brand-new palace with many spacious rooms and corridors has just been finished. He is also crying as these rooms need to be illuminated and kept warm, but the ongoing increase of utility costs affect him as well. So now it's time to think about the placement of the palace's light bulbs. We need to place them so that everything is properly lit, but we cannot install any unnecessary bulbs.

Game description:

  • The king's palace has rooms with square shaped floors that consist of black and white tiles only.
  • Light bulbs can only be placed above white tiles.
  • The light from the light bulbs does not spread diagonally, only straight along the given row and column.
  • The black tiles have objects placed on them, which block the propagation of light.
  • Black cells can optionally contain an integer from 0 to 4. This indicates how many adjacent (bottom, top, right, left) cells contain light bulbs. If there is such a number, the puzzle must be solved accordingly!
  • Two light bulbs can NEVER illuminate each other!
  • The goal of the game is to place the light bulbs so that all the white tiles are illuminated.
  • The game is played by one player until he solves the puzzle, so there is no need to manage multiple players at the same time or divide into rounds.

About

Single Page Light Bulb Placement Game using HTML, CSS, JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published