Adding player

This commit is contained in:
Arthur 2021-03-23 10:27:30 +01:00
parent 1baedaf6e7
commit 2eb488f14a
2 changed files with 22 additions and 1 deletions

View File

@ -3,7 +3,6 @@ package battleship;
public class Battleship {
public static void main(String[] args) {
}
}

View 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();
}