miércoles, 9 de marzo de 2016

Códigos de programación/Juego (Estrella y Luna)

cuadrado for (var count = 0; count < 4; count++) { moveForward(100); turnRight(90); } pentagono for (var count = 0; count < 5; count++) { moveForward(100); turnRight(72); } Estrellas penColour('#ffff00'); penDown(); for (var count = 0; count < 5; count++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(90); for (var count2 = 0; count2 < 5; count2++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(90); for (var count3 = 0; count3 < 5; count3++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(90); for (var count4 = 0; count4 < 5; count4++) { moveForward(50); turnRight(144); } Estrella y linea penColour('#ffff00'); penDown(); for (var count = 0; count < 5; count++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(120); for (var count2 = 0; count2 < 5; count2++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(120); for (var count3 = 0; count3 < 5; count3++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); turnRight(45); turnLeft(1); for (var count4 = 0; count4 < 5; count4++) { turnLeft(1); } for (var count5 = 0; count5 < 3; count5++) { turnLeft(1); } for (var count6 = 0; count6 < 3; count6++) { turnLeft(1); turnLeft(1); } penUp(); moveForward(100); penColour('#ffffff'); penDown(); moveForward(50); Estrella con rayas penColour('#ffff00'); penDown(); for (var count = 0; count < 5; count++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(120); for (var count2 = 0; count2 < 5; count2++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(120); for (var count3 = 0; count3 < 5; count3++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); turnRight(45); turnLeft(1); for (var count4 = 0; count4 < 5; count4++) { turnLeft(1); } for (var count5 = 0; count5 < 3; count5++) { turnLeft(1); } for (var count6 = 0; count6 < 3; count6++) { turnLeft(1); turnLeft(1); } penUp(); moveForward(100); penColour('#ffffff'); penDown(); moveForward(50); for (var count7 = 0; count7 < 3; count7++) { penUp(); moveBackward(50); penDown(); turnRight(45); moveForward(50); } Estrellas y luna penColour('#ffff00'); penDown(); for (var count = 0; count < 5; count++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(120); for (var count2 = 0; count2 < 5; count2++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); penDown(); turnRight(120); for (var count3 = 0; count3 < 5; count3++) { moveForward(50); turnRight(144); } penUp(); moveForward(150); turnRight(45); turnLeft(1); for (var count4 = 0; count4 < 5; count4++) { turnLeft(1); } for (var count5 = 0; count5 < 3; count5++) { turnLeft(1); } for (var count6 = 0; count6 < 3; count6++) { turnLeft(1); turnLeft(1); } penUp(); moveForward(100); penColour('#ffffff'); penDown(); moveForward(50); for (var count7 = 0; count7 < 360; count7++) { penUp(); moveBackward(50); penDown(); turnRight(1); moveForward(50); } https://blockly-games.appspot.com/turtle?lang=es&level=10

No hay comentarios:

Publicar un comentario