New working commit with ending and restarting game