check end condition
end game conditions