def setUp(self): print('setUp') self._game = play.game_setup(3)
import play game = play.game_setup(3, 1) #一つ目の引数は総参加人数、二つ目の引数はそのうちあなたが操作するプレイヤーの人数を表します。 game.begingame()
def setUp(self): print('setUp') self._game = play.game_setup(2) self._game.beginturn(0) self._game.player[0].phaseend() self._game.player[0].phaseend()
def setUp(self): print('setUp') self._game = play.game_setup(2) for i in range(5): self._game.player[0].gaincard(5) del self._game.player[0].deck[2:]
def setUp(self): print('setUp') self._game = play.game_setup(2) self._game.field.supnumber.get(2).pile.clear() self._game.field.supnumber.get(5).pile.clear() #銅貨と屋敷のサプライの山を消す
def setUp(self): print('setUp') self._game = play.game_setup(2) self._game.beginturn(0)
#coding:UTF-8 import play game = play.game_setup(2,1) player_winpts = [0 for i in range(game.number)] for m in range(10): #対戦回数 game = play.game_setup(2,1) game.begingame() nowmax = 0 #最高点 playnum = [i for i in range(game.number)] scores = [game.player[i].victorycount() for i in range(game.number)] for (i,n) in zip(playnum,scores): if nowmax <= n: nowmax = n winnerIndex = i player_winpts[winnerIndex] += 1 print("トータル結果") print(player_winpts) #aaaaa
#coding: utf-8 import play playernum = 2 times_of_battle = 10 player_winpts = [0 for i in range(playernum)] for m in range(times_of_battle): game = play.game_setup(playernum,1) game.begingame() nowmax = 0 #最高点 playnum = [i for i in range(game.number)] scores = [game.player[i].victorycount() for i in range(game.number)] for (i, n) in zip(playnum, scores):#勝利判定は多分本来はgameクラスに書かないといけなさそう(そのうちちゃんと書きます!!!) if nowmax <= n: nowmax = n winnerIndex = i player_winpts[winnerIndex] += 1 print("トータル結果") print(player_winpts)