C O N T E N T S

Introduction & objectives

Simple HTML page and game JS

Naming conventions

Design and code in steps

Cards, suits and values

A deck of cards

Shuffling the deck

A specific game example: Spider

Unicode for drawing cards

Initial deal, columns

Display the cards

Click or touch a card: targets

Move the clicked card

Click and move a group of cards

Undoing previous moves: history

Interlude 1

Unicode revisited: images

Load the sheet of card images

Slice and draw cards

Dragging: mouse down and up

Dragging cards: mousemove

Completing a suit

Better testing

Removing a completed suit

Dealing more cards

Interlude 2

Detecting impossibility

Animation

Animating the deals

Animating suit completion

Removing card borders

Testing

Conclusion