This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autor: Christopher Schölzel | |
class StickFigure { | |
float v; //Bewegungsgeschwindigkeit | |
float x; //x-Koordinate | |
public StickFigure(float x, float v) { | |
this.x = x; | |
this.v = v; | |
} | |
void walk() { | |
if (x > width-100) v = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autor: Christopher Schölzel | |
int bingoWidth = 5; //Anzahl der Felder in x-/y-Richtung | |
int fieldWidth = 50;//Feldbreite in pixeln | |
int[] bingo = new int[bingoWidth*bingoWidth]; //Feldinhalte | |
boolean[] marked = new boolean[bingo.length]; //Markierungen der Felder | |
int numberIndex = 0; //Index der gerade gezogenen Zahl | |
int[] numberSequence;//(gemischte) Sequenz von gezogenen Zahlen | |
int numberTimeout = 10000; //Timeout nach dem eine neue Zahl gezogen wird | |
int lastNumberTime = 0; //Zeitpunkt zu dem die letzte Zahl gezogen wurde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autor: Christopher Schölzel | |
float x1,y1; //erster Punkt für unteres Linienende | |
float x2,y2; //zweiter Punkt für unteres Linienende | |
void setup() { | |
size(400,400); | |
x1 = 0; | |
y1 = height; | |
x2 = width; | |
y2 = height; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autor: Christopher Schölzel | |
float x,y; | |
float vx,vy; | |
float radius; | |
float stickX,stickY; | |
float stickW,stickH; | |
boolean gameOver; | |
int hits; | |
int maxHits; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autor: Christopher Schölzel | |
color THMGreen = color(128,186,36); | |
color THMGray = color(74,92,102); | |
float boxHeight = 15; //größe einer einzelnen Box im Fenster | |
int fachbereich = 6; //Fachbereichsnummer | |
int standort = 1; //Standortnummer | |
void setup() { | |
size(500,200); | |
noLoop(); | |
background(255); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Musterlösung zu OOP Aufgabenblatt 1, Aufgabe 3 (WS 14/15) | |
//Autor: Christopher Schölzel | |
float x,y; //position | |
float r; //radius | |
void setup() { | |
size(300,300); | |
background(0); | |
x = width/2; | |
y = height/2; | |
r = 30; |
NewerOlder