Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Dec 20, 2024
1 parent 76401a9 commit b867e7a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/problems/problemData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3941,25 +3941,21 @@ function main() {
call(t.moveForward.bind(t))();
call(t.turnLeft.bind(t))();
}
class MyTurtle {
constructor(speed) {
this.t = new Turtle(); // step
this.speed = speed; // step
}
moveForward() {
for (s.set('i', 0); s.get('i') < this.speed; s.set('i', s.get('i') + 1)) { // step
this.t.前に進む(); // step
}
delete s.vars['i'];
this.speed--; // step
}
turnRight() {
this.t.右を向く(); // step
}
turnLeft() {
this.t.左を向く(); // step
}
Expand All @@ -3978,7 +3974,6 @@ public class Main {
t.turnLeft(); // caller
}
}
class MyTurtle {
private Turtle t;
private int speed;
Expand All @@ -3987,18 +3982,14 @@ class MyTurtle {
this.t = new Turtle(); // step
this.speed = speed; // step
}
void moveForward() {
for (int i = 0; i < this.speed; i++) { // step
for (int i = 0; i < this.speed; i++) // step
this.t.前に進む(); // step
}
speed--; // step
this.speed--; // step
}
void turnRight() {
this.t.右を向く(); // step
}
void turnLeft() {
this.t.左を向く(); // step
}
Expand Down

0 comments on commit b867e7a

Please sign in to comment.