checkVictory function skeleton