mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Patch for Issue #8, coded by @friarsol
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user