| Conditions | 4 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package example.turtlelogo; |
||
| 7 | public static void main(String[] args) { |
||
| 8 | SavableTerrarium terrarium = new SavableTerrarium(); |
||
| 9 | Turtle boxer = new Turtle(terrarium); |
||
| 10 | |||
| 11 | boxer.rt(90); |
||
| 12 | boxer.fd(10); |
||
| 13 | boxer.rt(90); |
||
| 14 | boxer.fd(10); |
||
| 15 | boxer.rt(90); |
||
| 16 | boxer.fd(10); |
||
| 17 | boxer.rt(90); |
||
| 18 | boxer.fd(10); |
||
| 19 | |||
| 20 | terrarium.drawTo("square.png"); |
||
| 21 | terrarium.clear(); |
||
| 22 | |||
| 23 | for (int row = 1; row <= 10; row++) { |
||
| 24 | for (int col = 1; col <= 10; col++) { |
||
| 25 | boxer.teleport(row * 20, col * 20); |
||
|
|
|||
| 26 | for (int side = 0; side < 4; side++) { |
||
| 27 | boxer.rt(90); |
||
| 28 | boxer.fd(10); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | terrarium.drawTo("squares.png"); |
||
| 34 | } |
||
| 36 |