Examples of Deck


Examples of fr.umlv.card.Deck

import fr.umlv.card.Deck;
import static fr.umlv.card.Suit.*;

public class Main {
    public static void main(String[] args) {
        Deck deck1 = Deck.fromCardsNumberAndColors(2, SPADE, HEART);
        Deck deck2 = Deck.fromCardsNumberAndColors(2, CLUB, HEART);
        System.out.println(deck1.toString());
        System.out.println(deck2.toString());

        System.out.println(deck1.equals(deck2));
    }
View Full Code Here

Examples of fr.umlv.card.Deck

import fr.umlv.card.Deck;
import static fr.umlv.card.Suit.*;

public class Main {
    public static void main(String[] args) {
        Deck deck = Deck.fromCardsNumberAndColors(2, 2, SPADE, HEART);
        System.out.println(deck.getCardsList());
    }
View Full Code Here

Examples of fr.umlv.card.Deck

import static fr.umlv.card.Suit.*;
import fr.umlv.card.Deck;

public class Main {
    public static void main(String[] args) {
        Deck deck1 = Deck.fromCardsNumberAndColors(2, 2, SPADE, HEART);
        System.out.println(deck1.getCardsList());
        try {
            Deck deck2 = deck1.split()[0];
            Deck deck3 = deck1.split()[1];
            System.out.println(deck2.getCardsList());
            System.out.println(deck3.getCardsList());
        } catch (Exception e) {
            System.out.println(e);
        }
    }
View Full Code Here

Examples of game.Deck

    /**
     * Creates the behaviors and PlayerController used in the game
     */
    public WarController()
    {
        Deck dk = Deck.getInstance();
        dk.reset();
        dk.shuffle();
        timer = WarTimer.getInstance();

        CheatingBehavior player1 = new NotCheating();
        CheatingBehavior player2 = new Cheating();
        playerCon = new PlayerController(player1, player2);
View Full Code Here

Examples of handevaluator.Deck

public class BulkTests {
  private static final int TRIALS = 15000000;
  private static final File DAGFILE = new File("carddag");

  public static void runtests(HandEvaluator he, int trials) {
    Deck d = new Deck();
    long ts = System.currentTimeMillis();
    for (int i=0; i < trials; i++) {
      if ((i+1) % 1000000 == 0) {
        System.out.println((System.currentTimeMillis() - ts) + "ms, evaluated " + ((i+1) / 1000000) + " million hands");
      }
      d.randomHand();
      he.calculateEquivalenceClass(d.getBytes());
    }
    System.out.println(he.getClass().getName() + ", " + trials + " trials: " + (System.currentTimeMillis() - ts) + "ms elapsed");
  }
View Full Code Here

Examples of handevaluator.Deck

    }
    System.out.println(he.getClass().getName() + ", " + trials + " trials: " + (System.currentTimeMillis() - ts) + "ms elapsed");
  }
 
  public static void overhead(int trials) {
    Deck d = new Deck();
    long ts = System.currentTimeMillis();
    for (int i=0; i < trials; i++) {
      if ((i+1) % 1000000 == 0) {
        System.out.println((System.currentTimeMillis() - ts) + "ms, evaluated " + ((i+1) / 1000000) + " million hands");
      }
      d.randomHand();
    }
    System.out.println("Overhead of " + trials + " trials: " + (System.currentTimeMillis() - ts) + "ms elapsed");   
  }
View Full Code Here

Examples of jimmm.data.Deck

import jimmm.data.Deck;

public class CardAndDeckTest {

  public static void main(String[] args) {
    Deck d = new Deck();
    System.out.println(d);
    System.out.println(d.getDeckSize());
   
  }
View Full Code Here

Examples of mage.cards.decks.Deck

      } catch (IOException ex) {  }
    }
  }//GEN-LAST:event_btnSaveActionPerformed

  private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewActionPerformed
    deck = new Deck();
    refreshDeck();
  }//GEN-LAST:event_btnNewActionPerformed
View Full Code Here

Examples of mage.cards.decks.Deck

    return selectedColors;
  }

  protected static void buildDeck() {
    deck = new Deck();
    List<ColoredManaSymbol> allowedColors = new ArrayList<ColoredManaSymbol>();
    selectedColors = selectedColors.toUpperCase();
    for (int i = 0; i < selectedColors.length(); i++) {
      char c = selectedColors.charAt(i);
      allowedColors.add(ColoredManaSymbol.lookup(c));
View Full Code Here

Examples of mage.cards.decks.Deck

     *
     * @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()));
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.