Closed 0xhtml closed 2 years ago
The test-client for mass testing is calculating the scores incorrectly.
The player who plays as team ONE is constantly alternating: https://github.com/software-challenge/backend/blob/89407e5e2f76801ec8beb8f31412da218f5f70e5/helpers/test-client/src/sc/TestClient.java#L283-L284 and https://github.com/software-challenge/backend/blob/89407e5e2f76801ec8beb8f31412da218f5f70e5/helpers/test-client/src/sc/TestClient.java#L351-L355 both using (finishedTests + i) % 2
(finishedTests + i) % 2
However when the game result is parsed it is assumed that team ONE always corresponds to player 1: https://github.com/software-challenge/backend/blob/89407e5e2f76801ec8beb8f31412da218f5f70e5/helpers/test-client/src/sc/TestClient.java#L217-L219 using getTeam().getIndex() == finalPlayer
getTeam().getIndex() == finalPlayer
This results in my client which definitely always wins against the defaultplayer.jar getting a score of 20:20 (with 20 games).
defaultplayer.jar
20:20
Thank you for the detailed report, sorry for the late answer. The testclient is currently being rewritten anyways, but unfortunately it does not have a high priority.
The test-client for mass testing is calculating the scores incorrectly.
The player who plays as team ONE is constantly alternating: https://github.com/software-challenge/backend/blob/89407e5e2f76801ec8beb8f31412da218f5f70e5/helpers/test-client/src/sc/TestClient.java#L283-L284 and https://github.com/software-challenge/backend/blob/89407e5e2f76801ec8beb8f31412da218f5f70e5/helpers/test-client/src/sc/TestClient.java#L351-L355 both using
(finishedTests + i) % 2
However when the game result is parsed it is assumed that team ONE always corresponds to player 1: https://github.com/software-challenge/backend/blob/89407e5e2f76801ec8beb8f31412da218f5f70e5/helpers/test-client/src/sc/TestClient.java#L217-L219 using
getTeam().getIndex() == finalPlayer
This results in my client which definitely always wins against the
defaultplayer.jar
getting a score of20:20
(with 20 games).