import { MAX_ROADS, MAX_CITIES, MAX_SETTLEMENTS } from "./constants"; import type { Player, PlayerColor } from "./types"; export const newPlayer = (color: PlayerColor): Player => { return { roads: MAX_ROADS, cities: MAX_CITIES, settlements: MAX_SETTLEMENTS, points: 0, status: "Not active", lastActive: 0, resources: 0, order: 0, stone: 0, wheat: 0, sheep: 0, wood: 0, brick: 0, army: 0, development: [], color: color, name: "", totalTime: 0, turnStart: 0, ports: 0, developmentCards: 0, orderRoll: 0, position: "", orderStatus: "none", tied: false, mustDiscard: 0, live: true, turnNotice: "", longestRoad: 0, }; }; export default newPlayer;