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.

MooTools Cookie Object PRO

MooTools provides us with Cookie, a global object that provides us with a clean and simple access to the cookies on our web browser.

The following code sample shows how simple it is to create a new cookie and how simple it is to read the value of a cookie that already exists.

<!DOCTYPE html>
<html>
<head>
    <title>cookie demo</title>
    <script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
    <script type="text/javascript">
        function saveCookie()
        {
            Cookie.write(
                    document.myform.savekey.value,
                    document.myform.savevalue.value,
                    {duration:1}
                );
        }
        function getCookie()
        {
            var key = document.myform.getkey.value;
            document.myform.getvalue.value = Cookie.read(key);
        }
    </script>
</head>
<body>
    <form name="myform">
        <p>
            key: <input type="text" name="savekey"/>
            <br/>
            value: <input type="text" name="savevalue" />
            <br/>
            <input type="button" value="save" onClick="saveCookie()"/>
        </p>
        <p>
            key: <input type="text" name="getkey"/>
            <br/>
            <input type="button" value="get" onClick="getCookie()" />
            <br/>
            <input type="text" name="getvalue"/>
        </p>
    </form>
</body>
</html>

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

You can find more video clips, code samples and presentations for learning how to use the MooTools JavaScript framework in my free courses web site 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