Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: using perl to find words for scrabble

by pryrt (Abbot)
on Sep 12, 2019 at 13:07 UTC ( [id://11106067]=note: print w/replies, xml ) Need Help??


in reply to Re^4: using perl to find words for scrabble
in thread using perl to find words for scrabble

Also, I haven't cobbled together how a person completes a "turn."

After I decide which of the top-10 solutions I want to use, I then use a text editor to fill in the game file (and then enter my awesome super-scoring turn into the Words With Friends app). Once the other player goes, I enter their play into the game file, and update my available tiles, and run again.

So how can we do this without an indirection operator on the command line?

The original interface was designed for STDIN/STDOUT interaction. You can see in the test suite (t/03_input_processing.t) the sub run_game(), which shows one way of redirecting the filehandles so it can use a named file instead of relying on the console for input.

Back when I was actively working on it, I was planning on eventually doing new frontends (like a web interface) as sub-modules that can inherit from the main. But since it worked as-is for me (and I just set up a batch script that converts run.bat game1.txt (or drag-and-drop game1.txt onto the .bat) to perl rungame.pl < %1 to convert to redirection for me, it never became a priority. Similarly, I was planning on writing up instructions for users to be able to define their own gameboards, but never got around to that documentation, either.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11106067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found