summaryrefslogtreecommitdiff
path: root/Year_2/IandM/02232021_1/Exercise1.pde
blob: c7bea6b8d2c9d3ee521987eca362f4c117d48c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Auto a = new Auto();
AutoElettrica ea = new AutoElettrica(a.velx());

void setup() {
  size(512, 512);
}

void draw() {
  background(255);
  a.draw();
  ea.draw();
}

void keyPressed() {
  if(key == 'R' || key == 'r') {
    a = new Auto();
    ea = new AutoElettrica(a.velx());
  }
}