GNVQ Advanced IT - Solitaire Game in JavaScript

 Play Game
 Programme details
 Game rules
 Form design
 Programme design



 

Solitaire
Cards Cards left

 in the pack


Cards Taken

Choice 1
Choice 2
Controls



Game rules.  Top of page
  1. The pack of cards is shuffled
  2. Four cards are dealt face-up in a row
  3. If two cards on the top of any of the four piles form a pair (ie same number irrelevant of the suit)they are discarded
  4. When all pairs have been taken, step two is repeated, dealing on top of the previous  cards.  If all cards have been dealt then the game is over.
  5. If all cards have been dealt, and in the process all cards have been discarded in pairs then the game has been won.
Programme Details Top of page

The game uses the following JavaScript:

Constructs;

Features;

The game interface provides the following detail:

Form design  Top of page    Four buttons are provided: In addition to the form , the HTML <body> tag has an event handler that calls the startGame() function.

 Top of Page
Home Page
Query for Tutor?