added turn method
This commit is contained in:
parent
1cea1d46e0
commit
fb42b33ab7
|
|
@ -6,6 +6,8 @@ public class Board {
|
|||
private Piece[][] board;
|
||||
private int width;
|
||||
private int height;
|
||||
private int turn;
|
||||
private int n;
|
||||
|
||||
public Board(int colNum, int lineNum) {
|
||||
this.width = colNum; // col move x
|
||||
|
|
@ -24,8 +26,12 @@ public class Board {
|
|||
}
|
||||
|
||||
public int getTurnNumber() {
|
||||
//TODO
|
||||
return 0;
|
||||
turn = 1;
|
||||
for (int i = 1; i<=n; i++) {
|
||||
if (n%i == 0) {
|
||||
turn += 1;
|
||||
}}
|
||||
return turn;
|
||||
}
|
||||
|
||||
public boolean isTurnWhite() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue