24 lines
434 B
Go
24 lines
434 B
Go
package games
|
|
|
|
type BoardConfig struct {
|
|
Rows int
|
|
Cols int
|
|
}
|
|
|
|
type GameConfiguration struct {
|
|
Players int
|
|
Board BoardConfig
|
|
}
|
|
|
|
// Static configuration for all supported games.
|
|
var GameConfig = map[string]GameConfiguration{
|
|
"tictactoe": {
|
|
Players: 2,
|
|
Board: BoardConfig{Rows: 3, Cols: 3},
|
|
},
|
|
"battleship": {
|
|
Players: 2,
|
|
Board: BoardConfig{Rows: 10, Cols: 10},
|
|
},
|
|
}
|