Remove USELESS class Battleship
This commit is contained in:
parent
48ba657ef1
commit
609b2b821a
@ -1,9 +0,0 @@
|
||||
package battleship.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Battleship {
|
||||
|
||||
public ArrayList<Ship> ships;
|
||||
|
||||
}
|
11
src/battleship/model/player/Human.java
Normal file
11
src/battleship/model/player/Human.java
Normal file
@ -0,0 +1,11 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
public class Human extends Player {
|
||||
|
||||
@Override
|
||||
public Triplet chooseMove() {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ import java.util.ArrayList;
|
||||
public abstract class Player {
|
||||
|
||||
protected ArrayList<Ship> ships = new ArrayList<>();
|
||||
protected ArrayList<Triplet> moves = new ArrayList<>();
|
||||
protected ArrayList<Triplet<Integer,Integer,Boolean>> moves = new ArrayList<>();
|
||||
|
||||
public Player(){
|
||||
setShips();
|
||||
@ -18,8 +18,8 @@ public abstract class Player {
|
||||
|
||||
}
|
||||
|
||||
public void addMove(Triplet move){
|
||||
public void addMove(Triplet<Integer,Integer,Boolean> move){
|
||||
moves.add(move);
|
||||
}
|
||||
public abstract Triplet chooseMove();
|
||||
public abstract Triplet<Integer,Integer,Boolean> chooseMove();
|
||||
}
|
||||
|
10
src/battleship/model/player/Random.java
Normal file
10
src/battleship/model/player/Random.java
Normal file
@ -0,0 +1,10 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
public class Random extends Player{
|
||||
@Override
|
||||
public Triplet chooseMove() {
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user