hh

public int getReply(int call) {
    int toReturn = -1;
    int[] toDC = {call / 10, call % 10}; //根据对方上轮叫点数,决定是继续叫点还是开点

    if (toDC[1] != 1 && this.call_One == false) { //未叫过1的情况
      if (toDC[0] == 9 && toDC[1] == 6) //a=9,b=6,100%K
        toReturn = 1;

      switch (toDC[0]) {
        case 1: case 2: case 3: //a<3 :100%J
          toReturn = 0;
          break;
        case 4: //a=4 :0.8J;0.2K
          toReturn = (this.getRand(5) < 5) ? 0 : 1;
          break;
        case 5: //a=5 : 0.5J;0.5K
          toReturn = (this.getRand(2) < 2) ? 0 : 1;
          break;
        case 6: case 7: case 8: case 9: //a>=6:(20-a)%J
          toReturn =

posted @ 2004-10-29 11:51  George.j  阅读(536)  评论(0编辑  收藏  举报