Game Instructions

Tap a tile to toggle its color. When a tile changes nearby tiles may change as well. Each move affect multiple tiles. The target is to turn all tiles into yellow in the fewest steps possible.

Press 'j' to show/hide the game. Press 'i' to show/hide the instructions. Press 't' to show/hide the top score table.

Steps: 0

Top Scores

Name Steps
Press J to toggle the game, I to toggle instructions, and T to toggle the top scores

Congratulations!

You solved the puzzle in 0 steps!

Success!

Score submitted successfully!

Error

Failed to submit score. Please try again.

JSON2HTML Jump Start PRO

The JSON2HTML JavaScript open source library provides us with a powerful templating system we can use to convert JSON objects into HTML.

The following code sample shows how simple it is to use this library for the purpose of converting data we hold in JSON objects into HTML.

<!DOCTYPE html>
<html>
<head>
    <title>json2html demo</title>
    <script type="text/javascript"
            src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
    </script>
    <script type="text/javascript" src="json2html.js"></script>
    <script type="text/javascript" src="jquery.json2html.js"></script>
</head>
<body>
<script type="text/javascript">
    var template = {'tag':'li','html':'${abbreviation} - ${explanation}'};

    var data = [
        {'abbreviation':'IMHO','explanation':'In My Humble Opinion'},
        {'abbreviation':'FYI','explanation':'For Your Information'},
        {'abbreviation':'CYE','explanation':'Check Your Email'},
        {'abbreviation':'GIY','explanation':'Google It Yourself'},
        {'abbreviation':'4YEO','explanation':'For Your Eyes Only'}
    ];

    var str = json2html.transform(data,template);

    document.write(str);
</script>
</body>
</html>

The followinb video clip overviews this code sample, shows its execution and explains each and every part of it.

You can find the entire code sample ready for download in my JSON2HTML course at http://abelski.lifemichael.com.

Share:

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences