-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConnectMove.java
More file actions
58 lines (52 loc) · 1.37 KB
/
ConnectMove.java
File metadata and controls
58 lines (52 loc) · 1.37 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Saves the parameters corresponding to move to be passed to observer
*
* @author greg
*/
public class ConnectMove {
//params of current move
private int row;
private int column;
private ConnectFourEnum colour;
/**
* ConnectMove Constructor
*
* @param row - row of the last played move
* @param column - column of the last played move
* @param colour - player who played the last move
*/
public ConnectMove(int row, int column, ConnectFourEnum colour) {
this.row = row;
this.column = column;
this.colour = colour;
}
/**
* Returns the row that the current move was place in
*
* @return row - row that the checker was placed
*/
public int getRow() {
return this.row;
}
/**
* Returns the column that the current move was place in
*
* @return column - column that the checker was placed
*/
public int getColumn() {
return this.column;
}
/**
* Returns the player that made the current move
*
* @return colour - player who played the last checker
*/
public ConnectFourEnum getColour() {
return this.colour;
}
}