diff --git a/src/battleship/model/Battleship.java b/src/battleship/model/Battleship.java deleted file mode 100644 index 19cf433..0000000 --- a/src/battleship/model/Battleship.java +++ /dev/null @@ -1,9 +0,0 @@ -package battleship.model; - -import java.util.ArrayList; - -public class Battleship { - - public ArrayList ships; - -} diff --git a/src/battleship/model/player/Human.java b/src/battleship/model/player/Human.java new file mode 100644 index 0000000..904ec3e --- /dev/null +++ b/src/battleship/model/player/Human.java @@ -0,0 +1,11 @@ +package battleship.model.player; + +import battleship.utils.Triplet; + +public class Human extends Player { + + @Override + public Triplet chooseMove() { + return null; + } +} diff --git a/src/battleship/model/player/Player.java b/src/battleship/model/player/Player.java index fad7cc2..1de5ceb 100644 --- a/src/battleship/model/player/Player.java +++ b/src/battleship/model/player/Player.java @@ -8,7 +8,7 @@ import java.util.ArrayList; public abstract class Player { protected ArrayList ships = new ArrayList<>(); - protected ArrayList moves = new ArrayList<>(); + protected ArrayList> moves = new ArrayList<>(); public Player(){ setShips(); @@ -18,8 +18,8 @@ public abstract class Player { } - public void addMove(Triplet move){ + public void addMove(Triplet move){ moves.add(move); } - public abstract Triplet chooseMove(); + public abstract Triplet chooseMove(); } diff --git a/src/battleship/model/player/Random.java b/src/battleship/model/player/Random.java new file mode 100644 index 0000000..7324d47 --- /dev/null +++ b/src/battleship/model/player/Random.java @@ -0,0 +1,10 @@ +package battleship.model.player; + +import battleship.utils.Triplet; + +public class Random extends Player{ + @Override + public Triplet chooseMove() { + return null; + } +}