def draw_move(self): """ Returns a string representation of a move piece. """ if self.colour: return clr.format_color('><', fg=clr.rgb(5, 0, 0), bg=clr.rgb(0, 3, 0)) return 'MM'
def draw_black(self): """ Returns a string representation of a black piece. """ if self.flipped: if self.colour: return clr.format_color('><', fg=clr.rgb(2, 2, 2), bg=clr.rgb(1, 1, 1)) return 'BF' else: if self.colour: return clr.format_color(' ', bg=clr.rgb(1, 1, 1)) return 'BB'
def draw_white(self): """ Returns a string representation of a white piece. """ if self.flipped: if self.colour: return clr.format_color('><', fg=clr.rgb(4, 4, 4), bg=clr.rgb(5, 5, 5)) return 'WF' else: if self.colour: return clr.format_color(' ', bg=clr.rgb(5, 5, 5)) return 'WW'
def draw_board(self): """ Returns a string representation of a board piece. """ if self.colour: return clr.format_color(' ', bg=clr.rgb(0, 3, 0)) else: return '..'