def nowPlaying_unicode(): out = "" out_1 = "" out_1 += " " out_2 = "" p = "" if globVar.player == "W": p += colors.w_king elif globVar.player == "b": p += colors.b_king out_1 += "╔" for i in range(21): out_1 += "═" out_1 += "╗ " if ((globVar.w_check and globVar.player == "W") or (globVar.b_check and globVar.player == "b")): out_1 += "\n ║" + " CHECK! " + p out_2 += " ║ \n" elif globVar.checkmate: out_1 += "\n ║" + " CHECKMATE! " out_2 += "║ \n" else: out_1 += "\n ║" + " NOW PLAYING: " + p out_2 += " ║ \n" out_2 += " ╚" for i in range(21): out_2 += "═" out_2 += "╝ " out = colors.normal(out_1) + colors.normal(out_2) return out + colors.RESET
def drawBoard_unicode(): clear() out = "" out_1 = nowPlaying_unicode() out_2 = "" numLabel = 8 letterLabel = 'A' out_2 += colors.normal("\n ") for i in range(8): out_2 += colors.normal(str(letterLabel + " ")) letterLabel = chr(ord(letterLabel) + 1) out_2 += " \n " for i in range(21): out_2 += " " out_2 += "\n" for i in range(8): out_2 += ' {} '.format(numLabel) for j in range(8): # out_2 += colors.RESET out_2 += colors.normal(str(board.Grid(i, j))) numLabel -= 1 out_2 += colors.RESET + colors.normal(" \n") for i in range(25): out_2 += colors.normal(" ") out_2 += colors.normal("\n") out = out_1 + out_2 + colors.RESET print(out, end="")
def remaining_unicode(): w_pawn_count = utils.typeCounter("pawn", "W") w_rook_count = utils.typeCounter("rook", "W") w_knight_count = utils.typeCounter("knight", "W") w_bishop_count = utils.typeCounter("bishop", "W") w_queen_count = utils.typeCounter("queen", "W") w_king_count = utils.typeCounter("king", "W") b_pawn_count = utils.typeCounter("pawn", "b") b_rook_count = utils.typeCounter("rook", "b") b_knight_count = utils.typeCounter("knight", "b") b_bishop_count = utils.typeCounter("bishop", "b") b_queen_count = utils.typeCounter("queen", "b") b_king_count = utils.typeCounter("king", "b") out = "" temp_out = "" # temp_out += " REMAINING: \n" out += colors.normal(temp_out) temp_out = colors.white_header(" White: ") out += temp_out temp_out = colors.header_separator("│") out += temp_out + colors.RESET temp_out = colors.black_header(" Black: ") out += temp_out + "\n" # print white pawn temp_out = colors.normal(" {} ".format(w_pawn_count)) temp_out += colors.normal(colors.w_pawn) out += temp_out # print white rook temp_out = colors.normal(" {} ".format(w_rook_count)) temp_out += colors.normal(colors.w_rook) temp_out += colors.normal(" │") out += temp_out # print black pawn temp_out = colors.normal(" {} ".format(b_pawn_count)) temp_out += colors.normal(colors.b_pawn) out += temp_out # print black rook temp_out = colors.normal(" {} ".format(b_rook_count)) temp_out += colors.normal(colors.b_rook) temp_out += colors.normal(" \n") out += temp_out ### ROW 2 ### # print white knight temp_out = colors.normal(" {} ".format(w_knight_count)) temp_out += colors.normal(colors.w_knight) out += temp_out # print white bishop temp_out = colors.normal(" {} ".format(w_bishop_count)) temp_out += colors.normal(colors.w_bishop) temp_out += colors.normal(" │") out += temp_out # print black knight temp_out = colors.normal(" {} ".format(b_knight_count)) temp_out += colors.normal(colors.b_knight) out += temp_out # print black bishop temp_out = colors.normal(" {} ".format(b_bishop_count)) temp_out += colors.normal(colors.b_bishop) temp_out += colors.normal(" \n") out += temp_out ### ROW 3 ### # print white queen temp_out = colors.normal(" {} ".format(w_queen_count)) temp_out += colors.normal(colors.w_queen) out += temp_out # print white king temp_out = colors.normal(" {} ".format(w_king_count)) temp_out += colors.normal(colors.w_king) temp_out += colors.normal(" │") out += temp_out # print black queen temp_out = colors.normal(" {} ".format(b_queen_count)) temp_out += colors.normal(colors.b_queen) out += temp_out # print black king temp_out = colors.normal(" {} ".format(b_king_count)) temp_out += colors.normal(colors.b_king) temp_out += colors.normal(" \n\n") out += temp_out print(out + colors.RESET, end="")