Removed duplicate calls to check if game is over. Sped up algorithm by .01 seconds.