Code Monkey home page Code Monkey logo

candy-crunch's Introduction

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.

candy-crunch's People

Contributors

ddr0 avatar

Watchers

James Cloos avatar Marie-Yvonne Combot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.