Skip to content

Latest commit

 

History

History

017 - Sliding Puzzle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sliding Puzzle

Description

Play a sliding puzzle game with real image which get's mixed up on a n*n matrix. Try to solve the puzzle as fast as possible.

Done

  • create Piece class
  • each piece has: position, targetPosition, image (as a background), isEmpty piece flag
  • create Puzzle container
  • randomize pieces by moving the empty piece randomly
  • keep the aspect ration of the image in the canvas
  • allow user to move the empty piece
  • add start & end game scenarios
  • add a timer

To do

  • animate the pieces with physics

Link

You can see the version live on Codepen.

Credits