For project 1, you will create some kind of game (or other simple interactive text-based app). A simple wrapper to do all the I/O has been provided; you need only provide it with four things:
GameState
initGameState :: [Int] -> GameState
gamePrompt :: GameState -> String
gameStep :: String -> GameState -> (String, Maybe GameState)
Nothing
Of course, you can and should decompose the definitions of these things into many more functions as appropriate.
Click this link to download the skeleton code for the project, and unzip it somewhere appropriate. The skeleton contains a basic Haskell package, consisting of:
csci365-game.cabal
author
maintainer
containers
build-depends
LICENSE
CHANGELOG.md
game.md
app/Main.hs
app/Game.hs
To run your game:
cabal run
cabal
ghcup install cabal 3.10.2.1
You should turn in a .zip or .tgz file containing the entire Cabal package, i.e. all the same files that were in the provided project skeleton.
.zip
.tgz
map
filter