Some notes:
Good luck!
Lab Assignment 2: BlackJack
In this lab assignment, you will implement a Haskell program for playing
a card game called BlackJack.
Two parts
The lab assignment is described in the following document:
It was originally written as one big assignment, but has for this
course been divided into two parts:
Lab 2A consists of the assignments labelled
A0, A1…
(writing out what happens to the size
function in Section
3.1, and implementing some of the functions in Section 3.4).
Lab 2B consists of the assignments labelled
B1, B2…
(the remaining functions in Section 3.4 and Section 3.5).
It's probably a good idea to read the whole document before you start,
to familiarize yourself with the overall goals and requirements.
Deadlines
Deadlines for each of these parts are given on
the home page.
Files
You need the following files:
Submission
The exact instructions on what to submit are stated in the document above.
Write your answers in one file, called BlackJack.hs.
Please do not submit the given modules Cards.hs and RunGame.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.
Before you submit your code,
spend some time on cleaning up your code; make it simpler,
remove unneccessary things, etc.
We will reject your solution if it is not clean. Clean code:
- 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)
Feel free to use the
hlint
program to help with many of these issues and other haskell style issues.
This year we have added Automatic checks in Fire that will run when you submit your answers. The tests include runing hlint and perhaps testing
some of your functions with QuickCheck.
The purpose of this is to give you some quick
feedback and to help speed up the grading process.
If the feedback you get is not helpful, you can safely ignore it.
To the Fire System
Good Luck!