added endgame logic + second game done