package games import ( "battlecamp-go-server/board" "battlecamp-go-server/player" "time" ) type Game struct { Id int64 `json:"id"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Board *board.Board `json:"-"` Winner *player.Player `json:"winner,omitempty"` } func NewGame(cols, rows int) *Game { createTime := time.Now().UnixNano()/1000 game := &Game{ Id: createTime, StartTime: createTime, Board: board.New(cols, rows), } return game }