# data[].attributes.body
for (var i = 0; i < 2; i++) {

drawUmbrella(randomNumber(1, 250));

}

function drawUmbrella(x) {

penUp();

turnTo(0);

moveTo(x, 350);

penDown();

penColor("#964B00");

penWidth(3);

moveForward(50);

turnRight(90);

penColor("#D2042D");

moveForward(25);

turnRight(45);

penColor("#FCF55F");

moveForward(12.5);

arcLeft(180, 12.5);

moveForward(17.5);

penColor("#D2042D");

turnLeft(30);

moveForward(25);

penColor("#6495ED");

moveForward(10);

turnLeft(30);

moveForward(10);

penColor("#D2042D");

moveForward(25);

penColor("#FCF55F");

turnLeft(25);

moveForward(12.5);

arcLeft(180, 12.5);

moveForward(5);

penColor("#D2042D");

turnRight(30);

moveForward(18);

penUp();

}

# data[].attributes.body
for (var i = 0; i < 5; i++) {

birds(randomNumber(7, 250), "#A7754D");

}

function birds(x) {

penUp();

penColor("#A7754D");

moveTo(x, 55);

penDown();

arcRight(80, 25);

penUp();

moveTo(x, 55);

turnLeft(170);

penDown();

arcLeft(80, 25);

penUp();

moveTo(85, 55);

turnTo(0);

# data[].attributes.body
for (var i = 0; i < randomNumber(3, 6); i++) {

drawFish(randomNumber(40, 280), 165, randomNumber(230, 180), randomNumber(10, 30));

}

function drawFish(x, y, direction, size) {

var fishColors = ["red", "blue", "green", "purple", "orange"];

turnTo(direction);

penUp();

moveTo(x, y);

penDown();

penWidth(5);

if (size > 15) {

penRGB(randomNumber(16, 235), randomNumber(16, 235), randomNumber(16, 235));

} else {

var colorIndex = randomNumber(0, fishColors.length - 1);

penColor(fishColors[colorIndex]);

}

turnRight(30);

moveForward(size);

turnLeft(120);

moveForward(size);

turnLeft(30);

arcLeft(180, size/2);

turnLeft(30);

moveForward(size);

moveForward(size/2);

turnRight(120);

moveForward(size/2);

turnRight(120);

moveForward(size/2);

turnLeft(30);

hide();

}

# data[].attributes.body
if fishes touch, they move to another place

background

# data[].attributes.body
var temp = randomNumber(15, 270);

var temp2 = randomNumber(15, 270);

var birdPositions = [123, 88, 206, 167];

sandcastle(temp);

sandcastle(temp2);

generateBirds();

for (var i = 0; i < 2; i++) {

temp = randomNumber ( 15, 270);

temp2 = randomNumber (15,270);

if (temp - temp2 && temp - temp2 > -15) {

i = 0;

}

}

while (temp2 - temp < 150 && temp2-temp > -150) {

temp = randomNumber(15,270);

temp2 = randomNumber(15, 270);

}

function sandcastle(x) {

penUp();

moveTo(x, 370);

penDown();

penWidth(3);

penColor("#FFDE85");

turnLeft(90);

moveForward(25);

turnRight(75);

moveForward(25);

turnRight(15);

moveForward(25);

penUp();

moveBackward(50);

turnLeft(90);

moveBackward(5);

penDown();

moveForward(18);

turnRight(75);

moveForward(35);

turnRight(20);

moveForward(30);

turnRight(30);

moveForward(15);

turnRight(90);

moveForward(11);

turnRight(45);

moveForward(19);

turnLeft(80);

moveForward(50);

turnRight(90);

moveForward(14);

penUp();

//Door of sandcastle

moveForward(36);

turnLeft(90);

moveBackward(18);

penDown();

moveForward(11);

turnLeft(75);

moveForward(20);

turnLeft(10);

moveForward(18);

penUp();

//tower

penDown();

moveForward(25);

turnRight(30);

moveForward(15);

turnRight(90);

moveForward(10);

turnRight(50);

moveForward(30);

turnRight(15);

moveForward(40);

turnRight(80);

moveForward(25);

turnRight(90);

}

function birds(x) {

penUp();

penColor("#A7754D");

moveTo(x, 55);

penDown();

penWidth(4);

arcRight(80, 25);

penUp();

moveTo(x, 55);

turnLeft(170);

penDown();

arcLeft(80, 25);

penUp();

moveTo(85, 55);

turnTo(0);

}

function generateBirds() {

for (var i = 0; i < 10; i++) {

var birdsX = randomNumber(15, 270);

birdPositions.push(birdsX);

birds(birdsX);

}

}