Skip to content

Commit

Permalink
Change Move3 to Move
Browse files Browse the repository at this point in the history
  • Loading branch information
sas12028 committed Apr 3, 2017
1 parent c88d3a3 commit 20e5b1b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/CheckersGameState3.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ private boolean any_jumps(int orig, int delta1, int delta2, int[] board, boolean
return backward || forward;
}

public List<Move3> actions(){
LinkedList<Move3> moves = new LinkedList<Move3>();
LinkedList<Move3> jumps = new LinkedList<Move3>();
public List<Move> actions(){
LinkedList<Move> moves = new LinkedList<Move>();
LinkedList<Move> jumps = new LinkedList<Move>();
for(int i = 0; i < this.board.length; i++){
if(current_player(i, this.board)){
if(this.player == 1){
Expand Down Expand Up @@ -159,7 +159,7 @@ public List<Move3> actions(){
}


private void generate_moves(int origin, int delta1, int delta2, List<Move3> moves, List<Move3> jumps, boolean king){
private void generate_moves(int origin, int delta1, int delta2, List<Move> moves, List<Move> jumps, boolean king){
calculate_jumps("" + origin, this.board, origin, delta1, delta2, jumps, king);
if(jumps.isEmpty()){
if(can_move(origin, delta1, this.board)){
Expand Down Expand Up @@ -224,7 +224,7 @@ private void calculate_jumps(String path, int[] b, int orig, int delta1, int del
}


CheckersGameState3 result(Move3 x){
CheckersGameState3 result(Move x){
int[] newState = this.board.clone();
newState[x.destination()] = this.board[x.origin()];
newState[x.origin()] = 0;
Expand Down

0 comments on commit 20e5b1b

Please sign in to comment.