Anonymous
public text v1 · immutablepackage Battleship;
import java.util.ArrayList;
import Battleship.Ship.Direction;
public class Battleship {
public static final int MAX_WIDTH = 30;
public static final int MAX_HEIGHT = 30;
private Board board;
public Battleship(int width, int height, Board board) {
this.board = board;
}
public void fireAtCoord(int x, int y) {
board.hit(x, y);
}
public boolean victory() {
if(board.allShipsSunken() == true) return true;
return false;
}
}