public void setPawn(Pawn pawn) { this.pawn = pawn; if (pawn == null && this.pawn != null) { this.pawn = null; this.isEmpty = true; } else if (this.pawn != null && pawn != null) { isEmpty = false; } }
private static void addPawn(Player firstPlayer, int y, int x) { Pawn pawn = new Pawn(); pawn.setColor(firstPlayer.color); positions[x, y].setPawn(pawn); firstPlayer.quantityOfPawns--; }