예제 #1
0
 p.data = [
     [
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
     ],
     [
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
     ],
     [
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
     ],
     [
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
     ],
     [
         -1,
         -1,
         +1,
         -1,
         -1,
         -1,
         -1,
         -1,
     ],
     [
         -1,
         -1,
         -1,
         +1,
         -1,
         -1,
         -1,
         -1,
     ],
 ]
예제 #2
0
		las_time = time.clock()
		deal_step = deal_step_val
		self._desicion = (dfs(self._game))[1]

		#global deber
		#deber.cui.exec_()

		return self._desicion


if(__name__ == "__main__"):

	import game_base

	p = ChessBoard(6,6)
	p.data =  [
		[ -1, -1, -1, -1, -1, -1,],
		[ -1, -1, -1, -1, -1, -1,],
		[ -1, -1,  0, -1, -1, -1,],
		[ -1, -1, -1, -1, -1, -1,],
		[ -1, -1,  0, -1,  1, -1,],
		[ -1, -1, -1, -1, -1, -1,],
	]

	g = game_base.Game(6,6)
	g._cb = p

	print (score(g))