-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoker.java
More file actions
70 lines (56 loc) · 2.06 KB
/
Poker.java
File metadata and controls
70 lines (56 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package MainRepository;
import java.util.Scanner;
public class Poker {
public static int numPlayers = 0; // 플레이어수 전역변수
public static int selectedIndex = 0;
static Player[] playerGenerating(int n) {
Player[] players = new Player[n];
for (int i = 0; i < n; ++i) {
players[i] = new Player();
}
return players;
}
public static void main(String[] args) {
while(true){
// 시작화면(front)
Screen.clearConsole();
StartScreen.printScreen();
// 시작화면(back)
PokerDeck deck = new PokerDeck();
deck.initialize(); // 초기 설정
deck.tableSet();
Player[] players = new Player[numPlayers];
players = playerGenerating(numPlayers);
// 로딩화면(front)
LoadingScreen.printScreen();
// 로딩화면(back)
for (int i = 0; i < numPlayers; ++i) {
players[i].drawing(); // 각 플레이별 7장
}
// 본게임화면
// 게임 중
MainGameScreen.printScreen(players);
// 우승자 출력화면
Scanner scanner = new Scanner(System.in);
char input;
while (true) {
// 우승자 출력
EndingScreen.printScreen(players);
// 재시작 / 종료 선택
System.out.println(" R: Restart, E: Exit");
System.out.print(" Select option >> ");
input = scanner.next().charAt(0);
if (input == 'E' || input == 'e') {
System.exit(0);
}
else if (input == 'R' || input == 'r') {
break;
}
else {
Screen.clearConsole();
}
}
}
// scanner.close();
}
}