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
- Wooden GameGAM
- Card GameGAM
- Shop GameGAM
- Fast Car GameASTGAM
- Infinite Card GameGAM
- game development -- flowGAMdev
- Jump Game(C++)GAMC++
- Flip Game(POJ 1753)GAM
- E. Wooden GameGAM
- C. Game on PermutationGAM
- D. Shop GameGAM
- HDU 1729 Stone GameGAM
- C. Game MasterGAMAST
- 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
- D. Soldier and Number GameGAM
- Shooter Game User Interface StarterGAM
- 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