Package mage.cards.decks

Examples of mage.cards.decks.DeckCardLists


  protected int lineCount;

  @Override
  public DeckCardLists importDeck(String file) {
    File f = new File(file);
    DeckCardLists deckList = new DeckCardLists();
    lineCount = 0;
    sbMessage.setLength(0);
    try {
      Scanner scanner = new Scanner(f);
      try {
View Full Code Here


    protected StringBuilder sbMessage = new StringBuilder();
    protected int lineCount;

    public DeckCardLists importDeck(String file) {
        File f = new File(file);
        DeckCardLists deckList = new DeckCardLists();
        if (!f.exists()) {
            logger.warn("Deckfile " + file + " not found.");
            return deckList;
        }
        lineCount = 0;
View Full Code Here

    public static DeckCardLists importDeck(String file) {
        DeckImporter deckImporter = getDeckImporter(file);
        if (deckImporter != null) {
            return deckImporter.importDeck(file);
        } else {
            return new DeckCardLists();
        }
    }
View Full Code Here

     * @throws Exception
     */
    @Test
    @Ignore
    public void testStartGame() throws Exception {
        DeckCardLists deckList = createDeck();

        for (int i = 0; i < EXECUTION_COUNT; i++) {
            Connection connection = createConnection(TEST_USER_NAME + i);

            SimpleMageClient mageClient = new SimpleMageClient();
View Full Code Here

     * Tests 10 simple games played one after another.
     */
    @Test
    @Ignore
    public void testSimpleGame() throws Exception {
        final DeckCardLists deckList = createDeck();

        for (int i = 0; i < EXECUTION_COUNT_PLAY_GAME; i++) {
            final int j = i;
            Thread t = new Thread(new Runnable() {
                @Override
View Full Code Here

     * Converts deck returned by {@link #generateRandomDeck} method to {@link DeckCardLists} format.
     *
     * @return
     */
    private DeckCardLists createDeck() {
        DeckCardLists deckList = new DeckCardLists();
        Deck deck = generateRandomDeck();
        for (Card card : deck.getCards()) {
            CardInfo cardInfo = CardRepository.instance.findCard(card.getExpansionSetCode(), card.getCardNumber());
            if (cardInfo != null) {
                deckList.getCards().add(new DeckCardInfo(cardInfo.getName(), cardInfo.getCardNumber(), cardInfo.getSetCode()));
            }
        }
        return deckList;
    }
View Full Code Here

TOP

Related Classes of mage.cards.decks.DeckCardLists

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.