There's Games::Literati already in CPAN which does all the math work (scoring words, and finding optimum scores, which would be great for a computer opponent). I recently took over maintenance of the module -- it originally had Scrabble and Literati (the old Yahoo! Games board from the early 2000's), and I added in Words With Friends, and Super-Scrabble, and hopefully making it easier to extend.
When I found the right Round TuitTM, I was going to eventually expand it to have alternate interfaces of a GUI and a web interface -- either as sub-modules, or over in the App hierarchy. (Something like App::Games::Literati::Web, ...::WinGui, ...::TkGui). But I wouldn't complain if you wanted to help / work on the front ends; in fact, it would be good to work together to keep them in sync.
If you do want to go that direction, play around with the existing single-turn command-line interface from the existing module, and then we can talk about what features I need to add to the backend to make it easier to program the interface. I know one quick fix would be for the game initializer routines to define the letter frequencies, not just the letter scores and board scores. There's probably also a few functions that need to be taken out into their own sub instead of being buried in the find-best-scores loop, soas to make it easier for the interface.
In reply to Re: How to build a scrabble type of game with perl
by pryrt
in thread How to build a scrabble type of game with perl
by Demeter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |