Fix: how caracthers are displayed
This commit is contained in:
@@ -139,7 +139,7 @@ public class Builder extends Character {
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " \uD83D\uDD28:" + String.valueOf(reductionValue) + " \uD83C\uDFC5:" + String.valueOf(prestigeValue);
|
||||
return super.toStringBoard() + "\uD83D\uDD28:" + String.valueOf(reductionValue) + " \uD83C\uDFC5:" + String.valueOf(prestigeValue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,7 +87,7 @@ public class Hunter extends Character {
|
||||
public String toString() {
|
||||
String toPrint = super.toString();
|
||||
if(this.icon){
|
||||
toPrint += " I";
|
||||
toPrint += "\uD83C\uDF56";
|
||||
}
|
||||
return toPrint;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class Hunter extends Character {
|
||||
public String toStringBoard() {
|
||||
String toPrint = super.toStringBoard();
|
||||
if(this.icon){
|
||||
toPrint += " I";
|
||||
toPrint += "\uD83C\uDF56";
|
||||
}
|
||||
return toPrint;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class Inventor extends Character {
|
||||
*/
|
||||
@Override
|
||||
public String toStringBoard() {
|
||||
return super.toStringBoard() + " I_ID:" + String.valueOf(icon);
|
||||
return super.toStringBoard() + "ID:" + String.valueOf(icon);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,7 +96,7 @@ public class Hunt extends EventCard {
|
||||
*/
|
||||
@Override
|
||||
public String toStringBoard() {
|
||||
return super.toStringBoard()+" 1\uD83C\uDF56+"+prestigeMultiplier+"\uD83C\uDFC5"+" X N Hunter";
|
||||
return super.toStringBoard()+" 1\uD83C\uDF56+"+prestigeMultiplier+"\uD83C\uDFC5"+"×\uD83C\uDFF9";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -122,6 +122,6 @@ public class Sustenance extends EventCard {
|
||||
*/
|
||||
@Override
|
||||
public String toStringBoard() {
|
||||
return super.toStringBoard()+" -1F/-"+PrestigeDebt+"PP";
|
||||
return super.toStringBoard()+" -1\uD83C\uDF56/-"+PrestigeDebt+"\uD83C\uDFC5";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import it.polimi.ingsw.gc14.View.TUI.AsciiTable;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static it.polimi.ingsw.gc14.View.TUI.BorderStyle.*;
|
||||
|
||||
@@ -304,35 +306,43 @@ public class Player implements Serializable {
|
||||
}
|
||||
table.addRow("CHARACTERS:");
|
||||
if(!this.artists.isEmpty()){
|
||||
table.addRow("Artists: " + this.artists.toString());
|
||||
table.addRow(this.artists.size() + " Artists: \uD83C\uDFA8:" + this.artists.size());
|
||||
if(Last == 1){
|
||||
table.addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.builders.isEmpty()){
|
||||
table.addRow("Builders: " + this.builders.toString());
|
||||
table.addRow(this.builders.size() + " Builders: " + "-\uD83C\uDF56:" + this.builders.stream().mapToInt(Builder::getReductionValue).sum() + " \uD83C\uDFC5:" + this.builders.stream().mapToInt(Builder::getPrestigeValue).sum());
|
||||
if(Last == 2){
|
||||
table.addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.gatherers.isEmpty()){
|
||||
table.addRow("Gatherers: " + this.gatherers.toString());
|
||||
table.addRow(this.gatherers.size() + " Gatherers: -\uD83E\uDD57:" + 3*this.gatherers.size());
|
||||
if(Last == 3){
|
||||
table.addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.shamans.isEmpty()){
|
||||
table.addRow("Shamans: " + this.shamans.toString());
|
||||
table.addRow(this.shamans.size() + " Shamans: " + "\uD83C\uDF1F:" + this.shamans.stream().mapToInt(Shaman::getIcon).sum());
|
||||
if(Last == 4){
|
||||
table.addSeparator();
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.inventors.isEmpty()){
|
||||
table.addRow("Inventors: " + this.inventors.toString());
|
||||
table.addRow(this.inventors.size() + " Inventors: " + this.inventors.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
Inventor::Icon,
|
||||
Collectors.counting()
|
||||
))
|
||||
.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.map(e -> e.getKey() + ":" + e.getValue())
|
||||
.collect(Collectors.joining(" ")));
|
||||
if(Last == 5){
|
||||
table.addSeparator();
|
||||
}
|
||||
@@ -340,13 +350,13 @@ public class Player implements Serializable {
|
||||
|
||||
|
||||
if(!this.hunters.isEmpty()){
|
||||
table.addRow("Hunters: " + this.hunters.toString());
|
||||
table.addRow(this.hunters.size() + " Hunters: \uD83C\uDF56" + this.hunters.stream().filter(Hunter::getIcon).count());
|
||||
table.addSeparator();
|
||||
}
|
||||
|
||||
table.addRow("BUILDING CARDS:");
|
||||
if(!this.buildingCards.isEmpty()){
|
||||
table.addRow("Buildings: " + this.buildingCards.toString());
|
||||
table.addRow(this.buildingCards.size() + " Buildings: " + this.buildingCards.toString());
|
||||
}
|
||||
|
||||
return table.build();
|
||||
|
||||
Reference in New Issue
Block a user