JSFiddle - React, Tailwind, and code Playground

by Farzad YZ

JavaScript

const game = new Game(3)

const PRIMARY_ACTIONS: [
	{type: 'TAKE_TREASURY_MONEY'},
  {type: 'KILL_PLAYER'},
  {type: ''}
]

gameState = {
	players: [
  	new Player(),
    new Player(),
    new Player()
  ],
  turnCursor: 0,
  treasuryCoins: 10000,
  eventLog: []
}

// Start
gameState.players[gameState.turnCursor].sendEvent('TAKE_ACTION', [
	{type: 'TAKE_TREASURY_MONEY'},
  {type: ''}
])