ECMAScript 5 Tile Switch Game

Swap two adjacent tiles to form three-in-a-row (or more) alike tiles and score points!

To Play: Click on a tile in the grid, then move the mouse over an adjacent tile (up, down, left, or right) to temporarily switch the tiles. If the switch forms 3-in-a-row alike tiles, then the tiles are removed and tiles fall to fill their place.

Using the keyboard: Use the tab key to focus the active tile (1 tab-stop past the 'Enable sound effects' check box). The up, down, left, and right keys navigate the active tile. Press the "enter" key then a directional key to swap tiles in that direction.

Board size rows, columns Game controls Enable sound effects
Score
0
High Scores
Downloading resources...please wait

This game uses ECMAScript 5's new array methods.

The new array methods are:

  • Array.prototype.every (not used in this demo)
  • Array.prototype.some
  • Array.prototype.filter
  • Array.prototype.map
  • Array.prototype.forEach
  • Array.prototype.reduce
  • Array.prototype.reduceRight

For a more in-depth look at the new ECMAScript 5 array methods, please check out the ECMAScript 5 Arrays demo.