NondeterministicInvention.java
|
1 package npw;
2
3 import painter.SPainter;
4 import shapes.SRectangle;
5
6 import java.awt.*;
7
8 public class NondeterministicInvention {
9 public static void main(String [] args){
10
11 SPainter bob = new SPainter("Invention2", 600,600);
12 SRectangle rec = new SRectangle(25,25);
13
14 int t = 1;
15 while (t <10) {
16 bob.move();
17 bob.setColor(Color.blue);
18
19 if (t <5){
20 bob.setColor(Color.yellow);
21 } bob.paint(rec);
22 t = t + 1;
23
24 }
25
26
27
28
29
30
31
32 }}
33