func NewBoard(size int) (*Board, error) {
	b := &Board{
		size:  size,
		tiles: map[*Tile]struct{}{},
	}
	for i := 0; i < 2; i++ {
		if err := addRandomTile(b.tiles, b.size); err != nil {
			return nil, err
		}
	}
	return b, nil
}
func NewBoard(size int) (*Board, error) {
	b := &Board{
		size:  size,
		tiles: map[*Tile]struct{}{},
	}
	for i := 0; i < 2; i++ {
		if err := addRandomTile(b.tiles, b.size); err != nil {
			return nil, err
		}
	}
	return b, nil
}
func NewBoard ( size int ) ( * Board , error ) { b := & Board { size : size , tiles : map [ * Tile ] struct { } { } , } for i := 0 ; i < 2 ; i ++ { if err := addRandomTile ( b . tiles , b . size ) ; err != nil { return nil , err } } return b , nil }
// NewBoard generates a new Board with giving a size.
NewBoard generates a new Board with giving a size .