TDA 452
DIT 143
HT 2018

Functional Programming 2018
Lab Assignment 2

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:

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:

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!