110,120,83

BACK

WHAT WAS I THINKING?

Memory

David Verkerk
Front-end Web Developer

NEW GAME

CLOSE

I started by wanting to use the rotate function I wrote earlier (also used as a slower version in "Masquerade") but now with a fast animation time so it would look like a fast flip of a coin (or card, or anything)
The game "Memory" came to mind. It involves a lot of flipping.

However. To get the game working, rotation had little to do with it. The challenge was to write all the rules and exceptions of the game into javascript code and to make sure all the images were randomly picked from the stack and placed randomly on the screen. No neat array's here. And of course an attempt counter is thrown in for the competitive element.

The code deals with a programmers decision to in- or decrease the number of playing cards, no problem.