mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
* Descent into Madness - Fixed handling according the existing rules.
This commit is contained in:
parent
60d04e2614
commit
1d8712335f
3 changed files with 133 additions and 46 deletions
|
|
@ -44,6 +44,25 @@ public class PlayerList extends CircularList<UUID> {
|
|||
super(list);
|
||||
}
|
||||
|
||||
public Player getCurrent(Game game) {
|
||||
Player player = null;
|
||||
game.getPlayer(this.get());
|
||||
return player;
|
||||
}
|
||||
|
||||
public Player getNextInRange(Player basePlayer, Game game) {
|
||||
UUID currentPlayerBefore = get();
|
||||
UUID nextPlayerId = super.getNext();
|
||||
do {
|
||||
if (basePlayer.getInRange().contains(nextPlayerId)) {
|
||||
return game.getPlayer(nextPlayerId);
|
||||
}
|
||||
nextPlayerId = super.getNext();
|
||||
}
|
||||
while (!nextPlayerId.equals(currentPlayerBefore));
|
||||
return null;
|
||||
}
|
||||
|
||||
public Player getNext(Game game) {
|
||||
Player player;
|
||||
UUID start = this.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue