diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-02-23 19:07:56 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-02-24 19:07:56 +0100 |
commit | 49805bf316bd9ed1a8dcbd829a0c28b9399d1ff3 (patch) | |
tree | 34fa1afdb30b44bccc9803d0f241c9d97e3862a8 /Year_2/IandM/02232021_1/Exercise1.pde | |
parent | cf228fd6b77a0efbdd4846d41a436663f2ae7eb1 (diff) |
i&m: exercises of 23rd feb
Diffstat (limited to 'Year_2/IandM/02232021_1/Exercise1.pde')
-rwxr-xr-x | Year_2/IandM/02232021_1/Exercise1.pde | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Year_2/IandM/02232021_1/Exercise1.pde b/Year_2/IandM/02232021_1/Exercise1.pde new file mode 100755 index 0000000..c7bea6b --- /dev/null +++ b/Year_2/IandM/02232021_1/Exercise1.pde @@ -0,0 +1,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());
+ }
+}
|