core api for GateRunner card game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
lambda 4efb230f2b
Update readme
2 years ago
src Add package file and src folder 2 years ago
.gitignore Add gitignore file 2 years ago
LICENSE Initial commit 2 years ago
README.org Update readme 2 years ago
package.json Add package file and src folder 2 years ago

README.org

About

This package is a core api for GateRunner card game. It is written as an exercise in functional programming with fp-ts library and domain modelling.

Package contains game logic only without any rendering engine.

Gameplay

During game player should go through levels thats consist of lines of doors. Every line have three doors and player free to open any of them to skip line. When player interacts with the door it turn into event.

Every interaction take some move points of player. Amount of move points necessary passing a door depends on ground.

Player pass the level if it skip all lines with move points and health greater than zero.

Player can skip line if he can pass at least one open door with move points > 0.

Event can be ether of:

  • empty
  • item
  • trap
  • enemy

Empty event

Player just pass whole line when interacts with event. More difficult level is, less empty events it have.

Item event

Item can increase player's attributes once or permanent Item that increase attribute once if poition, permanently is artifact

Poitions works increase only on health and move points Artifacts can increase attack defence health max move max

Player can use potion only before open a door

Trap event

Trap works like negative item thats decrease parameters once or permanent.

Enemy event

Enemy is negative player. To pass the enemy we need to compare attack, defence and health until health of player or enemy will be equal or less than zero.

Skipping a line from start to finish is on turn. It consist of phases.

Plan

TODO Describe domain

Turn ,——————-.

Turn
phases: phase[]
isComplete: boolean

`——————-'

TODO Implement domain and operations over domain elements