check the class detection
check : detect victory and defeat