lchen59 jcheng26: added game ending conditions and checks