diff --git a/game.class b/game.class index b6ae60a..67a818e 100644 Binary files a/game.class and b/game.class differ diff --git a/game.ctxt b/game.ctxt index 8d3aebb..fb84411 100644 --- a/game.ctxt +++ b/game.ctxt @@ -1,7 +1,21 @@ #BlueJ class context -comment0.target=game -comment0.text=\r\n\ Klasse\ game.\r\n\ \ \r\n\ @author\ \r\n +comment0.target=Game comment1.params= -comment1.target=game() +comment1.target=Game() comment1.text=---------------Konstruktor--- -numComments=2 +comment2.params= +comment2.target=void\ settings() +comment2.text=---------------Methoden------ +comment3.params=x\ y\ b\ h\ HALF_PI\ PI +comment3.target=void\ _arc(float,\ float,\ float,\ float,\ float,\ float) +comment4.params=r\ g\ b +comment4.target=void\ _fill(int,\ int,\ int) +comment5.params=b +comment5.target=void\ _fill(int) +comment6.params=x\ y\ b\ h +comment6.target=void\ _rect(float,\ float,\ float,\ float) +comment7.params=x\ y\ b\ h +comment7.target=void\ _ellipse(float,\ float,\ float,\ float) +comment8.params=x +comment8.target=float\ _random(float) +numComments=9 diff --git a/game.java b/game.java index d2d52ce..06638d4 100644 --- a/game.java +++ b/game.java @@ -4,16 +4,46 @@ * * @author */ -public class game { +import processing.core.PApplet; +public class Game extends PApplet{ /*---------------Attribute-----*/ - - + int cellSize = 40; + /*---------------Konstruktor---*/ - public game() { + 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); + } }