-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChessPlay
68 lines (51 loc) · 1.46 KB
/
ChessPlay
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
package com.computer7.can.brainfusion;
import java.io.File;
import java.io.IOException;
/**
* Created by Eldarfin on 30.04.2015.
*/
public class ChessPlay implements Play{
//Constants
private final String W_PAWN = "wp";
private final String W_ROOK = "wr";
private final String W_QUEEN = "wq";
private final String W_KING = "wk";
private final String W_KNIGHT = "wkn";
private final String W_BISHOP = "wb";
private final String B_PAWN = "bp";
private final String B_ROOK = "br";
private final String B_QUEEN = "bq";
private final String B_KING = "bk";
private final String B_KNIGHT = "bkn";
private final String B_BISHOP = "bb";
//Variables
private String[][] board;
private TextReader reader;
private Object question, answer;
public ChessPlay(File file) throws IOException{
reader = new TextReader();
reader.readQuestion();
board = new String[8][8];
question = null;
answer = null;
board = reader.fillBoard(board);
}
public Object getAnswer() {
return answer;
}
public void setAnswer(Object o) {
answer = reader.setAnswer();
}
public Object getQuestion() {
return question;
}
public void setQuestion() {
question = reader.setQuestion();
}
public boolean isTrue() {
return getAnswer().equals(getUserInput());
}
public Object getUserInput() {
return null;
}
}