func (g *Game) initializeUnusedTiles() error {
	g.unusedTiles = make([]tile.Tile, len(g.TileLetters))
	for i, ch := range g.TileLetters {
		id := tile.ID(i + 1)
		t, err := tile.New(id, ch)
		if err != nil {
			return fmt.Errorf("creating tile: %w", err)
		}
		g.unusedTiles[i] = *t
	}
	g.ShuffleUnusedTilesFunc(g.unusedTiles)
	return nil
}
// initialize unusedTiles from tileLetters or defaultTileLetters and shuffles them.
initialize unusedTiles from tileLetters or defaultTileLetters and shuffles them.
// initialize unusedTiles from tileLetters or defaultTileLetters and shuffles them .
func (g *Game) initializeUnusedTiles() error {
	g.unusedTiles = make([]tile.Tile, len(g.TileLetters))
	for i, ch := range g.TileLetters {
		id := tile.ID(i + 1)
		t, err := tile.New(id, ch)
		if err != nil {
			return fmt.Errorf("creating tile: %w", err)
		}
		g.unusedTiles[i] = *t
	}
	g.ShuffleUnusedTilesFunc(g.unusedTiles)
	return nil
}
func ( g * Game ) initializeUnusedTiles ( ) error { g . unusedTiles = make ( [ ] tile . Tile , len ( g . TileLetters ) ) for i , ch := range g . TileLetters { id := tile . ID ( i + 1 ) t , err := tile . New ( id , ch ) if err != nil { return fmt . Errorf ( " " , err ) } g . unusedTiles [ i ] = * t } g . ShuffleUnusedTilesFunc ( g . unusedTiles ) return nil }
initialize unusedTiles from tileLetters or defaultTileLetters and shuffles them.
initialize unusedTiles from tileLetters or defaultTileLetters and shuffles them .