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 9ea9c12 commit de2cac9
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/problems/problemData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,6 @@ class MyTurtle {
instrumented: `
function main() {
const t = call(MyTurtle)();
t.operation = "FFRFF"; // step
call(t.operate.bind(t))();
t.operation = "LFFRFF"; // step
call(t.operate.bind(t))();
Expand All @@ -3714,7 +3713,7 @@ function main() {
class MyTurtle {
constructor() {
this.t = new Turtle(); // step
this.operation = ""; // step
this.operation = "FFRFF"; // step
}
operate() {
Expand All @@ -3741,7 +3740,6 @@ main();
public class Main {
public static void main(String[] args) {
MyTurtle t = new MyTurtle(); //caller
t.operation = "FFRFF"; // step
t.operate(); // caller
t.operation = "LFFRFF"; // step
t.operate(); // caller
Expand All @@ -3750,20 +3748,17 @@ public class Main {
class MyTurtle {
Turtle t = new Turtle(); // step
String operation = ""; // step
String operation = "FFRFF"; // step
void operate() {
for (int i = 0; i < this.operation.length(); i++) { // step
switch (this.operation.charAt(i)) {
case 'F':
this.t.前に進む(); // step
break;
case 'R':
this.t.右を向く(); // step
break;
case 'L':
this.t.左を向く(); // step
break;
case 'F':
this.t.前に進む(); break; // step
case 'R':
this.t.右を向く(); break; // step
case 'L':
this.t.左を向く(); break; // step
}
}
}
Expand Down

0 comments on commit de2cac9

Please sign in to comment.