update colors for console version
This commit is contained in:
@@ -6,23 +6,13 @@ import chess.model.PieceVisitor;
|
||||
import chess.model.pieces.*;
|
||||
|
||||
public class ConsolePieceName implements PieceVisitor<String> {
|
||||
public static final String ANSI_RESET = "\u001B[0m";
|
||||
public static final String ANSI_BLACK = "\u001B[30m";
|
||||
public static final String ANSI_RED = "\u001B[31m";
|
||||
public static final String ANSI_GREEN = "\u001B[32m";
|
||||
public static final String ANSI_YELLOW = "\u001B[33m";
|
||||
public static final String ANSI_BLUE = "\u001B[34m";
|
||||
public static final String ANSI_PURPLE = "\u001B[35m";
|
||||
public static final String ANSI_CYAN = "\u001B[36m";
|
||||
public static final String ANSI_WHITE = "\u001B[37m";
|
||||
|
||||
|
||||
public String getString(Piece piece){
|
||||
if (piece.getColor()== Color.Black){
|
||||
return ANSI_BLACK + visit(piece);
|
||||
return Colors.BLACK + visit(piece);
|
||||
}
|
||||
else {
|
||||
return ANSI_WHITE + visit(piece);
|
||||
return Colors.WHITE + visit(piece);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user