forked from External/mage
[mage-tests] Added synchronization between steps. Updated bdd classes for step state handling.
This commit is contained in:
parent
49eac2c737
commit
2e27a676ed
17 changed files with 96 additions and 50 deletions
|
|
@ -235,14 +235,17 @@ public class GameController implements GameCallback {
|
|||
updateGame();
|
||||
}
|
||||
|
||||
public void cheat(UUID sessionId, UUID playerId, String cardName) {
|
||||
public boolean cheat(UUID sessionId, UUID playerId, String cardName) {
|
||||
String clazz = Sets.findCard(cardName);
|
||||
if (clazz != null) {
|
||||
Card card = CardImpl.createCard(clazz);
|
||||
Set<Card> cards = new HashSet<Card>();
|
||||
cards.add(card);
|
||||
game.loadCards(cards, playerId);
|
||||
updateGame();
|
||||
card.moveToZone(Zone.HAND, null, game, false);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue