-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMove.java
More file actions
81 lines (68 loc) · 1.63 KB
/
Copy pathMove.java
File metadata and controls
81 lines (68 loc) · 1.63 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
package edu.unlv.mis768.finalproject;
/**
* This is class is for moving a piece
* @author William Brasic and Sergio Torres
*
*/
public class Move {
// initialize fields
private Player player;
private Square startingSquare;
private Square endingSquare;
private Piece killedPiece;
//private boolean castlingMove = false;
/**
* Constructor
* @param player
* @param start
* @param end
*/
public Move(Player player, Square startingSquare, Square endingSquare)
{
this.player = player;
this.startingSquare = startingSquare;
this.endingSquare = endingSquare;
}
/**
* Getter for starting square
* @return starting square
*/
public Square getStartingSquare() {
return startingSquare;
}
/**
* Setter for starting square
* @param startingSquare
*/
public void setStartingSquare(Square startingSquare) {
this.startingSquare = startingSquare;
}
/**
* Getter for ending square
* @return ending square
*/
public Square getEndingSquare() {
return endingSquare;
}
/**
* Setter for ending square
* @param endingSquare
*/
public void setEndingSquare(Square endingSquare) {
this.endingSquare = endingSquare;
}
/**
* Method for getting a killed piece
* @return the piece that has been killed
*/
public Piece getKilledPiece() {
return killedPiece;
}
/**
* Method for setting the piece that has been killed
* @param killedPiece
*/
public void setKilledPiece(Piece killedPiece) {
this.killedPiece = killedPiece;
}
}