Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class OceanTester {
- public static void main(String[] args) {
- Ocean ocean = new Ocean(numberOfBoats: 5, oceanSize:10);
- //create a position
- Position pos = new Position(row: -1, col:0);
- try {
- ocean.placeBoat(boatName: "Aircraft Carrier", direction: "horizontal")
- System.out.println("Boat placed okay");
- } catch (Exception ex) {
- System.out.println("Test 1: " + pos + " " + ex.getMessage());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement