finished check for victory algorithim