Lab Assignment 2: BlackJack
In this lab assignment, you will implement a Haskell program for playing
a card game called BlackJack.
The lab assignment is divided up into 2 parts.
The description of the full lab assignment is here:
The full Task is described in Section 3 of that document.
The separate parts of this lab assignment are:
Part A: Task 3.1 (reading the document),
Task 3.2 (writing out what happens to the size function),
and part of Task 3.4, namely: implement the functions
"empty", "value", "gameOver", and "winner".
Part B: Consists of the remaining tasks described in
the lab description.
Deadlines for each of these parts are given on
the home page.
You need the following files:
The exact instructions on what to submit are stated in the document above.
Write your answers in one file, called BlackJack.hs. For each assignment,
use Haskell comments to indicate what part of the file contains the answer to
the assignment. For answers in natural language please use English;
write your answers also in Haskell comments. Remove irrelevant things from the
Please do not submit the given modules Cards.hs and RunGame.hs.
Before you submit your code, Clean It Up! Remember, submitting clean code
is Really Important, and simply the polite thing to do.
After you feel you are done,
spend some time on cleaning your code; make it simpler,
remove unneccessary things, etc.
We will reject your solution if it is not clean. Clean code:
Feel free to use the
program to help with many of these issues and other haskell style issues.
- Does not have long lines (< 78 characters)
- Has a consistent layout
- Has type signatures for all top-level functions
- Has good comments
- Has no junk (junk is unused code, commented code, unneccessary comments)
- Has no overly complicated function definitions
- Does not contain any repetitive code (copy-and-paste programming)
To the Fire System