public String toString() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < Game.NUM_ROWS; i++) {
            for (Square s : this.squares[i]) {
                sb.append('|');
                if (!s.isActive()) {
                    sb.append("  -  ");
                } else if (s.isOccupied()) {
                    Piece p = s.getOccupier();
                    
                    char col = (p.getColor() == Color.BLUE)? 'B': 'R';
                    int ran = 0;
                    if (p instanceof FriendlyPiece) {
                        ran = (((FriendlyPiece)p).getRank().getValue());
                    }
                    String ranstr;
                    if(ran<10) ranstr = "0"+ran;
                    else ranstr = ""+ran;
                    sb.append(col + ", " + ranstr);
                } else {
                    sb.append("     ");
                }
            }
            sb.append("|\n");
        }
        return sb.toString();
    }