Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2004seraph/dominomatch
My university functional programming assignment
https://github.com/2004seraph/dominomatch
console-app game-ai learning university-assignment
Last synced: about 1 month ago
JSON representation
My university functional programming assignment
- Host: GitHub
- URL: https://github.com/2004seraph/dominomatch
- Owner: 2004seraph
- License: other
- Created: 2023-12-01T16:07:18.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-01T16:30:30.000Z (about 1 year ago)
- Last Synced: 2024-04-21T11:48:11.131Z (9 months ago)
- Topics: console-app, game-ai, learning, university-assignment
- Language: Haskell
- Homepage:
- Size: 762 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dominoMatch - My functional programming assignment
I completed this piece of work for COM2108, a module in which I studied the functional programming paradigm and learnt Haskell. I had a lot of fun making this and developed a love for list processing!
This program simulates a match of 5s and 3s dominoes, and includes two players - one that randomly plays dominoes and one that employs multiple intelligent strategies to win.
It can be best demonstrated in the GHCi REPL as below:
```bash
ghci> :load DomsMatch.hs
...
ghci> domsMatch simplePlayer smartPlayer
ghci> domsMatch 1000 7 61 simplePlayer smartPlayer 4325
(18,982)
```The output of `domsMatch` will be the wins for each player, you can also pit two of the same player against each other, though that would just mean equal wins.
You may also load `DomsMatchTest.hs` for different versions of the smart and simple players with varying strategies. All are prefixed with `smartPlayer_` or `simplePlayer_` and can be navigated using GHCi's tab autocompletion.
Compiling and running `Main.hs` will play a game similar to above (but a bit more performant).