1) As a starter, for those if conditions, instead of using "and", use &&. "and" has a very low precedence.
2) Your else is only paired with the last if. Chain those if's together with if/else if/else.
In reply to Re: logic problem with perl game
by PeterPeiGuo
in thread logic problem with perl game
by mynameisG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |