removed inf loop. stops after game is finished, new color code added