Skip to content

Fork of ddycai/flood-it for the CSI4105 course project. Implements astar search with a naive admissible heuristic and a non-admissible heuristic.

Notifications You must be signed in to change notification settings

devmaxxing/flood-it

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flood It

In Flood It, you are given a grid of squares of various colours. Your objective is to fill the entire grid with the same colour. To do this, you are allowed to change the colour of the top left square and all other squares connected to it every turn. Two squares are connected if they are adjacent and of the same colour. If you choose the right colours, you will eventually fill the entire grid with the same colour.

In this implementation, the computer will find a solution using a greedy algorithm, choosing the colour that will connect the most squares. This will not result in the optimal solution since this problem is NP-Hard. The player's goal is to find a better solution than the computer (or a solution that's just as good), which is possible because the computer will most likely not find the optimal solution.

The game is written in jQuery/Javascript and makes use of Twitter bootstrap to make it look nice.

Enjoy!

About

Fork of ddycai/flood-it for the CSI4105 course project. Implements astar search with a naive admissible heuristic and a non-admissible heuristic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.2%
  • HTML 20.1%
  • CSS 2.7%