コード例 #1
0
ファイル: test_starter.py プロジェクト: rareshana/Dominion
 def setUp(self):
     print('setUp')
     self._game = play.game_setup(3)
コード例 #2
0
ファイル: play_start.py プロジェクト: domishana/Domi
import play

game = play.game_setup(3, 1)  #一つ目の引数は総参加人数、二つ目の引数はそのうちあなたが操作するプレイヤーの人数を表します。
game.begingame()
コード例 #3
0
 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()
コード例 #4
0
ファイル: test_player.py プロジェクト: rareshana/Dominion
 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:]
コード例 #5
0
ファイル: test_gaincard.py プロジェクト: rareshana/Dominion
 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()  #銅貨と屋敷のサプライの山を消す
コード例 #6
0
 def setUp(self):
     print('setUp')
     self._game = play.game_setup(2)
     self._game.beginturn(0)
コード例 #7
0
ファイル: play4value.py プロジェクト: sensuialex/test
#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
コード例 #8
0
ファイル: play4value.py プロジェクト: domishana/Domi
#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)