mycombot / Candy-Crunch

Candy Crunch is a match-three game, written using HTML5. It is somewhat like Candy Crush. This repo doesn't contain the external dependancies the game requires to run. You can play it at:

Home Page:https://dl.dropbox.com/u/138485812/Candy%20Crunch/Original/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README
Candy Crush

To configure your next game of Candy Crush, set the following global variables with Javascript:
iTiles: 6. Can be set to 4 or 5 for an easier game.
iMode: 'turns'. May be set to 'time' for a count-down, instead.
iMoves: 15. Number of moves the player may make if in 'turns' mode.
iTime: 180. Number of seconds the player has to complete the level if in 'time' mode.
iJelly: false. Set to true to enable the jelly underlay.

In addition, several variables may be set in the main javascript file. To find these, search for "Initial Setup" (without the quotes). To change the number of tiles horizontally, for example, you could change the tileWidth variable. The game figures out how many tiles should be in a row by dividing this number by the width of the canvas (itself set in the HTML file). To change the timeout before the hint effect occurs, try changing the timeout of the hintBounce variable.

Some facts:
① To check that the board has no normal possible moves, we have to check 888 positions. Checking for adjacent bonuses is a different operation which filters the entire board in one fell swoop.
② Switching the args to _.find(list, function) causes the currently executing javascript to silently stop executing.
③                        [
[         In IE8, the         0,
    0,    list to the         1,
    1,    left results        2,
    2,    in the list         undefined
]         to the right.   ]
This is, surprisingly, the Correct Way. Too bad no one else does it like that.

About

Candy Crunch is a match-three game, written using HTML5. It is somewhat like Candy Crush. This repo doesn't contain the external dependancies the game requires to run. You can play it at:

https://dl.dropbox.com/u/138485812/Candy%20Crunch/Original/index.html