func (b Board) usedTileWordsZ(tiles map[int]map[int]tile.Tile, ord func(tp tile.Position) int) []string {
	keyedUsedWords, wordCount := b.keyedUsedWords(tiles, ord)
	//sort the keyedUsedWords by the keys (z)
	keys := make([]int, 0, len(keyedUsedWords))
	for k := range keyedUsedWords {
		keys = append(keys, k)
	}
	sort.Ints(keys)
	usedWords := make([]string, wordCount)
	i := 0
	for _, k := range keys {
		copy(usedWords[i:], keyedUsedWords[k])
		i += len(keyedUsedWords[k])
	}
	return usedWords
}
// usedTileWords computes all the words formed by used tiles in the direction specified by the ord function.
usedTileWords computes all the words formed by used tiles in the direction specified by the ord function.
// usedTileWords computes all the words formed by used tiles in the direction specified by the ord function .
func (b Board) usedTileWordsZ(tiles map[int]map[int]tile.Tile, ord func(tp tile.Position) int) []string {
	keyedUsedWords, wordCount := b.keyedUsedWords(tiles, ord)
	keys := make([]int, 0, len(keyedUsedWords))
	for k := range keyedUsedWords {
		keys = append(keys, k)
	}
	sort.Ints(keys)
	usedWords := make([]string, wordCount)
	i := 0
	for _, k := range keys {
		copy(usedWords[i:], keyedUsedWords[k])
		i += len(keyedUsedWords[k])
	}
	return usedWords
}
func ( b Board ) usedTileWordsZ ( tiles map [ int ] map [ int ] tile . Tile , ord func ( tp tile . Position ) int ) [ ] string { keyedUsedWords , wordCount := b . keyedUsedWords ( tiles , ord ) keys := make ( [ ] int , 0 , len ( keyedUsedWords ) ) for k := range keyedUsedWords { keys = append ( keys , k ) } sort . Ints ( keys ) usedWords := make ( [ ] string , wordCount ) i := 0 for _ , k := range keys { copy ( usedWords [ i : ] , keyedUsedWords [ k ] ) i += len ( keyedUsedWords [ k ] ) } return usedWords }
usedTileWords computes all the words formed by used tiles in the direction specified by the ord function.
usedTileWords computes all the words formed by used tiles in the direction specified by the ord function .
//sort the keyedUsedWords by the keys (z)