Completed
Welcome!
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
Slide Puzzle in JavaScript
Automatically move to the next video in the Classroom when playback concludes
- 1 Welcome!
- 2 Explain! Using copy() to split the source image into tiles?
- 3 Code! The Tile class!
- 4 Explain! Copying tiles from the source image to the puzzle.
- 5 Code! Setting up tile indices and a board array!
- 6 Explain! How should the board work?
- 7 Code! Something went wrong! Let's fix it!
- 8 It works! Now how to draw borders between the tiles?
- 9 Code! Shuffling the board.
- 10 Code! The slide puzzle needs an empty tile!
- 11 Code! A function to move the tiles!
- 12 Code! Checking if tiles are neighbors?
- 13 Code! Random shuffling in draw()!
- 14 Code! Moving pieces with mousePressed()
- 15 Code! What should the sketch do when the puzzle is solved?
- 16 Code! Having fun with the tile grid!
- 17 Let's see if I can solve this...
- 18 Solved it! What will you create?