Assignment 3 Elm project
3.1 Submission instructions
- Unzip the Project.zip folder. You should find: 2 files in the src folder:
– Main.elm – for the application itself
– Card.elm – for the functions and types you defined in the previous assignments 1 file in the tests folder:
– Tests.elm – for testing your implementation
- Edit the first line of each of the source files as described in the comments.
- Edit the source files in the src folder with your solutions.
- When done, zip this Project folder and name the zip archive with the following format:
Project ⟨FirstName⟩ ⟨LastName⟩ ⟨Group⟩
Examples of valid names:
Project John Doe 30432.zip
Project Ion Popescu 30434.zip
Project Gigel-Dorel Petrescu 30431.zipExamples of invalid names:
Solutions.zip
Project.zip
Solutii Project Ion Popescu.zip
91
3.2 Project resources
Resource
Blackjack rules
Elm guide
Elm core library Elm Random package Elm Html package
Link
Table 3.1: Lab Resources
https://en.wikipedia.org/wiki/Blackjack https://guide.elm-lang.org/ https://package.elm-lang.org/packages/elm/core/1.0.5/ https://package.elm-lang.org/packages/elm/random/latest/ https://package.elm-lang.org/packages/elm/html/latest/Html
3.3 Project description
In this project you will develop a basic blackjack web app. You will be given some starting (boilerplate) code, which you will have to complete in order to obtain a functional application.
The user of the app should be able to click on a button to draw a card and the drawn cards (the user’s hand) should be shown as huge unicode characters. The user should also be able to toggle with a second button whether the cards remaining in the deck should also be shown or not. The user should see their current score and a message when they win (obtain a score of 21) or lose (obtain a score over 21) the game.
3.4 Project tasks
Exercise 3.4.1 10p Implement the calculateScore function, as described in the comments.
Grading:
2 points for get the value of each card
4 points for generating a list of all possible scores 4 points for returning the score closest to 21
Exercise 3.4.2 5p Complete the update function.



