Patch for Issue #8, coded by @friarsol

This commit is contained in:
Rob Schnautz
2018-01-12 18:06:02 +00:00
parent c1870b4ef8
commit f79b326010

View File

@@ -638,8 +638,12 @@ public class Game {
public int getPosition(Player player, Player startingPlayer) {
int startPosition = ingamePlayers.indexOf(startingPlayer);
int position = (ingamePlayers.indexOf(player) + startPosition) % ingamePlayers.size() + 1;
return position;
int myPosition = ingamePlayers.indexOf(player);
if (startPosition > myPosition) {
myPosition += ingamePlayers.size();
}
return myPosition - startPosition + 1;
}
public void onPlayerLost(Player p) {