This commit is contained in:
BetaSteward 2010-10-06 02:05:54 +00:00
parent aa152f40e6
commit 40a7ab9a4f
5 changed files with 4 additions and 2 deletions

View file

@ -115,6 +115,8 @@ public class Main {
private static void deleteSavedGames() {
File directory = new File("saved/");
if (!directory.exists())
directory.mkdirs();
File[] files = directory.listFiles(
new FilenameFilter() {
@Override

View file

@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.logging.Logger;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.cards.Card;
import mage.cards.Cards;
@ -199,11 +200,10 @@ public class GameController implements GameCallback {
}
public void cheat(UUID sessionId, UUID playerId, DeckCardLists deckList) {
Player player = game.getPlayer(playerId);
Deck deck = Deck.load(deckList);
game.loadCards(deck.getCards(), playerId);
for (Card card: deck.getCards()) {
player.putOntoBattlefield(card, game);
card.putOntoBattlefield(game, Zone.OUTSIDE, playerId);
}
updateGame();
}