added a new game feature when there's a collision so the user can either
close the application or start a new game, changed the way the
thread/snake terminated-instead of executing forever and then putting it
to sleep forever, I use an endGame boolean and have the thread run as
long as it's not true and in the endGame() method I set it to true so it
terminates.
changed thread start and end, added endgame window so user can choose to
start a new game or close the application, added amount of food eaten,
after eating 25 pieces  speed slows down