Skip to content

Instantly share code, notes, and snippets.

@StevenMeiklejohn
Created February 17, 2017 14:11
Show Gist options
  • Save StevenMeiklejohn/76e58d8d8c024fbcf9c925908c8a1b92 to your computer and use it in GitHub Desktop.
Save StevenMeiklejohn/76e58d8d8c024fbcf9c925908c8a1b92 to your computer and use it in GitHub Desktop.
##Weekend Homework
###Card Game
This weekend's homework is to model a basic card game and implement the rules.
We aren't looking for a running game, just good TDD to demonstrate that the game works as it should.
####Part A - Highest Card
Build a simple card game that deals one card to every player and the player with the highest card wins.
####Part B - Simple Blackjack
Extend Part A to now deal 2 cards to every player and the player with the highest combination of cards wins.
####Optional - BlackJack
- Extend your code to start to implement the rules of blackjack, where each player starts with 2 cards and attempts to get as close to 21 without going over.
- After the initial deal each player should be able to 'draw' a new card and check whether the new card has made their total exceed 21 or not.
- If they do exceed 21 and have an 'Ace', the ace should change value from 11 to 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment