Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If that's one more act in the battle of the sexes (oh the most iconic of the palindromes!), I will gladly give my 2 bits to achieve balance: How about you have the phone take a picture of the board, reconstruct the board in memory, find best move for you? And optionally looking ahead and minimising the score of your opponent's next move. I have looked briefly at your previously-related post, its answers and the link provided to an older thread for scrabble, but I could not see a function which searches for words in dictionary when some of its letters are clamped on specific values. I.e. for those letters already set on the board squares where you plan to place your new word. So, can you start with a filter for the results of tybalt89's my $pattern = join '', map "$_?", sort @tiles; to make sure your candidate words have specific letters at specific positions? Then have another function which calculates the score of each candidate word taking into consideration what's already on board (i think appending to existing words gives you extra credit?). Would that be easier by having that function taking the board state as input, adds your candidate word in it and re-calculates the total board score? Subtracting this from initial score will be your word's score - more or less, right? bw, bliako In reply to Re: Inputing vectors into a scrabble-esque game
by bliako
|
|