package com.bjorn;

import java.util.Random;

public class BoardSetup {
    public Board randomBoard(Ship fleet[], Board newBoard) {
        for (int i = 0; i < fleet.length; i++) {
            while (true) {
                try {
                    fleet[i] = new Ship(2, 0, "S");
                    newBoard.placeShip(fleet[i]);
                    break;
                } catch (RuntimeException e) {
                }
            }
        }
        return newBoard;
    }

    private int getRandomNumber() {
        Random r = new Random();
        int Low = 0;
        int High = 99;
        return r.nextInt(High-Low) + Low;
    }

}

@@ -276,16 +276,80 @@
 , %22S%22);%0A
+                    fleet%5Bi%5D.updatePosition(getRandomNumber());%0A
         

Fix BoardSetup to place ship randomly.