This game is a card variant of the coins in a line problem (also known as the pots of gold problem), implemented in Typescript.
npm install
npm start
- Single Player
- MultiPlayer
- Custom (any number of bots or players)
- Tutorial
Strategy | Description | Parameter(s) |
---|---|---|
AlwaysFirst | Always chooses the first card | - |
AlwaysLast | Always chooses the last card | - |
ChooseMaximum | Compares the values of the two cards and chooses the card having highest value | TieBreaker |
Clone | - | |
Minimax | TieBreaker |
|
Random | Randomly chooses one of the two options | number 0.5 by default |
UserInput | Prompts the user to input their choice | - |
- Create a file in ./src/Strategies
- Write a class implementing the
Strategy
interface found here - Add the class to the Strategies object in ./src/Strategies/index.ts
Tested on Windows 10 and Linux.
Licensed under the GNU General Public License v3.0 license.