-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstructions.java
93 lines (61 loc) · 2.38 KB
/
Instructions.java
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
90
91
92
93
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
@SuppressWarnings("serial")
public class Instructions extends JPanel {
int boardWidth = 400;
int boardHeight = 500;
public enum gameMode {
SCRABBLE, //random chracters from scrabble dictionary
MUSE, //real words after which you keep track of what you've written
READMYOWNFILE, //read in your own file
}
gameMode mode = gameMode.SCRABBLE;
public Instructions () {
setSize(new Dimension(boardWidth, boardHeight));
setPreferredSize(new Dimension(boardWidth, boardHeight));
setLayout(null);
ButtonGroup buttons = new ButtonGroup();
final JRadioButton SCRABBLE = new JRadioButton("Scrabble", true);
final JRadioButton MUSE = new JRadioButton("Muse", false);
final JRadioButton STUDY = new JRadioButton("Study", false);
buttons.add(SCRABBLE);
buttons.add(MUSE);
buttons.add(STUDY);
SCRABBLE.setLocation(30, 30);
// MUSE.setLocation(100, 200);
// STUDY.setLocation(170, 200);
add(SCRABBLE);
add(MUSE);
add(STUDY);
//RadioButton //buttons.add();
}
public gameMode mode() {
return mode;
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
setBackground(Color.BLACK);
g.setColor(Color.WHITE);
g.drawString("Welcome to Scrabble Tetris!", boardWidth/3, 50);
g.drawString("Stack the tetris blocks into horizontal words", 30, 70);
g.drawString("to clear them from the board.", 50, 80);
g.drawString("Z", boardWidth/5, 130);
g.drawString("Rotate your word left.", boardWidth/2, 130);
g.drawString("X or UP", boardWidth/5, 150);
g.drawString("Rotate your word right.", boardWidth/2, 150);
g.drawString("SPACE", boardWidth/5, 170);
g.drawString("Drop your word to the bottom.", boardWidth/2, 170);
g.drawString("LEFT", boardWidth/5, 190);
g.drawString("Shift your word left.", boardWidth/2, 190);
g.drawString("RIGHT", boardWidth/5, 210);
g.drawString("Shift your word right.", boardWidth/2, 210);
g.drawString("C", boardWidth/5, 230);
g.drawString("Shuffle the word for", boardWidth/2, 225);
g.drawString("a more convenient order.", boardWidth/2, 235);
g.drawString("Click anywhere to start.", boardWidth/3, 300);
}
}