public void build(byte[] data)
        {
            ByteBuffer buf = ByteBuffer.wrap(data);

            for (int i = 0; i < this.__flag.Length; i++)
            {
                this.__flag[i] = buf.get();
            }

            if (this.hasSize())
            {
                this.size = buf.getInt();
            }

            if (this.hasIndex())
            {
                this.index = buf.getInt();
            }

            if (this.hasType())
            {
                this.type = buf.getInt();
            }

            if (this.hasMahjongStatus())
            {
                this.mahjong_status = (PAIGOW_STATUS)buf.get();
            }
        }
Exemple #2
0
 public void SetPoker(PaiJiu.Poker poker)
 {
     this.index  = poker.index;
     this.size   = poker.size;
     this.type   = poker.type;
     this.status = poker.status;
 }
Exemple #3
0
 public Poker(int index, int size, int type, PAIGOW_STATUS status)
 {
     this.index  = index;
     this.size   = size;
     this.type   = type;
     this.status = status;
 }
Exemple #4
0
 public void SetPoker(PAIGOW_MAHJONG poker)
 {
     if (poker.hasIndex())
     {
         this.index = poker.index;
     }
     if (poker.hasSize())
     {
         this.size = poker.size;
     }
     if (poker.hasType())
     {
         this.type = poker.type;
     }
     if (poker.hasMahjongStatus())
     {
         this.status = poker.mahjong_status;
     }
 }
Exemple #5
0
 public void DefaultValue( )
 {
     this.size   = 0;
     this.type   = 0;
     this.status = PAIGOW_STATUS.HIDE;
 }