-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestThread.java
More file actions
32 lines (28 loc) · 796 Bytes
/
TestThread.java
File metadata and controls
32 lines (28 loc) · 796 Bytes
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
package view;
public class TestThread extends Thread {
private Chessboard chesB;
public TestThread(Chessboard chessboard){
chesB=chessboard;
}
public void run() {
int a=0;
while(true){
try {
if (a<chesB.getIntStoreHuiQI()){
sleep(2*1000);
String[] data=chesB.HUiFang(a).split("\n");
chesB.HuiQIGame(data);
chesB.repaint();
a++;
// System.out.println("一分钟运行一次");
}
else {
break;
}
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}