Skip to content

This is a small game which has been set up to replicate the challenge presented by the Clock Puzzles in the video game Final Fantasy XIII-2. These puzzles use a Hamiltonian Path - that is, a "path that visits each vertex exactly once".

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

HamiltonianPaths

This is a small game of sorts which has been set up to replicate the challenge presented by the Clock Puzzles in the video game Final Fantasy XIII-2. These puzzles use a Hamiltonian Path - that is, a "path that visits each vertex exactly once". A live preview of what this does is available at http://jamesmdonnelly.com/GitHub/HamiltonianPaths.

Important: This requires jQuery to be included on your page.

Firstly include the HamiltonianPath script and accompanying stylesheet, then declare any HTML element on your page (for semantics reasons you should probably chose either a divider or figure).

<figure id="myFigure"></figure>

From this we can create our puzzle using the createPuzzle() method as shown in Test.js:

$('#myFigure').createPuzzle(size, number);
size = the number of boxes
number = double the maximum number a box can contain

So if we wanted to create a puzzle with 10 boxes and a maximum box number of 3, we'd call:

$('#myFigure').createPuzzle(10, 6);

About

This is a small game which has been set up to replicate the challenge presented by the Clock Puzzles in the video game Final Fantasy XIII-2. These puzzles use a Hamiltonian Path - that is, a "path that visits each vertex exactly once".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published