Beispiel #1
0
    def get_piece_file_path(self, piece_type, path_prefix=None, file_ext=None):
        path_prefix = path_prefix or GD.DEFAULT_PATH
        file_ext = file_ext or GD.DEFAULT_FILE_EXT

        pt = PieceType(piece_type)
        index = int(pt)
        name = pt.get_name()
        sanitize = name.replace('\'', '_').replace(' ', '_').lower()
        return '%s/pieces/%02d_%s%s' % (path_prefix, index, sanitize, file_ext)
Beispiel #2
0
    #c = 1
    #d = 2
    #e = 3
#
#a = A.c
#
#print "a", a
#
#b = A.d
#
#print "a+b", a, b, a+b


#pt = board.PieceType.Bishop
#
#print pt
#print board.PieceType.get_symbol(pt)
#print board.PieceType.get_name(pt)

pt = PieceType(PieceType.Bishop)

print pt
print pt.get_symbol()
print pt.get_name()

bs = BoardType(BoardType.AgeOfAquarius)

print bs
print bs.get_name()
print bs.get_size()