Adding player
This commit is contained in:
parent
1baedaf6e7
commit
2eb488f14a
@ -3,7 +3,6 @@ package battleship;
|
|||||||
public class Battleship {
|
public class Battleship {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
22
src/battleship/model/player/Player.java
Normal file
22
src/battleship/model/player/Player.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package battleship.model.player;
|
||||||
|
|
||||||
|
import battleship.utils.Triplet;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public abstract class Player {
|
||||||
|
|
||||||
|
protected ArrayList<Ships> ships = new ArrayList<>();
|
||||||
|
protected ArrayList<Triplet> moves = new ArrayList<>();
|
||||||
|
|
||||||
|
public Player(){
|
||||||
|
setShips();
|
||||||
|
}
|
||||||
|
public void setShips(){
|
||||||
|
|
||||||
|
}
|
||||||
|
public void addMove(Triplet move){
|
||||||
|
moves.add(move);
|
||||||
|
}
|
||||||
|
public abstract Triplet chooseMove();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user