java Game
第一步:為撲克新增值
第二步:打亂撲克的順序
第三步:發牌
ArrayList cards;
public static void main(String[] args) {
Game g=new Game();
g.deal();
g.dipaly();
}
public void deal() {
cards=new ArrayList();
for(int i=1;i<=52;i++) {
cards.add(i);
}
Collections.reverse(cards);
}
public void dipaly() {
String[] players={"南家","北家","東家","西家"};
for(int i=0;i<players.length;i++) {
System.out.print(players[i]+":");
for(int j=i*13;j<(i+1)*13;j++) {
System.out.print(cards.get(j)+",");
}
System.out.println();
}
}
相關文章
- Jump Game leetcode javaGAMLeetCodeJava
- Jump Game II leetcode javaGAMLeetCodeJava
- Fast Car GameASTGAM
- Infinite Card GameGAM
- Jump Game(C++)GAMC++
- Flip Game(POJ 1753)GAM
- HDU 5973-Game of Taking Stones(威佐夫博弈-JAVA BigDecimal)GAMJavaDecimal
- FZU 2275 Game (KMP)GAMKMP
- Switch Game HDU - 2053GAM
- A Multiplication Game (博弈,規律)GAM
- HTML5 game enginesHTMLGAM
- Leetcode jump GameLeetCodeGAM
- LeetCode:Game of LifeLeetCodeGAM
- C. MEX Game 1GAM
- Dragon Tiger Cattle Cattle GameGoGAM
- LeetCode-Game of LifeLeetCodeGAM
- LeetCode 55 Jump GameLeetCodeGAM
- [LeetCode] Jump Game IILeetCodeGAM
- Leetcode jump Game IILeetCodeGAM
- Leetcode-Jump GameLeetCodeGAM
- LeetCode-Nim GameLeetCodeGAM
- noip模擬31[time·game·cover]GAM
- Leetcode 292. Nim GameLeetCodeGAM
- (一)django-game:model 設計DjangoGAM
- BZOJ1481 : Navigation GameNavigationGAM
- Leetcode-Jump Game IILeetCodeGAM
- Isometric Game 及譯法漫談GAM
- Game with points(數學,難度中)GAM
- NO GAME NO LIFE(優先佇列/最小堆)GAM佇列
- TGDC | Evolving AAA Game DevelopmentGAMdev
- LeetCode-Design Snake GameLeetCodeGAM
- [CareerCup] 17.5 Game of Master Mind 猜字遊戲GAMAST遊戲
- POJ 1753-Flip Game(列舉&&DFS)GAM
- 《遊戲設計模式》(Game Programming Patterns)遊戲設計設計模式GAM
- HDU1729 Stone Game (SG函式)GAM函式
- game html5 tafang V1GAMHTML
- HDU 4944 FSF’s game(計數遊戲)GAM遊戲
- [CareerCup] 8.8 Othello Game 黑白棋遊戲GAM遊戲