software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
12 stars 9 forks source link

test-client calculates wrong score #409

Closed 0xhtml closed 2 years ago

0xhtml commented 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

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 of 20:20 (with 20 games).

xeruf commented 2 years ago

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.