Try writing pseudocode before you write code.
In reply to Re: Games.pl again by Anonymous Monk in thread Games.pl again by Nik