[mage-tests] Added synchronization between steps. Updated bdd classes for step state handling.

This commit is contained in:
magenoxx 2010-12-20 15:01:41 +03:00
parent 49eac2c737
commit 2e27a676ed
17 changed files with 96 additions and 50 deletions

View file

@ -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;
}
}