Places a unit; the first unit added decides whose turn it is.
import { startingTactics, addTacticalUnit } from '@datamoc/mw_games/board';const state = startingTactics(6, 6, 'square');addTacticalUnit(state, { id: 'ranger', owner: 'blue', x: 0, y: 0, hp: 10, maxHp: 10, actions: 2 });console.log(state.turn); // 'blue' Copy
import { startingTactics, addTacticalUnit } from '@datamoc/mw_games/board';const state = startingTactics(6, 6, 'square');addTacticalUnit(state, { id: 'ranger', owner: 'blue', x: 0, y: 0, hp: 10, maxHp: 10, actions: 2 });console.log(state.turn); // 'blue'
Places a unit; the first unit added decides whose turn it is.