Merge branch 'patch-6' into 'master'

Patch for Issue #8, coded by @friarsol

See merge request core-developers/forge!86
This commit is contained in:
Michael Kamensky
2018-01-13 04:51:09 +00:00

View File

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