Examples of Card


Examples of Project1.Game.Card

      // Populate a list of Cards with data from the file
      Card.Collection = new LinkedList<Card>();
      JSONArray objects = imgMap.getJSONArray("Objects");
      for (int i = 0; i < objects.length(); ++i) {
        JSONObject obj = objects.getJSONObject(i);
        Card.Collection.add(new Card(obj));
      }
     
      // Load other utility clips
      Card.Clips = new HashMap<String, OggClip>();
      Card.Clips.put("Start", Card.makeOGG("ogg/start.ogg"));
View Full Code Here

Examples of Utils.Card

        for(int i=0; i<prfMain.getCardNumber(); i++)
        {
            Enumeration<Card> enCard=profile.getCards();
            while(enCard.hasMoreElements())
            {
                Card crdTemp=enCard.nextElement();
                if(crdTemp.getOrdNumber()==i)
                {
                    LoadCard(crdTemp, false);
                    break;
                }
            }
View Full Code Here

Examples of au.edu.mq.itec802.cardGame.Card

   */
  public void shuffle(int alot) {
    // generate
    for (int i = 0; i < 4; i++) {
      for (int j = 2; j <= 10; j++)
        cards.add(new Card(j, j + " of " + suits.get(i), false));
      for (int j = 0; j < 3; j++)
        cards.add(new Card(10, highCards.get(j) + " of " + suits.get(i),
            false));
      cards.add(new Card(1, "Ace of " + suits.get(i), true));
    }
    // shuffle
    Card card = null;
    int index = 0;
    int index2 = 0;
    int seed = (int) (Math.random() * alot * Math.random() * alot);
    // System.out.print("Shuffling ...");
    for (int i = 0; i < seed; i++) {
View Full Code Here

Examples of belotetime.application.game.Card

  private Pack packet;
 
  public TestPack()
  {
    ArrayList<Card> listCards = new ArrayList<>();
        listCards.add(new Card("Sept", "Coeur", 0));
        listCards.add(new Card("Huit", "Coeur", 0));
        listCards.add(new Card("Neuf", "Coeur", 0));
        listCards.add(new Card("Dix", "Coeur", 10));
        listCards.add(new Card("Valet", "Coeur", 2));
        listCards.add(new Card("Dame", "Coeur", 3));
        listCards.add(new Card("Roi", "Coeur", 4));
        listCards.add(new Card("As", "Coeur", 11));
        listCards.add(new Card("Sept", "Tr�fle", 0));
        listCards.add(new Card("Huit", "Tr�fle", 0));
        listCards.add(new Card("Neuf", "Tr�fle", 0));
        listCards.add(new Card("Dix", "Tr�fle", 10));
        listCards.add(new Card("Valet", "Tr�fle", 2));
        listCards.add(new Card("Dame", "Tr�fle", 3));
        listCards.add(new Card("Roi", "Tr�fle", 4));
        listCards.add(new Card("As", "Tr�fle", 11));
        listCards.add(new Card("Sept", "Carreau", 0));
        listCards.add(new Card("Huit", "Carreau", 0));
        listCards.add(new Card("Neuf", "Carreau", 0));
        listCards.add(new Card("Dix", "Carreau", 10));
        listCards.add(new Card("Valet", "Carreau", 2));
        listCards.add(new Card("Dame", "Carreau", 3));
        listCards.add(new Card("Roi", "Carreau", 4));
        listCards.add(new Card("As", "Carreau", 11));
        listCards.add(new Card("Sept", "Pique", 0));
        listCards.add(new Card("Huit", "Pique", 0));
        listCards.add(new Card("Neuf", "Pique", 0));
        listCards.add(new Card("Dix", "Pique", 10));
        listCards.add(new Card("Valet", "Pique", 2));
        listCards.add(new Card("Dame", "Pique", 3));
        listCards.add(new Card("Roi", "Pique", 4));
        listCards.add(new Card("As", "Pique", 11));
       
        packet = new Pack(listCards);
  }
View Full Code Here

Examples of bluffinmuffin.game.entities.Card

                    else
                    {
                        p.setNotPlaying();
                    }
                    final List<Integer> ids = command.getCardsId();
                    final Card gc0 = Card.getInstance(ids.get(0));
                    final Card gc1 = Card.getInstance(ids.get(1));
                    p.setCards(gc0, gc1);
                    m_gameObserver.playerHoleCardsChanged(p);
                }
            }
           
View Full Code Here

Examples of cards.Card

   * @param hand
   * @param features
   * @return
   */
  public int answer(int hand,List<Features> features){  // 1 o dos caracteristicas en cartas monje // true si va a la mano false si va ala hoja de sospechosos
    Card pibot = new Monje();
    int cont = 0;
    if(hand==1){
      for(Card monje:cartasMonje){
        if(monje.getClass().equals(pibot.getClass()))
          if(((Monje) monje).is(features))cont++;
      }
    }
    else if(hand==2){
      for(Sospechoso sospechoso:hojaSospechosos){
View Full Code Here

Examples of cards.Card

     cartasMonje.add(card);
  }
 
  public boolean answer(int hand,String nombre){
    boolean check=false;
    Card pibot = new Monje();
    if(hand==1){
      for(Card monje:cartasMonje){
        if(monje.getClass().equals(pibot.getClass()))
        if(nombre.equals(((Monje) monje).getName()))check = true;
      }
    }
    else if(hand==2){
      for(Sospechoso sospechoso:hojaSospechosos){
View Full Code Here

Examples of cards.Card

    return check;
  }

  public  Monje getMonkCardX(int position) throws NullPointerException{
    int cont = 0;
    Card pibot = new Monje();
    Monje temp=null;
    for (Card n : cartasMonje ){
      if (cont == position)  
        if(n.getClass().equals(pibot.getClass()))
          temp= (Monje) n;
      cont++;      
    }
    cartasMonje.remove(temp);
View Full Code Here

Examples of cards.Card

  public void setCartasMonje(Set<Monje> cartasMonjeJugador){
    this.cartasMonje=new TreeSet<Card>(cartasMonjeJugador);
  }
  public Monje getLastMonkCardInPlayersCardDeck(){
    Monje aDevolver=null;
    Card pibot = new Monje();
    for (Card p:cartasMonje)
      if(p.getClass().equals(pibot.getClass()))
      aDevolver=(Monje) p;
    cartasMonje.remove(aDevolver);
    //if (aDevolver!=null)
    return aDevolver;
  }
View Full Code Here

Examples of cero.games.Card

   *            the index of the first card to swap
   * @param j
   *            the index of the second card to swap
   */
  private void swap(List<Card> list, int i, int j) {
    Card t = list.get(i);
    list.set(i, list.get(j));
    list.set(j, t);
  }
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.