1
Fork 0
solar-conflux/fsharp/ygosim/src/Player.fs
Matei Adriel b842f8a14e
fsharp(ygosim): feat: added a few basic files
Signed-off-by: prescientmoon <git@moonythm.dev>
2019-12-05 19:17:05 +02:00

19 lines
398 B
Forth

module Player
open Side
type Player =
{ lifePoints: int
side: Side }
let inflictDamage (player: Player) amount = { player with lifePoints = player.lifePoints - amount }
type PlayerControllerAction =
| ChooseZone
| BoardUpdate
type PlayerActionPayload = PlayerControllerAction * Side
type PlayerController = PlayerController of (PlayerControllerAction -> PlayerController)