mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
[minor] Some text renaming.
This commit is contained in:
parent
237763b577
commit
26ca873eb6
4 changed files with 16 additions and 16 deletions
|
|
@ -370,7 +370,7 @@ public class TableController {
|
||||||
String creator = null;
|
String creator = null;
|
||||||
String opponent = null;
|
String opponent = null;
|
||||||
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) {
|
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) {
|
||||||
if (!match.getPlayer(entry.getValue()).hasQuitted()) {
|
if (!match.getPlayer(entry.getValue()).hasQuit()) {
|
||||||
User user = UserManager.getInstance().getUser(entry.getKey());
|
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
user.gameStarted(match.getGame().getId(), entry.getValue());
|
user.gameStarted(match.getGame().getId(), entry.getValue());
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ public abstract class MatchImpl implements Match {
|
||||||
public boolean isMatchOver() {
|
public boolean isMatchOver() {
|
||||||
int activePlayers = 0;
|
int activePlayers = 0;
|
||||||
for (MatchPlayer player: players) {
|
for (MatchPlayer player: players) {
|
||||||
if (!player.hasQuitted()) {
|
if (!player.hasQuit()) {
|
||||||
activePlayers++;
|
activePlayers++;
|
||||||
}
|
}
|
||||||
if (player.getWins() >= options.getWinsNeeded()) {
|
if (player.getWins() >= options.getWinsNeeded()) {
|
||||||
|
|
@ -165,7 +165,7 @@ public abstract class MatchImpl implements Match {
|
||||||
protected void initGame(Game game) throws GameException {
|
protected void initGame(Game game) throws GameException {
|
||||||
shufflePlayers();
|
shufflePlayers();
|
||||||
for (MatchPlayer matchPlayer: this.players) {
|
for (MatchPlayer matchPlayer: this.players) {
|
||||||
if (!matchPlayer.hasQuitted()) {
|
if (!matchPlayer.hasQuit()) {
|
||||||
matchPlayer.getPlayer().init(game);
|
matchPlayer.getPlayer().init(game);
|
||||||
game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId());
|
game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId());
|
||||||
game.loadCards(matchPlayer.getDeck().getSideboard(), matchPlayer.getPlayer().getId());
|
game.loadCards(matchPlayer.getDeck().getSideboard(), matchPlayer.getPlayer().getId());
|
||||||
|
|
@ -193,8 +193,8 @@ public abstract class MatchImpl implements Match {
|
||||||
if (game.getPriorityTime() > 0) {
|
if (game.getPriorityTime() > 0) {
|
||||||
player.setPriorityTimeLeft(p.getPriorityTimeLeft());
|
player.setPriorityTimeLeft(p.getPriorityTimeLeft());
|
||||||
}
|
}
|
||||||
if (p.hasQuitted()) {
|
if (p.hasQuit()) {
|
||||||
player.setQuitted(true);
|
player.setQuit(true);
|
||||||
}
|
}
|
||||||
if (p.hasWon()) {
|
if (p.hasWon()) {
|
||||||
player.addWin();
|
player.addWin();
|
||||||
|
|
@ -212,7 +212,7 @@ public abstract class MatchImpl implements Match {
|
||||||
Game game = getGame();
|
Game game = getGame();
|
||||||
for (MatchPlayer player: this.players) {
|
for (MatchPlayer player: this.players) {
|
||||||
Player p = game.getPlayer(player.getPlayer().getId());
|
Player p = game.getPlayer(player.getPlayer().getId());
|
||||||
if (p != null && p.hasLost() && !p.hasQuitted()) {
|
if (p != null && p.hasLost() && !p.hasQuit()) {
|
||||||
loserId = p.getId();
|
loserId = p.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -227,7 +227,7 @@ public abstract class MatchImpl implements Match {
|
||||||
@Override
|
@Override
|
||||||
public void sideboard() {
|
public void sideboard() {
|
||||||
for (MatchPlayer player: this.players) {
|
for (MatchPlayer player: this.players) {
|
||||||
if (!player.hasQuitted()) {
|
if (!player.hasQuit()) {
|
||||||
player.setSideboarding();
|
player.setSideboarding();
|
||||||
player.getPlayer().sideboard(this, player.getDeck());
|
player.getPlayer().sideboard(this, player.getDeck());
|
||||||
}
|
}
|
||||||
|
|
@ -244,7 +244,7 @@ public abstract class MatchImpl implements Match {
|
||||||
@Override
|
@Override
|
||||||
public boolean isDoneSideboarding() {
|
public boolean isDoneSideboarding() {
|
||||||
for (MatchPlayer player: this.players) {
|
for (MatchPlayer player: this.players) {
|
||||||
if (!player.hasQuitted() && !player.isDoneSideboarding()) {
|
if (!player.hasQuit() && !player.isDoneSideboarding()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +285,7 @@ public abstract class MatchImpl implements Match {
|
||||||
sb.append("- ").append(mp.getPlayer().getName());
|
sb.append("- ").append(mp.getPlayer().getName());
|
||||||
sb.append(" (").append(mp.getWins()).append(mp.getWins()==1?" win / ":" wins / ");
|
sb.append(" (").append(mp.getWins()).append(mp.getWins()==1?" win / ":" wins / ");
|
||||||
sb.append(mp.getLoses()).append(mp.getLoses()==1?" loss)":" losses)");
|
sb.append(mp.getLoses()).append(mp.getLoses()==1?" loss)":" losses)");
|
||||||
if (mp.hasQuitted()) {
|
if (mp.hasQuit()) {
|
||||||
sb.append(" QUITTED");
|
sb.append(" QUITTED");
|
||||||
}
|
}
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class MatchPlayer {
|
||||||
private Deck deck;
|
private Deck deck;
|
||||||
|
|
||||||
private Player player;
|
private Player player;
|
||||||
private boolean quitted;
|
private boolean quit;
|
||||||
private boolean doneSideboarding;
|
private boolean doneSideboarding;
|
||||||
private int priorityTimeLeft;
|
private int priorityTimeLeft;
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ public class MatchPlayer {
|
||||||
this.wins = 0;
|
this.wins = 0;
|
||||||
this.loses = 0;
|
this.loses = 0;
|
||||||
this.doneSideboarding = true;
|
this.doneSideboarding = true;
|
||||||
this.quitted = false;
|
this.quit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPriorityTimeLeft() {
|
public int getPriorityTimeLeft() {
|
||||||
|
|
@ -114,11 +114,11 @@ public class MatchPlayer {
|
||||||
return this.doneSideboarding;
|
return this.doneSideboarding;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasQuitted() {
|
public boolean hasQuit() {
|
||||||
return quitted;
|
return quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setQuitted(boolean quitted) {
|
public void setQuit(boolean quit) {
|
||||||
this.quitted = quitted;
|
this.quit = quit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
||||||
|
|
||||||
boolean hasLost();
|
boolean hasLost();
|
||||||
boolean hasWon();
|
boolean hasWon();
|
||||||
boolean hasQuitted();
|
boolean hasQuit();
|
||||||
void quit(Game game);
|
void quit(Game game);
|
||||||
boolean hasLeft();
|
boolean hasLeft();
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue