crappy game ending code