Candy Crush Tutorial by Ania Kubów
I wanted to code something fun and candy crush seemed like a good choice.
Initial status of the game is live. Additional features will be added and the code improved upon when I have time.
Local install
- Clone the repo
cd/candy-crush
open index.html
In the Browser
- Only switch candy if there if a match
- Score for 5 row and 5 column matches
- Timed game
- Leaderboard
- Confirm all squares are accounted for in for loops (off by one)
- Break functions into smaller parts (single responsibility)
- Abstract creation of squares or setting of attributes
randomColor
assigning as it's own function- Valid moves / check for a valid move
- Check for match (row/col and 5/4/3)
- Drag events
- Style improvements
- Candy color/images via classes instead of inline styles
- Improved algorithmn for checking matches (does each square need to be checked)
- Animiations
- Check for matches or blank squares with each dom change instead of set interval?
- Squares as objects w/properties
- Top row does not refil if a match is made in the first row and the dragged item came from a different row
- Column match of 4 does not work
drag
events do no work on Android and mobile devices.