-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test bot removal (updated from #4700) #4746
Conversation
@@ -970,11 +966,11 @@ | |||
* and a file for salvage | |||
*/ | |||
public void doSaveUnit() { | |||
for (Enumeration<Player> iter = getClient().getGame().getPlayers(); iter.hasMoreElements(); ) { | |||
for (Enumeration<Player> iter = getClient().getGame().getPlayers(); iter.hasMoreElements();) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
AbstractGame.getPlayers
@@ -117,7 +115,7 @@ | |||
} | |||
|
|||
Player target = null; | |||
for (final Enumeration<Player> i = game.getPlayers(); i.hasMoreElements(); ) { | |||
for (final Enumeration<Player> i = game.getPlayers(); i.hasMoreElements();) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
AbstractGame.getPlayers
final Enumeration<Player> playerEnumeration = playerVector.elements(); | ||
|
||
mockGame = mock(Game.class); | ||
when(mockGame.getPlayersVector()).thenReturn(playerVector); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
AbstractGame.getPlayersVector
|
||
mockGame = mock(Game.class); | ||
when(mockGame.getPlayersVector()).thenReturn(playerVector); | ||
when(mockGame.getPlayers()).thenReturn(playerEnumeration); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
AbstractGame.getPlayers
if ((fa >= 300) || (fa <= 60)) { | ||
return ToHitData.SIDE_FRONT; | ||
} | ||
if ((fa >= 60) && (fa <= 120)) { |
Check warning
Code scanning / CodeQL
Useless comparison test Warning
this condition
if ((fa >= 60) && (fa <= 120)) { | ||
return ToHitData.SIDE_RIGHT; | ||
} | ||
if ((fa >= 240) && (fa <= 300)) { |
Check warning
Code scanning / CodeQL
Useless comparison test Warning
This updates and replaces #4700
In the stuff Im currently doing I find myself often having to update TestBot so I was waiting for #4700 and decided to finish this. This deletes a few more classes and resolves, I think, the two problems in ClientGUI. Also I moved two statics from a deleted file to PhysicalOption which is used in Princess. I started a quick test game with Princess and as far as I could tell, all seemed in order.