renamed endgame flag and base class variables