Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: ASCII Battleship Program

by perlStuck (Sexton)
on Feb 04, 2012 at 15:25 UTC ( #951813=note: print w/replies, xml ) Need Help??


in reply to Re: ASCII Battleship Program
in thread ASCII Battleship Program

Yeah, I think I found a partial solution at least. It would appear that two of the conditionals that would allow the return of a properly placed ship was faulty. In 'sub place_ship' there's a line that reads:

return 0 if $x<0 or $y<0 or $x>9 or $y>9;

Changing it to:

return 0 if $x<0 or $y<0 or $x>10 or $y>10;
That seems to work.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2021-02-26 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?