50 lines
1018 B
Java
50 lines
1018 B
Java
|
|
/**
|
|
* Klasse game.
|
|
*
|
|
* @author
|
|
*/
|
|
import processing.core.PApplet;
|
|
public class Game extends PApplet{
|
|
/*---------------Attribute-----*/
|
|
int cellSize = 40;
|
|
|
|
/*---------------Konstruktor---*/
|
|
public Game() {
|
|
String[] processingArgs = {"MySketch"};
|
|
PApplet.runSketch(processingArgs, this);
|
|
}
|
|
|
|
/*---------------Methoden------*/
|
|
|
|
public void settings() {
|
|
size(10 * cellSize, 10*cellSize);
|
|
}
|
|
|
|
|
|
|
|
public void _arc(float x, float y, float b, float h, float HALF_PI, float PI) {
|
|
arc(x, y, b, h, HALF_PI, PI);
|
|
}
|
|
|
|
public void _fill(int r, int g, int b) {
|
|
fill(r, g, b);
|
|
}
|
|
|
|
public void _fill(int b) {
|
|
fill(b);
|
|
}
|
|
|
|
public void _rect(float x, float y, float b, float h) {
|
|
rect(x, y, b, h);
|
|
}
|
|
|
|
public void _ellipse(float x, float y, float b, float h) {
|
|
ellipse(x, y, b, h);
|
|
}
|
|
|
|
public float _random(float x) {
|
|
return random(x);
|
|
}
|
|
}
|