mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
...
This commit is contained in:
parent
aa152f40e6
commit
40a7ab9a4f
5 changed files with 4 additions and 2 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue