-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPiece.java
52 lines (42 loc) · 819 Bytes
/
Piece.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
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.util.ArrayList;
public class Piece {
protected int team, value;
protected int x, y;
protected String name;
public Piece(int turn, int xloc, int yloc, String piece_name, int score) {
team = turn;
x = xloc;
y = yloc;
name = piece_name;
value = score;
}
public int get_value() {
return value;
}
public ArrayList<int[]> get_moves(Piece[][] board) {
return null;
}
public void move_to(int i, int j) {
x = i;
y = j;
}
public int get_team() {
return team;
}
public String get_name() {
return name;
}
public int[] get_loc() {
int[] loc = {x,y};
return loc;
}
public boolean is_empty() {
return false;
}
public boolean check(King king, Piece[][] board) {
return false;
}
}