Made using the Haskell programming language and Gloss Library during the 1st semester of the 1st year
Run the command "ghc Main.hs" in the src directory. If it doesn't work, try "ghc Main.hs -package random." Then, run the command "./Main" to start the game.
If you have an SSH key configured on GitLab, you can clone using the following link:
$ git clone https://github.com/2101dudu/CrossyRoadProject-LI1.git
$ cd src
Alternatively, you can clone via HTTPS with the following link:
$ git clone https://gitlab.com/uminho-di/li1/2223/projetos/2022li1g018.git
$ cd src
You can open the Haskell interpreter (GHCi) using Cabal or directly.
- Using cabal
$ cabal repl
- Using GHCi
$ ghci -i="src" -i="tests" src/Main.hs
The project uses the HUnit library for unit testing.
You can run the tests using one of the following alternatives:
- Using
cabal
$ cabal test
- Using GHCi
$ ghci -i="src" -i="tests" tests/Spec.hs
>>> runTestsT1 -- Correr os testes tarefa 1
>>> runTestsT2 -- Correr os testes tarefa 2
>>> runTestsT3 -- Correr os testes tarefa 3
>>> runTestsT4 -- Correr os testes tarefa 4
>>> runTestsT5 -- Correr os testes tarefa 5
>>> main -- Correr todos os testes
- Using the
runhaskell
wrapper
$ runhaskell -i="src" -i="tests" tests/Spec.hs
You can generate documentation with Haddock.
- Using
cabal
$ cabal haddock --haddock-all
- Using
haddock
directly
$ haddock -h -o doc/html src/*.hs
- A104353 Eduardo de Oliveira Sousa Faria;
- A104089 Nuno Miguel Ribeiro da Silva;