Esempio n. 1
0
def test_set_009():
    """シーン設定."""
    s = scene.Scene()
    try:
        s.set(999)
    except ValueError:
        pass
    else:
        assert False
Esempio n. 2
0
 def __init__(self, player_count=4):
     """コンストラクタ."""
     # トランプデッキ
     self._deck = trump_deck.TrumpDeck()
     # 捨て札(トランプペアリスト)
     self._trash_list = []
     # プレイヤー
     if player_count < self.MIN_PLAYER or player_count > self.MAX_PLAYER:
         raise ValueError("set player_count >= 2 and player_count <= 26")
     self._players = []
     for _ in range(player_count):
         self._players.append(old_maid_player_cpu.OldMaidPlayerCpu())
     self._player_count = player_count
     # ターン
     self._game_turn = turn.Turn(0, player_count)
     # シーン
     self._game_scene = scene.Scene()
     # 結果
     self._game_result = result.Result()
Esempio n. 3
0
def test_get_001():
    """シーン取得."""
    s = scene.Scene()
    assert s.get() == scene.Scene.INITIALIZE
Esempio n. 4
0
def test_set_007():
    """シーン設定."""
    s = scene.Scene()
    s.set(scene.Scene.CHANGE_TURN)
    assert s.get() == scene.Scene.CHANGE_TURN
Esempio n. 5
0
def test_set_008():
    """シーン設定."""
    s = scene.Scene()
    s.set(scene.Scene.END)
    assert s.get() == scene.Scene.END
Esempio n. 6
0
def test_initialize_game_001():
    """ゲーム初期化."""
    s = scene.Scene()
    s.initialize_game()
    assert s.get() == scene.Scene.INITIALIZE
Esempio n. 7
0
def test_set_006():
    """シーン設定."""
    s = scene.Scene()
    s.set(scene.Scene.PLAY_CARD)
    assert s.get() == scene.Scene.PLAY_CARD
Esempio n. 8
0
def test_set_005():
    """シーン設定."""
    s = scene.Scene()
    s.set(scene.Scene.SELECT_CARD)
    assert s.get() == scene.Scene.SELECT_CARD
Esempio n. 9
0
def test_set_003():
    """シーン設定."""
    s = scene.Scene()
    s.set(scene.Scene.DEAL_PLAY)
    assert s.get() == scene.Scene.DEAL_PLAY
Esempio n. 10
0
def test_set_001():
    """シーン設定."""
    s = scene.Scene()
    s.set(scene.Scene.INITIALIZE)
    assert s.get() == scene.Scene.INITIALIZE