Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: The 15 Puzzle

by jwkrahn (Monsignor)
on Jun 10, 2020 at 20:30 UTC ( #11117920=note: print w/replies, xml ) Need Help??


in reply to The 15 Puzzle

print for( '', 'Welcome to the 15 puzzle!', '', 'Use an arrow key to move a block into the empty position.', "You're trying to reach the position:", ' 01 02 03', '04 05 06 07', '08 09 10 11', '12 13 14 15', '', '^C to kill.', '' );

That would probably be better as a here doc (a single string) than a list of strings:

print <<TEXT; Welcome to the 15 puzzle! Use an arrow key to move a block into the empty position. You're trying to reach the position: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 ^C to kill. TEXT

Replies are listed 'Best First'.
Re^2: The 15 Puzzle
by msh210 (Monk) on Jun 10, 2020 at 20:54 UTC

    Thank you!

    $_="msh210";$"=$\;@_=@{[split//,uc]}[2,0];$_="@_$\1";$\=$/;++$_[0]for$...1;print lc substr crypt($_,"@_"),1,6

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2020-09-26 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (141 votes). Check out past polls.

    Notices?