コード例 #1
0
import codecs

from cchess_alphazero.environment.lookup_tables import Winner
from cchess_alphazero.environment.chessman import *

from cchess_alphazero.lib.logger import getLogger

logger = getLogger(__name__)


class Chessboard(object):
    def __init__(self, name='000'):
        self.__name = name
        self.__is_red_turn = True
        self.__chessmans = [([None] * 10) for i in range(9)]
        self.__chessmans_hash = {}
        self.turns = 1
        self.record = ''
        self.winner = None
        self.__screen = ''

    @property
    def is_red_turn(self):
        return self.__is_red_turn

    @property
    def name(self):
        return self.__name

    @name.setter
    def name(self, name):
コード例 #2
0
import codecs

from cchess_alphazero.environment.lookup_tables import Winner
from cchess_alphazero.environment.chessman import *

from cchess_alphazero.lib.logger import getLogger

logger = getLogger(__name__)

class Chessboard(object):

    def __init__(self, name='000'):
        self.__name = name
        self.__is_red_turn = True
        self.__chessmans = [([None] * 10) for i in range(9)]
        self.__chessmans_hash = {}
        self.turns = 1
        self.record = ''
        self.winner = None
        self.__screen = ''

    @property
    def is_red_turn(self):
        return self.__is_red_turn

    @property
    def name(self):
        return self.__name

    @name.setter
    def name(self, name):