Steps to reproduce: 1. Create a Solo and Bomb instance, called solo and bomb resp. 2. Call solo.compareTo(bomb). Expected Result: It should return -1, which means the solo is smaller than the bomb. Actual Result: It returns -2, which means neither the solo is greater than the bomb, nor the bomb is greater than the solo. More information: When implementing compareTo, judge whether the parameter other is an instance of BombBase.
Codes to check whether the parameter other is an instance of BombBase has been added. Hence the problem is solved now.