added TestLogo

This commit is contained in:
Louis Heredero 2024-04-23 15:15:49 +02:00
parent 9d6b1f767e
commit a280dfd564
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7

19
src/logo/TestLogo.scala Normal file
View File

@ -0,0 +1,19 @@
package logo
import hevs.graphics.TurtleGraphics
object TestLogo {
def main(args: Array[String]): Unit = {
val turtle: TurtleGraphics = new TurtleGraphics(600, 600)
turtle.penUp()
turtle.jump(300, 300)
turtle.setAngle(0)
turtle.forward(150 * math.sqrt(3) / 2)
turtle.turn(150)
turtle.penDown()
for (_: Int <- 0 until 3) {
turtle.forward(300)
turtle.turn(120)
}
}
}