Example #1
0
    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'
Example #2
0
    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'
Example #3
0
    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'
Example #4
0
    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'
Example #5
0
 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 '..'
Example #6
0
    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'
Example #7
0
 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 '..'
Example #8
0
    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'