diff --git a/src/OnlinePlayer.java b/src/OnlinePlayer.java index f53d50d..66316d6 100644 --- a/src/OnlinePlayer.java +++ b/src/OnlinePlayer.java @@ -2,4 +2,10 @@ import java.net.Socket; public abstract class OnlinePlayer extends Player{ private Socket socket; + + public OnlinePlayer(int size, Socket socket) { + super(size); + this.socket = socket; + //TODO Auto-generated constructor stub + } } diff --git a/src/SpecificAiPlayerMedium.java b/src/SpecificAiPlayerMedium.java index b808ff9..c122f43 100644 --- a/src/SpecificAiPlayerMedium.java +++ b/src/SpecificAiPlayerMedium.java @@ -1,3 +1,6 @@ +import java.util.ArrayList; +import java.util.List; +import java.awt.Point; public class SpecificAiPlayerMedium extends AiPlayer{ @@ -13,7 +16,7 @@ public class SpecificAiPlayerMedium extends AiPlayer{ // Shoot at the enemy and receive the hit response enemy.receiveShoot(nextShot); - HitResponse hitResponse = enemy.board.getHitResponsOnPoint(nextShot) + HitResponse hitResponse = enemy.board.getHitResponsOnPoint(nextShot); // If it's a hit or sunk, add adjacent cells to the hitsQueue if (hitResponse.getHitResponse() == HitResponseType.HIT) { addAdjacentPoints(nextShot); @@ -58,6 +61,11 @@ public class SpecificAiPlayerMedium extends AiPlayer{ } } + private boolean alreadyShot(Point p) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'alreadyShot'"); + } + private boolean isValidPoint(Point point) { return point.x >= 0 && point.x < board.getSize() && point.y >= 0 && point.y < board.getSize();