Commit c47028e0 by Paktalin

Fixed strength and representation in pieces

parent 75f9d515
package com.example.paktalin.agilejava_exercises.pieces; package com.example.paktalin.agilejava_exercises.pieces;
import com.example.paktalin.agilejava_exercises.Position; import com.example.paktalin.agilejava_exercises.Position;
import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
/** /**
* Created by Paktalin on 01/06/2018. * Created by Paktalin on 01/06/2018.
...@@ -9,9 +8,8 @@ import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy; ...@@ -9,9 +8,8 @@ import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
public class Bishop extends Piece { public class Bishop extends Piece {
public Bishop(Piece.Color color) { public Bishop(Piece.Color color) {
strength = 0; strength = 3;
representation = 'k'; representation = 'b';
moveStrategy = new KingMoveStrategy();
this.color = color; this.color = color;
} }
......
package com.example.paktalin.agilejava_exercises.pieces; package com.example.paktalin.agilejava_exercises.pieces;
import com.example.paktalin.agilejava_exercises.Position; import com.example.paktalin.agilejava_exercises.Position;
import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
/** /**
* Created by Paktalin on 01/06/2018. * Created by Paktalin on 01/06/2018.
...@@ -9,9 +8,8 @@ import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy; ...@@ -9,9 +8,8 @@ import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
public class Knight extends Piece { public class Knight extends Piece {
public Knight(Piece.Color color) { public Knight(Piece.Color color) {
strength = 0; strength = 2.5;
representation = 'k'; representation = 'n';
moveStrategy = new KingMoveStrategy();
this.color = color; this.color = color;
} }
......
package com.example.paktalin.agilejava_exercises.pieces; package com.example.paktalin.agilejava_exercises.pieces;
import com.example.paktalin.agilejava_exercises.Position; import com.example.paktalin.agilejava_exercises.Position;
import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
import java.util.List; import java.util.List;
...@@ -12,9 +11,8 @@ import java.util.List; ...@@ -12,9 +11,8 @@ import java.util.List;
public class Pawn extends Piece { public class Pawn extends Piece {
public Pawn(Piece.Color color) { public Pawn(Piece.Color color) {
strength = 0; strength = 1;
representation = 'k'; representation = 'p';
moveStrategy = new KingMoveStrategy();
this.color = color; this.color = color;
} }
......
...@@ -11,9 +11,9 @@ import com.example.paktalin.agilejava_exercises.moves.QueenMoveStrategy; ...@@ -11,9 +11,9 @@ import com.example.paktalin.agilejava_exercises.moves.QueenMoveStrategy;
public class Queen extends Piece { public class Queen extends Piece {
public Queen(Piece.Color color) { public Queen(Piece.Color color) {
strength = 0; strength = 9;
representation = 'k'; representation = 'q';
moveStrategy = new KingMoveStrategy(); moveStrategy = new QueenMoveStrategy();
this.color = color; this.color = color;
} }
......
package com.example.paktalin.agilejava_exercises.pieces; package com.example.paktalin.agilejava_exercises.pieces;
import com.example.paktalin.agilejava_exercises.Position; import com.example.paktalin.agilejava_exercises.Position;
import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
/** /**
* Created by Paktalin on 01/06/2018. * Created by Paktalin on 01/06/2018.
...@@ -10,9 +9,8 @@ import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy; ...@@ -10,9 +9,8 @@ import com.example.paktalin.agilejava_exercises.moves.KingMoveStrategy;
public class Rook extends Piece{ public class Rook extends Piece{
public Rook(Piece.Color color) { public Rook(Piece.Color color) {
strength = 0; strength = 5;
representation = 'k'; representation = 'r';
moveStrategy = new KingMoveStrategy();
this.color = color; this.color = color;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment