21

21 was created by VB was a school assignment meant to be a C# console app, but was instead written in JavaScript for browsers. The game can be accessed at 21.dojnaz.net

Game Flow

 * 1) The player gets a card
 * 2) The player can choose between picking a card or staying on it's current hand. It can pick up as many cards it wants until it hits 21 or over
 * 3) The card values are combined and compared to each other. The closest to 21 wins.
 * 4) The winner gets 1 point. If it's a draw, nothing happens

Assignment Requirements (Grade E)

 * The player can choose to pick up unlimited cards until they are happy or have reached at least 21
 * If the player hits 22 or more, it looses
 * The computer has a set card value, aka it will not pick up any cards
 * The winner is rewarded 1 point
 * Ace has the value of 1

Assignment Requirements (Higher grades)

 * The computers card value is also calculated from a deck of cards. It will always choose to grab another card until it's at 17 or more
 * If the player of computer hits 22 or more, it looses
 * Ace can be two values, 11 or 1. The value is determined at pickup. If the current value plus 11 is 21 or less, it will be valued at 11. If it's 22 or more, it's valued at 1
 * Modified game flow
 * The computer and player gets a card each, both known to each other
 * The player grabs cards until it's happy or reached 21 or more
 * The computer grabs cards until it hits at least 17
 * Act like there is a real deck of cards. All cards on the playing field are unique. There can not be two of ace of hearts for an example
 * Set a goal. Like when a player hits 5 points, it wins the entire game