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:
That seems to work.return 0 if $x<0 or $y<0 or $x>10 or $y>10;
In reply to Re^2: ASCII Battleship Program
by perlStuck
in thread ASCII Battleship Program
by perlStuck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |