Made the code for game mechanism streamlined and sequential.