-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelp.java
More file actions
89 lines (86 loc) · 2.53 KB
/
Copy pathHelp.java
File metadata and controls
89 lines (86 loc) · 2.53 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import java.util.*;
import java.io.*;
public class Help{
private Plateau plateau;
// default constructor
public Help(){
}
// get plateau method
public Plateau getPlateau(){
return plateau;
}
// app info
public void appInfo(){
for(int i = 0; i < 5; i++){
System.out.println();
}
System.out.println("Créateur: Tony Bernis, Rida Moustaoui");
System.out.println("Projet Java");
System.out.println("Université Paris 13");
}
// Basic Chess Rules
public void basicChessInfo(){
for(int i = 0; i < 5; i++){
System.out.println();
}
System.out.println("Pour apprendre les règles");
System.out.println("http://www.intuitor.com/chess/");
}
// scramble chess rules
public void scrambleChessRules(){
for(int i = 0; i < 5; i++){
System.out.println();
}
System.out.println("Scramble Chess Rules!");
System.out.println("Different from regular chess in two ways:");
System.out.println(" 1. Before the game, each player can rearrange their back lines.");
System.out.println(" Every piece gets to be changed except for the pawns and king.");
System.out.println(" 2. During gameplay, pawns can move one space horizontally");
System.out.println(" as well as vertically.");
System.out.println(" Pawns still capture pieces diagonally however.");
}
// quit game
public void quitGame(){
for(int i = 0; i < 5; i++){
System.out.println();
}
System.out.println("GAME OVER. (Press Control+c to exit game)");
// quit game
}
// display help menu, should allow user to navigate through help
public void display(){
for(int i = 0; i < 5; i++){
System.out.println();
}
Scanner scan = new Scanner(System.in);
System.out.println("Ceci est la classe help!");
while(true){
System.out.println("Voila vos options:");
System.out.println("1. App Info");
System.out.println("2. Règle des échecs");
System.out.println("3. Quiter le jeu");
System.out.println();
System.out.println("Entrez le num de votre choix.");
String choice = scan.nextLine();
if(choice.charAt(0) == '1'){
appInfo();
break;
} else if(choice.charAt(0) == '2'){
basicChessInfo();
break;
} else if(choice.charAt(0) == '3'){
quitGame();
break;
} else if(choice.charAt(0) == '4'){
System.out.println("This is where the player would castle.");
//castle();
break;
} else if(choice.charAt(0) == '5'){
quitGame();
break;
} else {
System.out.println("That is not an option, try again.");
}
}
}
}