- Fork this repository
- Copy the link to your new repository and prefix it with "https://gitpod.io/#" in your browser
- Click
Continue with GitHub
andAuthorize gitpod-io
- Wait for the environment to build. This can take a while the first time.
- Select "VS Code Browser" as your editor.
This template contains a basic structure for a simple Haskell project. Add your project code to the empty *.hs
files:
src/Lib.hs
: this module is intended to contain the core business logic of your program - it should consist of pure functions (not IO actions). You can rename this or create additional modules as needed (be sure to adjust theother-modules
section ofdapoker.cabal
to reflect any changes/additions)src/Types.hs
: use this module to define any custom types and synonyms that you'll use in other modulessrc/Actions.hs
: this module should contain helper IO actions that will be used inside themain
action ofapp/Main.hs
. Most of your effectful code should live in this module.app/Main.hs
: compose a minimalmain
action using helper actions defined insrc/Actions.hs
to run your application (this is what will be used if you )
Add any additional packages you need for your project below base
in the build-depends
section of dapoker.cabal
. Follow instructions if you encounter any errors due to a "hidden package": these refer to packages that are part of the standard library but aren't imported into a Haskell project by default. The editor tooling will identify the name of the package you need to add to build-depends
in such cases.
Use cabal repl
in the terminal and the :l
command followed by a specific module name (Lib
, Types
, Actions
, etc.) to test your code.
Use cabal run
to run your completed program.
As you complete the assignments, stage, commit and push your changes to Github using the Source Control
tab in the left panel.
Welcome to DaPoker! This version of poker supports only 2 human players The humans will play their turn one by one on the same machine The humans will have to enter their names at the beginning Each player will be given 100 ADA tokens to start with At the beginning of each round, a total of 5 community cards will be dealt along with 2 cards to each player at random The game will start with a small blind of 1 ADA and a big blind of 2 ADA For simplicity the first player will be the small blind and the second player will be the big blind This means that the game will start with the first player's turn Each player has the option to fold, call, check, raise or perform allin In this primitive version, there are no side pots, the winner takes all