예제 #1
0
def test_empty_selector():
	game = prepare_game()
	game.player1.discard_hand()
	game.player2.discard_hand()
	selector = Selector(Zone.HAND)

	targets = selector.eval(game.player1.hand, game.player1)
	assert not targets
예제 #2
0
def test_empty_selector():
    game = prepare_game()
    game.player1.discard_hand()
    game.player2.discard_hand()
    selector = Selector(Zone.HAND)

    targets = selector.eval(game.player1.hand, game.player1)
    assert not targets
예제 #3
0
def test_selector():
	game = prepare_game()
	game.player1.discard_hand()
	alex = game.player1.give("EX1_561")
	selector = Selector(Race.PIRATE, Race.DRAGON) + Selector(CardType.MINION)
	assert len(selector.eval(game.player1.hand, game.player1)) >= 1

	in_hand = Selector(Zone.HAND)
	selector = in_hand + Selector(Race.DRAGON) + Selector(Affiliation.FRIENDLY)
	targets = selector.eval(game, game.player1)
	assert len(targets) == 1
	assert targets[0] == alex
예제 #4
0
def test_selector():
    game = prepare_game()
    game.player1.discard_hand()
    alex = game.player1.give("EX1_561")
    selector = Selector(Race.PIRATE, Race.DRAGON) + Selector(CardType.MINION)
    assert len(selector.eval(game.player1.hand, game.player1)) >= 1

    in_hand = Selector(Zone.HAND)
    selector = in_hand + Selector(Race.DRAGON) + Selector(Affiliation.FRIENDLY)
    targets = selector.eval(game, game.player1)
    assert len(targets) == 1
    assert targets[0] == alex