import { startingSkirmish, addSkirmishUnit, endSkirmishTurn } from '@datamoc/mw_games/board';
const state = startingSkirmish(6, 6, { plain: { moveCost: 1, defense: 0 } });
addSkirmishUnit(state, { id: 'axeman', owner: 'blue', x: 0, y: 0, hp: 10, maxHp: 10, moves: 4, attack: 4, hitChance: 0.7 });
addSkirmishUnit(state, { id: 'raider', owner: 'red', x: 3, y: 0, hp: 10, maxHp: 10, moves: 4, attack: 3, hitChance: 0.6 });
endSkirmishTurn(state, 2);
console.log(state.turn, state.round); // 'red' 1
Hands the turn to the next owner with units on the board, refilling their movement and healing every one of their units standing on a village they own.