Exemplo n.º 1
0
 public static Boolean ExistDirtyCard(CardGameBean game) {
   for (CardDeckBean site : game.getDeck().values()) {
     for (CardBean card : site.getCardMap().values()) {
       if (card.getDirtyFlag() > 0) return true;
     }
   }
   return false;
 }
Exemplo n.º 2
0
 public static void GenCardSource(CardGameBean gameBean, int playerID) {
   CardDeckBean site = gameBean.getDeck().get(playerID);
   if (site == null) return;
   List<Integer> Cards = new ArrayList<Integer>();
   for (int i = 0; i < _cardStore.length; i++) {
     Cards.add(_cardStore[i]);
   }
   //		List<Integer> washCards = WashCard(Cards);
   //		site.setCardSource(washCards);
   site.setCardSource(Cards);
 }
Exemplo n.º 3
0
 public static void InitCardSite(CardGameBean gameBean, int playerID) {
   GenCardSource(gameBean, playerID);
   CardDeckBean site = gameBean.getDeck().get(playerID);
   if (site == null) return;
   site.setEmptyCardMap();
   gameBean.AddCard(playerID, 20001, CardBean.HERO_ZONE_ID);
   for (int i = 0; i < Constants.DEFAULT_HAND_CARD_NUM; i++) {
     Integer cardID = site.getDrawCard();
     gameBean.AddCard(playerID, cardID, CardBean.HAND_ZONE_ID);
   }
 }
Exemplo n.º 4
0
 public static void InitGameCard(CardGameBean newGame) {
   for (CardDeckBean site : newGame.getDeck().values()) {
     InitCardSite(newGame, site.getPlayerID());
   }
 }