goship/board.go
2024-06-17 22:34:04 +02:00

20 lines
318 B
Go

package main
type board struct {
owner *client
width uint8
height uint8
matrix [][]square
}
func newBoard(width, height uint8) *board {
b := new(board)
b.width = width
b.height = height
b.matrix = make([][]square, b.height)
for i := range b.matrix {
b.matrix[i] = make([]square, b.width)
}
return b
}