查看: 4626| 回复: 13
跳转到指定楼层
上一主题 下一主题
收起左侧

Stanford CS106A #5 Assignment5讨论帖

全局:
时间:2012.8.11-2012.8.14

课程:
17. Arrays in Java
18. The ArrayList Class
19. The HashMap Class
20. GUI

作业:
Assignment 4 Yahtzee.java
due: 2012.8.14


单选投票, 共有 17 人参与投票
您所在的用户组没有投票权限

评分

参与人数 1大米 +3 收起 理由
LLLLLin + 3 给你点个赞!

查看全部评分


上一篇:[Udacity CS 262] Programming Languages (Week #4)
下一篇:[Udacity CS215 Algorithms]最后一堂课,唱歌版graph search和其他推荐
🔗
 楼主| yiyiyaya 2012-8-7 17:23:08 | 只看该作者
全局:
这个我编不出啊!!!!Three of a kind之类的怎么弄啊
回复

使用道具 举报

🔗
zhuolinliu8 2012-8-7 17:27:30 | 只看该作者
全局:
Yahtzee.java
  1. /*
  2. * File: Yahtzee.java
  3. * ------------------
  4. * This program will eventually play the Yahtzee game.
  5. */

  6. import acm.io.*;
  7. import acm.program.*;
  8. import acm.util.*;

  9. public class Yahtzee extends GraphicsProgram implements YahtzeeConstants {
  10.         public void run() {
  11.                 setupPlayers();
  12.                 initDisplay();
  13.                 playGame();
  14.         }
  15.        
  16.         /**
  17.          * Prompts the user for information about the number of players, then sets up the
  18.          * players array and number of players.
  19.          */
  20.         private void setupPlayers() {
  21.                 nPlayers = chooseNumberOfPlayers();       
  22.                
  23.                 /* Set up the players array by reading names for each player. */
  24.                 playerNames = new String[nPlayers];
  25.                 for (int i = 0; i < nPlayers; i++) {
  26.                         /* IODialog is a class that allows us to prompt the user for information as a
  27.                          * series of dialog boxes.  We will use this here to read player names.
  28.                          */
  29.                         IODialog dialog = getDialog();
  30.                         playerNames[i] = dialog.readLine("Enter name for player " + (i + 1));
  31.                 }
  32.         }
  33.        
  34.         /**
  35.          * Prompts the user for a number of players in this game, reprompting until the user
  36.          * enters a valid number.
  37.          *
  38.          * @return The number of players in this game.
  39.          */
  40.         private int chooseNumberOfPlayers() {
  41.                 /* See setupPlayers() for more details on how IODialog works. */
  42.                 IODialog dialog = getDialog();
  43.                
  44.                 while (true) {
  45.                         /* Prompt the user for a number of players. */
  46.                         int result = dialog.readInt("Enter number of players");
  47.                        
  48.                         /* If the result is valid, return it. */
  49.                         if (result > 0 && result <= MAX_PLAYERS)
  50.                                 return result;
  51.                        
  52.                         dialog.println("Please enter a valid number of players.");
  53.                 }
  54.         }
  55.        
  56.         /**
  57.          * Sets up the YahtzeeDisplay associated with this game.
  58.          */
  59.         private void initDisplay() {
  60.                 display = new YahtzeeDisplay(getGCanvas(), playerNames);
  61.         }

  62.         /**
  63.          * Actually plays a game of Yahtzee.  This is where you should begin writing your
  64.          * implementation.
  65.          */
  66.         private void playGame(){
  67.                 totalScore = new int[nPlayers];
  68.                 upperScore = new int[nPlayers];
  69.                 used_category = new boolean[nPlayers][17];
  70.                
  71.                 for(int round = 1; round <= 14; round++){       
  72.                         for(int i = 0; i< nPlayers; i++){
  73.                                 /** First round */
  74.                                 display.printMessage(playerNames[i] + "'s turn! Click \"Roll Dice\"button to roil the dice ");
  75.                                 display.waitForPlayerToClickRoll(i);
  76.                                 for(int dice_num = 0; dice_num < N_DICE; dice_num++){
  77.                                         dice_ar[dice_num] = rgen.nextInt(1,6);
  78.                                 }
  79.                                 display.displayDice(dice_ar);
  80.                        
  81.                                 /** Next two rounds */
  82.                                 for(int ch_round=0; ch_round<2; ch_round++){
  83.                                         display.printMessage("Select the dice you wish to re-roll and click \"Roll Again\".");
  84.                                         display.waitForPlayerToSelectDice();
  85.                                         for(int dice_chosed = 0; dice_chosed < N_DICE; dice_chosed++){
  86.                                                 if(display.isDieSelected(dice_chosed))
  87.                                                         dice_ar[dice_chosed] = rgen.nextInt(1,6);
  88.                                         }
  89.                                         display.displayDice(dice_ar);
  90.                                 }
  91.                                 choseCategory(i);
  92.                         }
  93.                 }
  94.                 judgeWinner();
  95.         }
  96.        
  97.         /** Select category and update total scores */
  98.         private void choseCategory(int i){
  99.                 int category;
  100.                 /** Check if category has been scored */
  101.                 display.printMessage("Select a category for this roll.");
  102.                 do{
  103.                         category = display.waitForPlayerToSelectCategory();
  104.                 }while(used_category[i][category]);
  105.                 used_category[i][category] = true;
  106.                
  107.                 int score = computeScore(dice_ar,category);
  108.                 display.updateScorecard(category, i, score);
  109.                 totalScore[i] += score;
  110.                 display.updateScorecard(16, i, totalScore[i]);
  111.                 if( category < 6 ) upperScore[i]+= score;
  112.         }

  113.         /** Compute scores to update scorecard */
  114.         private int computeScore(int ar_dice[],int category){
  115.                 int scores = 0;
  116.                 if(category < 6) category++; else category--; //adjust
  117.                 /* n's */
  118.                 if ( category >=1 && category<=6){
  119.                         for(int i=0; i<N_DICE; i++)
  120.                                 if ( ar_dice[i] == category)
  121.                                         scores += category;
  122.                         return scores;
  123.                 }else{               
  124.                         int[] kind = new int[6];
  125.                         int dice_sum = 0, num_kind = 0;
  126.                         boolean flag = false;
  127.                        
  128.                         for(int i=0; i<N_DICE; i++){
  129.                                 if(kind[ar_dice[i]-1] == 0) num_kind++;
  130.                                 dice_sum += ar_dice[i];
  131.                                 kind[ar_dice[i]-1]++;
  132.                                 if((kind[ar_dice[i]-1]>=3 && category==7)||(kind[ar_dice[i]-1]==4 && category==8))
  133.                                         flag = true;
  134.                         }
  135.                         /* Compute 7,8,9,12,13 */
  136.                         if ((category==7 || category==8  && flag) || category==13) return dice_sum;
  137.                         if (category == 12 && num_kind == 1) return 50; //Yahtzee
  138.                         if (category == 9 && num_kind == 2) return 25; //House
  139.                        
  140.                         /* Compute 10,11 */
  141.                         if( category == 10 || category == 11){
  142.                                 int straight=0,st_temp= 0;
  143.                                 for(int i = 0; i < 6; i++)
  144.                                         if(kind[i] > 0) st_temp++;
  145.                                                 else if(st_temp > straight) straight = st_temp;
  146.                                 if(st_temp > straight) straight = st_temp;
  147.                                 if(category == 10 && straight >= 4) return 30;
  148.                                 else if (straight == 5) return 40;
  149.                         }
  150.                 }
  151.                 return scores;
  152.         }
  153.        
  154.         /** Judge who is the winner */
  155.         private void judgeWinner(){
  156.                 int winner = 0;
  157.                
  158.                 for(int i=0; i<nPlayers; i++){
  159.                         display.updateScorecard(6, i, upperScore[i]);
  160.                         display.updateScorecard(15, i, totalScore[i]-upperScore[i]);
  161.                         if(upperScore[i] > 63) {
  162.                                 totalScore[i] += 35;
  163.                                 display.updateScorecard(7, i, 35);
  164.                                 display.updateScorecard(16, i, totalScore[i]);
  165.                         }else display.updateScorecard(7, i, 0);
  166.                         if(totalScore[i] > totalScore[winner]) winner = i;
  167.                 }
  168.                 display.printMessage("Congratulations,"+playerNames[winner]+",you're the winner " +
  169.                                 "with a total score of "+totalScore[winner]+"!");
  170.         }
  171.        
  172.         /* Private instance variables */
  173.         private int nPlayers;
  174.         private String[] playerNames;
  175.         private YahtzeeDisplay display;
  176.         private RandomGenerator rgen = RandomGenerator.getInstance();
  177.         private int[] dice_ar = new int[N_DICE];
  178.         private int[] totalScore;
  179.         private int[] upperScore;
  180.         private boolean[][] used_category;
  181. }
复制代码
YahtzeeConstants.java
  1. /*
  2. * File: YahtzeeConstants.java
  3. * ---------------------------
  4. * This file declares several constants that are shared by the
  5. * different modules in the Yahtzee game.
  6. */

  7. public interface YahtzeeConstants {
  8.         /** The width of the application window */
  9.         public static final int APPLICATION_WIDTH = 600;

  10.         /** The height of the application window */
  11.         public static final int APPLICATION_HEIGHT = 350;

  12.         /** The number of dice in the game */
  13.         public static final int N_DICE = 5;

  14.         /** The maximum number of players */
  15.         public static final int MAX_PLAYERS = 4;

  16.         /** The total number of categories */
  17.         public static final int N_CATEGORIES = 17;

  18.         /** The number of categories in which the player can score */
  19.         public static final int N_SCORING_CATEGORIES = 13;

  20.         /** The constants that specify categories on the scoresheet */
  21.         public static final int ONES = 0;
  22.         public static final int TWOS = 1;
  23.         public static final int THREES = 2;
  24.         public static final int FOURS = 3;
  25.         public static final int FIVES = 4;
  26.         public static final int SIXES = 5;
  27.         public static final int UPPER_SCORE = 6;
  28.         public static final int UPPER_BONUS = 7;
  29.         public static final int THREE_OF_A_KIND = 8;
  30.         public static final int FOUR_OF_A_KIND = 9;
  31.         public static final int FULL_HOUSE = 10;
  32.         public static final int SMALL_STRAIGHT = 11;
  33.         public static final int LARGE_STRAIGHT = 12;
  34.         public static final int YAHTZEE = 13;
  35.         public static final int CHANCE = 14;
  36.         public static final int LOWER_SCORE = 15;
  37.         public static final int TOTAL = 16;
  38. }
复制代码
回复

使用道具 举报

🔗
zhuolinliu8 2012-8-7 17:29:33 | 只看该作者
全局:
yiyiyaya 发表于 2012-8-7 17:23
这个我编不出啊!!!!Three of a kind之类的怎么弄啊

遍历骰子一次,把该统计的什么有几个kind,straight都统计好。。。建一个6个元素的数组。。就跟散列表一样的往里面放元素,kind[i] = 3 就是 three of a kind
回复

使用道具 举报

🔗
 楼主| yiyiyaya 2012-8-7 17:30:01 | 只看该作者
全局:
zhuolinliu8 发表于 2012-8-7 17:27
Yahtzee.javaYahtzeeConstants.java

你是不所有assignment都已经写好了啊
回复

使用道具 举报

🔗
zhuolinliu8 2012-8-7 22:41:08 | 只看该作者
全局:
yiyiyaya 发表于 2012-8-7 17:30
你是不所有assignment都已经写好了啊

恩 我也是刚学java,不过用c编了挺久了 因为后天要飞了 所以赶紧编完 加油啊!!
回复

使用道具 举报

🔗
 楼主| yiyiyaya 2012-8-8 19:44:33 | 只看该作者
全局:
zhuolinliu8 发表于 2012-8-7 22:41
恩 我也是刚学java,不过用c编了挺久了 因为后天要飞了 所以赶紧编完 加油啊!!

呵呵,后天就飞了啊!一切顺利!!!我8.26才走呢。感觉你编程很厉害啊!向你学习!我好多逻辑在编之前想不通
回复

使用道具 举报

🔗
jasonilove 2012-8-15 19:13:00 | 只看该作者
全局:
终于赶上大家进度了,这次编的感觉好粗糙啊
Yahtzee.java
  1. /*
  2. * File: Yahtzee.java
  3. * ------------------
  4. * This program will eventually play the Yahtzee game.
  5. */

  6. import acm.io.*;
  7. import acm.program.*;
  8. import acm.util.*;

  9. public class Yahtzee extends GraphicsProgram implements YahtzeeConstants {
  10.        

  11.        
  12.         public static void main(String[] args) {
  13.                 new Yahtzee().start(args);
  14.         }
  15.        
  16.         public void run() {
  17.                 IODialog dialog = getDialog();
  18.                 nPlayers = dialog.readInt("Enter number of players");
  19.                 playerNames = new String[nPlayers];
  20.                 scores=new int[TOTAL][nPlayers];
  21.                 for (int i = 1; i <= nPlayers; i++) {
  22.                         playerNames[i - 1] = dialog.readLine("Enter name for player " + i);
  23.                 }
  24.                 display = new YahtzeeDisplay(getGCanvas(), playerNames);
  25.                 playGame();
  26.         }

  27.         private void playGame() {
  28.                 initiateScores();
  29.                 for(int i=0;i<13;i++){
  30.                         for(int j=0;j<nPlayers;j++){
  31.                                 display.printMessage(playerNames[j]+"'s turn! Click the "+'\"'+"Roll Dice"+'\"'+" button to roll the dice.");
  32.                                 display.waitForPlayerToClickRoll(j+1);
  33.                                 rollTheDices();
  34.                                 display.printMessage("Select the dice you wish to re-roll and click "+'\"'+"Roll Again"+'\"');
  35.                                 rollTheDicesAgain();
  36.                                 display.printMessage("Select a category for this roll");
  37.                                 int category=checkTheCategory(j+1);
  38.                                 int scoreOfPlayer=0;
  39.                                 if(checkCategory(category)){
  40.                                         scoreOfPlayer=calculateScore(category);
  41.                                 }
  42.                                 scores[category-1][j]=scoreOfPlayer;
  43.                                 if(scores[TOTAL-1][j]==-1){scores[TOTAL-1][j]=0;}
  44.                                 scores[TOTAL-1][j]+=scoreOfPlayer;
  45.                                 display.updateScorecard(category, j+1, scoreOfPlayer);
  46.                                 display.updateScorecard(TOTAL, j+1, scores[TOTAL-1][j]);

  47.                        
  48.                         }
  49.                 }
  50.                 int[] sumUp=new int[nPlayers];
  51.                 int[] sumDown=new int[nPlayers];
  52.                 for(int i=0;i<nPlayers;i++){
  53.                         for(int j=ONES-1;j<SIXES;j++){
  54.                                 sumUp[i]+=scores[j][i];
  55.                         }
  56.                         scores[UPPER_SCORE-1][i]=sumUp[i];
  57.                         display.updateScorecard(UPPER_SCORE, i+1, scores[UPPER_SCORE-1][i]);
  58.                         if(scores[UPPER_SCORE-1][i]>=63){
  59.                                 scores[UPPER_BONUS-1][i]=35;
  60.                         }
  61.                         else{scores[UPPER_BONUS-1][i]=0;}
  62.                         display.updateScorecard(UPPER_BONUS, i+1, scores[UPPER_BONUS-1][i]);
  63.                         for(int j=THREE_OF_A_KIND-1;j<CHANCE;j++){
  64.                                 sumDown[i]+=scores[j][i];
  65.                         }
  66.                         scores[LOWER_SCORE-1][i]=sumDown[i];
  67.                         display.updateScorecard(LOWER_SCORE, i+1, scores[LOWER_SCORE-1][i]);
  68.                         scores[TOTAL-1][i]=scores[LOWER_SCORE-1][i]+scores[UPPER_BONUS-1][i]+scores[UPPER_SCORE-1][i];
  69.                         display.updateScorecard(TOTAL, i+1,scores[TOTAL-1][i]);
  70.                 }
  71.                
  72.                 int max=0;
  73.                 for(int i=1;i<nPlayers;i++){
  74.                         if(scores[TOTAL-1][i]>scores[TOTAL-1][max]){
  75.                                 max=i;
  76.                         }
  77.                 }
  78.                 display.printMessage("Congratulations,"+playerNames[max]+",you're the winner with at total score of "+scores[TOTAL-1][max]+"!");
  79.                
  80.         }
  81.        
  82.         private boolean checkCategory(int category){
  83.                 switch(category){
  84.                 case THREE_OF_A_KIND:
  85.                         for(int i=0;i<3;i++){
  86.                                 int counter=0;
  87.                                 for(int j=i+1;j<5;j++){
  88.                                         if(dice[i]==dice[j]){
  89.                                                 counter++;
  90.                                         }
  91.                                         if(counter==2){
  92.                                                 return true;
  93.                                         }
  94.                                 }
  95.                         }
  96.                         return false;
  97.                 case FOUR_OF_A_KIND:
  98.                         for(int i=0;i<2;i++){
  99.                                 int counter=0;
  100.                                 for(int j=i+1;j<5;j++){
  101.                                         if(dice[i]==dice[j]){
  102.                                                 counter++;
  103.                                         }
  104.                                         if(counter==3){
  105.                                                 return true;
  106.                                         }
  107.                                 }
  108.                         }
  109.                         return false;
  110.                 case YAHTZEE:
  111.                         int counter=0;
  112.                         for(int j=1;j<5;j++){
  113.                                 if(dice[0]==dice[j]){
  114.                                         counter++;
  115.                                 }
  116.                                 if(counter==4){
  117.                                         return true;
  118.                                 }
  119.                         }
  120.                         return false;
  121.                 case FULL_HOUSE:
  122.                         int counter1=0;
  123.                         int counter2=0;
  124.                         int j=0;
  125.                         for(int i=1;i<5;i++){
  126.                                 if(dice[0]==dice[i]){
  127.                                         counter1++;
  128.                                 }
  129.                                 if(dice[0]!=dice[i]){
  130.                                         j=i;
  131.                                 }
  132.                         }
  133.                         for(int i=1;i<5;i++){
  134.                                 if(dice[j]==dice[i]){
  135.                                         counter2++;
  136.                                 }                               
  137.                         }
  138.                         if(j==0){return true;}
  139.                         if(counter1==1&&counter2==3){return true;}
  140.                         if(counter1==2&&counter2==2){return true;}
  141.                         return false;
  142.                 case SMALL_STRAIGHT:
  143.                         if(diceHave(3)&&diceHave(4)){
  144.                                 if(diceHave(1)&&diceHave(2)){
  145.                                         return true;
  146.                                 }
  147.                                 if(diceHave(2)&&diceHave(5)){
  148.                                         return true;
  149.                                 }
  150.                                 if(diceHave(5)&&diceHave(6)){
  151.                                         return true;
  152.                                 }
  153.                         }
  154.                         else{
  155.                                 return false;
  156.                         }
  157.                        
  158.                 case LARGE_STRAIGHT:
  159.                         if(diceHave(2)&&diceHave(3)&&diceHave(4)&&diceHave(5)){
  160.                                 if(diceHave(1)||diceHave(6)){
  161.                                         return true;
  162.                                 }
  163.                         }
  164.                         return false;
  165.                        
  166.                 default: return true;
  167.                 }
  168.         }
  169.        
  170.         private boolean diceHave(int face){
  171.                 for(int i=0;i<5;i++){
  172.                         if(dice[i]==face){
  173.                                 return true;
  174.                         }
  175.                 }
  176.                 return false;
  177.         }
  178.        
  179.         private int calculateScore(int category){
  180.                 int scoreOfPlayer=0;
  181.                 switch(category){
  182.                 case 1:for(int i=0;i<N_DICE;i++){
  183.                         if(dice[i]==1){
  184.                                 scoreOfPlayer++;
  185.                         }
  186.                 }
  187.                 return scoreOfPlayer;
  188.                 case 2:for(int i=0;i<N_DICE;i++){
  189.                         if(dice[i]==2){
  190.                                 scoreOfPlayer+=2;
  191.                         }
  192.                 }
  193.                 return scoreOfPlayer;
  194.                 case 3:for(int i=0;i<N_DICE;i++){
  195.                         if(dice[i]==3){
  196.                                 scoreOfPlayer+=3;
  197.                         }
  198.                 }
  199.                 return scoreOfPlayer;
  200.                 case 4:for(int i=0;i<N_DICE;i++){
  201.                         if(dice[i]==4){
  202.                                 scoreOfPlayer+=4;
  203.                         }
  204.                 }
  205.                 return scoreOfPlayer;
  206.                 case 5:for(int i=0;i<N_DICE;i++){
  207.                         if(dice[i]==5){
  208.                                 scoreOfPlayer+=5;
  209.                         }
  210.                 }
  211.                 return scoreOfPlayer;

  212.                 case 6:for(int i=0;i<N_DICE;i++){
  213.                         if(dice[i]==6){
  214.                                 scoreOfPlayer+=6;
  215.                         }
  216.                 }
  217.                 return scoreOfPlayer;               
  218.                 case FULL_HOUSE: return 25;
  219.                 case SMALL_STRAIGHT: return 30;
  220.                 case LARGE_STRAIGHT: return 40;
  221.                 case YAHTZEE:return 50;
  222.                 default: for(int i=0;i<N_DICE;i++){
  223.                                 scoreOfPlayer+=dice[i];
  224.                         }
  225.                 return scoreOfPlayer;
  226.                 }
  227.                
  228.         }
  229.        
  230.         private void initiateScores(){
  231.                 for(int i=0;i<scores.length;i++){
  232.                         for(int j=0;j<scores[0].length;j++){
  233.                                 scores[i][j]=-1;
  234.                         }
  235.                 }
  236.         }
  237.        
  238.         private int checkTheCategory(int player){
  239.                 int i;
  240.                 while(true){
  241.                         i=display.waitForPlayerToSelectCategory();
  242.                         if(scores[i-1][player-1]==-1){
  243.                                 if(i>=ONES&&i<=SIXES)break;
  244.                                 if(i>=THREE_OF_A_KIND&&i<=CHANCE)break;
  245.                         }
  246.                 }
  247.                 return i;
  248.         }
  249.        

  250.         private void rollTheDicesAgain(){
  251.                 for(int k=0;k<2;k++){
  252.                         display.waitForPlayerToSelectDice();
  253.                         for(int a=0;a<N_DICE;a++){
  254.                                 if(display.isDieSelected(a)){
  255.                                         dice[a]=rgen.nextInt(1, 6);
  256.                                 }
  257.                         }
  258.                         display.displayDice(dice);
  259.                 }
  260.         }
  261.        
  262.         private void rollTheDices(){
  263.                 dice=new int[N_DICE];
  264.                 for(int i=0;i<N_DICE;i++){
  265.                         dice[i]=rgen.nextInt(1, 6);
  266.                 }
  267.                 display.displayDice(dice);
  268.         }
  269.                
  270. /* Private instance variables */
  271.         private int[] dice;
  272.         private int[][] scores;
  273.         private int nPlayers;
  274.         private String[] playerNames;
  275.         private YahtzeeDisplay display;
  276.         private RandomGenerator rgen = new RandomGenerator();

  277. }
复制代码
回复

使用道具 举报

🔗
nprotect 2012-8-18 17:27:52 | 只看该作者
全局:
感觉楼上的有些方法不对,比如说这个:

  •                 case THREE_OF_A_KIND:
  •                         for(int i=0;i<3;i++){
  •                                 int counter=0;
  •                                 for(int j=i+1;j<5;j++){
  •                                         if(dice[i]==dice[j]){
  •                                                 counter++;
  •                                         }
  •                                         if(counter==2){
  •                                                 return true;
  •                                         }
  •                                 }
  •                         }
  •                         return false;



i从0到2, j从i+1到4, 也就是1到4
比如我用这个序列  3  2  3  5  3  ,有3个3,符合 three of a kind
索引是:         0  1  2  3  4
你的程序应该比较4次, i : 0  1  2  2
                   j : 1  2  3  4
   0-1时,不相同,1-2时不相同,2-3时不相同,2-4时相同,counter应该等于1
那这样返回就不是true了吧? 不知道我理解的对吗?


回复

使用道具 举报

🔗
nprotect 2012-8-18 17:36:52 | 只看该作者
全局:
这题难点的确是自己写出YahtzeeMagicStub.checkCategory这个方法,我个人的思想是:
5个dice相减,共有10个结果,储存在一个一维数组里面
结果全部=0, AAAAA类型,符合: yahtzee / four of a kind / three of a kind
6次 =0, AAAAB类型,符合:four of a kind / three of a kind

4次 =0, AAABB类型, 符合: full house / three of a kind
3次 =0, AAABC类型,符合: three of a kind
而9,8,7,5,2,1,0不需要考虑。

以上涵盖了 所有的 three of a kind, four of a kind, full house, yahtzee类型

下面只剩 small straight和large straight, 因为种类比较少,不需要排序可以直接列举出来

small straight一定需要有,1234, 或者 2345, 或者 3456
large straight一定需要有,12345 或者 23456

这样写方法应该就可以了。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表