From a5bb07445c42af0461e3d64dcaabf977b5f58d41 Mon Sep 17 00:00:00 2001 From: 4ngelica Date: Sun, 19 Jun 2016 21:37:19 +0200 Subject: [PATCH 01/24] Start_Load --- Start_Button.java | 25 +++ Start_Load.class | Bin 0 -> 527 bytes Start_Load.ctxt | 9 ++ Start_Load.java | 33 ++++ project.greenfoot | 379 ++++++++++++++++++++++++++++++---------------- 5 files changed, 315 insertions(+), 131 deletions(-) create mode 100644 Start_Button.java create mode 100644 Start_Load.class create mode 100644 Start_Load.ctxt create mode 100644 Start_Load.java diff --git a/Start_Button.java b/Start_Button.java new file mode 100644 index 0000000..032d0c1 --- /dev/null +++ b/Start_Button.java @@ -0,0 +1,25 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Startet neues Spiel. + * + * @author 4ngelica + * @version 1.0 + */ +public class Start_Button extends Button +{ + private int textSize = 32; + private String text = "New Game"; + + /** + * Erstellt neue Klasse Colors. + */ + public void act() + { + setLocation(100,100); + if (Greenfoot.mouseClicked(this)) + { + Greenfoot.setWorld(new Colors()); + } + } +} diff --git a/Start_Load.class b/Start_Load.class new file mode 100644 index 0000000000000000000000000000000000000000..e7a2e1986a71b4aa301a2b0b860b1094cfd5e0ec GIT binary patch literal 527 zcmZWl%TB^T6g^Wa&ni$AkcZ+9S;)qn#)T#tk_HzTbY}*rSOaZR1~q<#zv6 Date: Mon, 20 Jun 2016 16:39:41 +0200 Subject: [PATCH 02/24] Add files via upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Das ist die Color-Klasse für den Spielstart --- Colors.class | Bin 0 -> 1878 bytes Colors.ctxt | 7 ++++ Colors.java | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 Colors.class create mode 100644 Colors.ctxt create mode 100644 Colors.java diff --git a/Colors.class b/Colors.class new file mode 100644 index 0000000000000000000000000000000000000000..838a0a0511a2a74d8cd72135f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(color[], x); + addObject(m); + setWorld(Map,m); + } + } + +} From 99ec5f2d7956b340d024ad484a58a55e1439ca4b Mon Sep 17 00:00:00 2001 From: Zocker1999NET Date: Mon, 20 Jun 2016 21:36:47 +0200 Subject: [PATCH 03/24] =?UTF-8?q?Debug=20Teil=201=20-=20Entfernen=20unn?= =?UTF-8?q?=C3=B6tiger=20Dateien=20von=20GitHub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Dateien mit den Typen *.class und *.ctxt sind nicht auf GitHub notwendig. --- Colors.class | Bin 1878 -> 0 bytes Colors.ctxt | 7 ------- Start_Load.class | Bin 527 -> 0 bytes Start_Load.ctxt | 9 --------- 4 files changed, 16 deletions(-) delete mode 100644 Colors.class delete mode 100644 Colors.ctxt delete mode 100644 Start_Load.class delete mode 100644 Start_Load.ctxt diff --git a/Colors.class b/Colors.class deleted file mode 100644 index 838a0a0511a2a74d8cd72135f942c81ea74aa440..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1878 zcmZ8hOKcle6g^`*{*LQOnmGS{fDm_*Hhc;Nl9n`~N!>b0iPNM>3S{g|ok^yiFmW0L z3l?<2h7Ceug9Jz@8#W-tR4Ns!#16q47A#q^V2gwh=e~)9WLrMx-skh~ym#(<^V7c% ze*kbEZzu5tuElUYjzSV4%p`CcvvJG`--zRN;rTdUrUNHn1e1tIx2I_6ZJ+9fU~cV>~RnDo|d4Vi*d zwP$zlmTZ5)D!CkKD|ltgU9@~h^25PMZNu4-9Zt$xceulJN$qvgb;?`zx`tG)v3sem z@u}%z%_?urSlfp+l0|RVFWXa&JS7zrI=5-vvvgd+7r76%~9cNTLO_Oz)5=WPm(>jJQpko+kbv%P-bv!5Vyuf*Z z7X)4uxPTEIFA2OX@QT2wz?guCZ5`(@!otBO=wijU?dl!RtBovqzAJVFo4In&uCfc! zTt1%{U!KerWXB_}RjrH^Yra#hjOGuGQ`%8cC9L)JxzeUx=G1Ji@PF~k<(lV@N+}+~ z)4UU`hz?#6dPIcyqnOqxrZ0-=iDLSpm`*6B8H%|b#q>ontx-&O6w@HZ^hhynQcR~5 z(=5gGOEE1|OxG0CIC6;Vy@*T1R{`yFL>WO#n61(A*6{tv18C;=2rajT4a0nZNF6Of z9&O~YAdfflM35&Nc`C^DMxGAxV~so$CD3iQ z)X`%`>*zIOb@Z9>I{G=ijuWPNfEFWZB)`K+iDO3hQJgSxM{&xya1>{ZsiQb;+*I+m z%A#?ik3QlcQvCKp4sMzU@EEQmgH;&VLMz@w8$LigKI8%T2w8lLPJD_ke1>j(i5~28 z=GUzA4f?@F;vr7rF)zx`ydb~vV*J6XfAKc_gR@$k?YYb+>On&=fk|c>Uc;5cW<5rj z?Ss}mB%9sGAnADI3vT#;?j7J1f8BHDGNZ^^ooSeciZ&K#+ncmKP1<(RCIW3oleV`> z+acOipv^XE`_(Pjc|XOp(SN!uyfbfE2O(w=D2c8RuiA1TtQ$X5tU^THS>Zqj`4 z^ Date: Mon, 20 Jun 2016 21:47:42 +0200 Subject: [PATCH 04/24] Debug Teil 2 - Entfernen von kleinen Syntax Fehlern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - *Colors*: Statt mit **color** wurde mit **color[]** versucht, das Array als Argument zu übergeben - *Start_Button*: Die beiden Werte der Variablen **text** und **textSize** wurden in den Konstruktoraufruf eingegliedert. Außerdem wurde der Einzug von 4 Leerzeichen auf Tabs umgestellt, was eine kleinere Dateigröße bedeutet. --- Colors.java | 178 +++++++++++++++++++++++----------------------- Roll_Button.java | 30 ++++---- Start_Button.java | 29 ++++---- 3 files changed, 119 insertions(+), 118 deletions(-) diff --git a/Colors.java b/Colors.java index 454f04b..79d5cc1 100644 --- a/Colors.java +++ b/Colors.java @@ -8,95 +8,95 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) */ public class Colors extends World implements ButtonEvent { - Button schwarz = new Button ("Schwarz", 16, this); - Button blau = new Button ("Blau", 16, this); - Button grün = new Button ("Grün", 16, this); - Button rot = new Button ("Rot", 16, this); - Button lila = new Button ("Lila", 16, this); - Button gelb = new Button ("Gelb", 16, this); - Button weiter = new Button ("Weiter", 16, this); - int [] color = new int [6]; - int x; - boolean possw = true; - boolean posbl = true; - boolean posgr = true; - boolean posrt = true; - boolean posgb = true; - boolean posli = true; - int sw = 1; - int bl = 2; - int gr = 3; - int rt = 4; - int gb = 5; - int li = 6; + Button schwarz = new Button ("Schwarz", 16, this); + Button blau = new Button ("Blau", 16, this); + Button grün = new Button ("Grün", 16, this); + Button rot = new Button ("Rot", 16, this); + Button lila = new Button ("Lila", 16, this); + Button gelb = new Button ("Gelb", 16, this); + Button weiter = new Button ("Weiter", 16, this); + int [] color = new int [6]; + int x; + boolean possw = true; + boolean posbl = true; + boolean posgr = true; + boolean posrt = true; + boolean posgb = true; + boolean posli = true; + int sw = 1; + int bl = 2; + int gr = 3; + int rt = 4; + int gb = 5; + int li = 6; - /** - * Constructor for objects of class Colors. - * - */ - public Colors() - { - super(1600, 900, 1); - addObject(schwarz, 10, 10); - addObject ( blau, 25, 10); - addObject ( grün, 40, 10); - addObject ( rot, 55, 10); - addObject(gelb, 70, 10); - addObject(lila, 85, 10); - - } - // Überprüft, ob ein Farbbutton geklickt wurde - //Überprüft, ob die Farbe noch nicht ausgewählt wurde - // Wenn alle Bedingungen erfüllt wurden: - // Setzt die aktuelle Stelle des Farbarrays gleich der Zahl der aktuellen Farbe - // erhöht die Variable zum Durchzählen um eins - // verhindert durch falschsetzten einer Variable die Wiederauswahl einer Farbe - // wenn Weiter geklickt wurde und x größer 1 ist wird eine neue Welt Map erzeugt, - //der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt - public void buttonClicked (Button b) - { - if ( b == schwarz && possw == true) - { - color [x] = sw; - x+=1; - possw = false; - } - if (b == blau && posbl == true) - { - color[x] = bl; - x+=1; - posbl = false; - } - if (b == grün && posgr == true ) - { - color[x] = gr; - x+=1; - posgr = false; - } - if ( b == rot && posrt == true) - { - color[x] = rt; - x+=1; - posrt = false; - } - if ( b == gelb && posgb == true) - { - color [x] = gb; - x+=1; - posgb = false; - } - if ( b == lila && posli == true) - { - color [x] = li; - x+=1; - posli = false; - } - if ( b == weiter && x >1) - { - Map m = new Map(color[], x); - addObject(m); - setWorld(Map,m); - } - } + /** + * Constructor for objects of class Colors. + * + */ + public Colors() + { + super(1600, 900, 1); + addObject(schwarz, 10, 10); + addObject ( blau, 25, 10); + addObject ( grün, 40, 10); + addObject ( rot, 55, 10); + addObject(gelb, 70, 10); + addObject(lila, 85, 10); + + } + // Überprüft, ob ein Farbbutton geklickt wurde + //Überprüft, ob die Farbe noch nicht ausgewählt wurde + // Wenn alle Bedingungen erfüllt wurden: + // Setzt die aktuelle Stelle des Farbarrays gleich der Zahl der aktuellen Farbe + // erhöht die Variable zum Durchzählen um eins + // verhindert durch falschsetzten einer Variable die Wiederauswahl einer Farbe + // wenn Weiter geklickt wurde und x größer 1 ist wird eine neue Welt Map erzeugt, + //der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt + public void buttonClicked (Button b) + { + if ( b == schwarz && possw == true) + { + color [x] = sw; + x+=1; + possw = false; + } + if (b == blau && posbl == true) + { + color[x] = bl; + x+=1; + posbl = false; + } + if (b == grün && posgr == true ) + { + color[x] = gr; + x+=1; + posgr = false; + } + if ( b == rot && posrt == true) + { + color[x] = rt; + x+=1; + posrt = false; + } + if ( b == gelb && posgb == true) + { + color [x] = gb; + x+=1; + posgb = false; + } + if ( b == lila && posli == true) + { + color [x] = li; + x+=1; + posli = false; + } + if ( b == weiter && x >1) + { + Map m = new Map(color, x); + addObject(m); + setWorld(Map,m); + } + } } diff --git a/Roll_Button.java b/Roll_Button.java index c056483..c114f47 100644 --- a/Roll_Button.java +++ b/Roll_Button.java @@ -1,7 +1,7 @@ /* - Hinweis zum Verbleib der Klasse: - Diese Klasse soll, da sie zurzeit weder vollständig, noch in Verwendung, noch in der Architektur definiert ist, zum Beta-Meilenstein entfernt werden. - Sollte die Klasse jedoch zuvor noch Verwendung finden, wird sie nach Absprache mit den jeweiligen Autoren/Benutzern in die Architektur aufgenommen. + Hinweis zum Verbleib der Klasse: + Diese Klasse soll, da sie zurzeit weder vollständig, noch in Verwendung, noch in der Architektur definiert ist, zum Beta-Meilenstein entfernt werden. + Sollte die Klasse jedoch zuvor noch Verwendung finden, wird sie nach Absprache mit den jeweiligen Autoren/Benutzern in die Architektur aufgenommen. */ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) @@ -14,16 +14,16 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) */ public class Roll_Button extends Button { - public Roll_Button(ButtonEvent h) { - super(h); - } - - /** - * Act - do whatever the Würfel_Button_Angriff wants to do. This method is called whenever - * the 'Act' or 'Run' button gets pressed in the environment. - */ - public void act() - { - // Add your action code here. - } + public Roll_Button(ButtonEvent h) { + super(h); + } + + /** + * Act - do whatever the Würfel_Button_Angriff wants to do. This method is called whenever + * the 'Act' or 'Run' button gets pressed in the environment. + */ + public void act() + { + // Add your action code here. + } } diff --git a/Start_Button.java b/Start_Button.java index 032d0c1..6ed3e01 100644 --- a/Start_Button.java +++ b/Start_Button.java @@ -8,18 +8,19 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) */ public class Start_Button extends Button { - private int textSize = 32; - private String text = "New Game"; - - /** - * Erstellt neue Klasse Colors. - */ - public void act() - { - setLocation(100,100); - if (Greenfoot.mouseClicked(this)) - { - Greenfoot.setWorld(new Colors()); - } - } + public Start_Button() { + super("New Game", 32); + } + + /** + * Erstellt neue Klasse Colors. + */ + public void act() + { + setLocation(100,100); + if (Greenfoot.mouseClicked(this)) + { + Greenfoot.setWorld(new Colors()); + } + } } From cbb92e39d2f3f60ad74ef044f68ff54baa15bbd8 Mon Sep 17 00:00:00 2001 From: JulienRo Date: Tue, 21 Jun 2016 08:20:22 +0200 Subject: [PATCH 05/24] Add files via upload neue colorklasse --- Colors.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Colors.java b/Colors.java index 79d5cc1..aef76cf 100644 --- a/Colors.java +++ b/Colors.java @@ -16,6 +16,7 @@ public class Colors extends World implements ButtonEvent Button gelb = new Button ("Gelb", 16, this); Button weiter = new Button ("Weiter", 16, this); int [] color = new int [6]; + String [] pn = new String [6]; int x; boolean possw = true; boolean posbl = true; @@ -58,42 +59,48 @@ public class Colors extends World implements ButtonEvent if ( b == schwarz && possw == true) { color [x] = sw; + pn[x]="Schwarz"; x+=1; possw = false; } if (b == blau && posbl == true) { color[x] = bl; + pn[x] = "Blau"; x+=1; posbl = false; } if (b == grün && posgr == true ) { color[x] = gr; + pn[x]="Grün"; x+=1; posgr = false; } if ( b == rot && posrt == true) { color[x] = rt; + pn[x]="Rot"; x+=1; posrt = false; } if ( b == gelb && posgb == true) { color [x] = gb; + pn[x]="Gelb"; x+=1; posgb = false; } if ( b == lila && posli == true) { color [x] = li; + pn[x]="Lila"; x+=1; posli = false; } if ( b == weiter && x >1) { - Map m = new Map(color, x); + Map m = new Map(color, x,pn); addObject(m); setWorld(Map,m); } From 6ddaff71950f8827e6db747585e9ce35bc17fc8a Mon Sep 17 00:00:00 2001 From: JulienRo Date: Tue, 21 Jun 2016 08:33:38 +0200 Subject: [PATCH 06/24] Add files via upload die Map --- Map.java | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Map.java diff --git a/Map.java b/Map.java new file mode 100644 index 0000000..dd65f67 --- /dev/null +++ b/Map.java @@ -0,0 +1,56 @@ +import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) + +/** + * Write a description of class Map here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Map extends Spielstart +{ + private Button map1 = new Button ("map1",16,this); + private Button map2 = new Button ("map2",16,this); + private Button fertigst = new Button (" Fertigstellen",16,this); + int [] color = new int[6]; + String [] pn = new String [6]; + int pnu; + //private int x; + //private int y; + private int m=0; + private GeneralMap GM ; + public Map( int [] bunt, int zahl , String [] name) + { + super (1600,900,1); + for (int i=0; i<6; i++) + { + color[x] = bunt[x]; + pn[x] = name[x]; + } + pnu=zahl; + addObject(map1, (1600-map1.getWidth())/2, (900-map1.getHeight())/2); + addObject(map2, ((1600-map2.getWidth())/2)-25, ((900-map1.getHeight())/2)+75); + addObject(fertigst, (1600-fertigst.getWidth()), 900-fertigst.getWidth()); + } + // Die Map Buttons geben der Variable m einen Wert + public void buttonClicked(Button b) + { + if (b== map1) + { + //x= ; + //y= ; + m =1; + + } + if (b== map2) + { + m =2; + + } + if (b == fertigst) + { + new GeneralMap (color, pnu, pn, m); + Greenfoot.setWorld(GM); + } + } + +} From ec24addc3bdb09030f6bb359b006a6970c8742e5 Mon Sep 17 00:00:00 2001 From: 4ngelica Date: Thu, 23 Jun 2016 00:45:45 +0200 Subject: [PATCH 07/24] Add files via upload --- Colours.class | Bin 0 -> 2123 bytes Colours.ctxt | 9 +++ Colours.java | 108 +++++++++++++++++++++++++++++++++ GeneralMap.class | Bin 0 -> 2285 bytes GeneralMap.ctxt | 31 ++++++++++ Map.class | Bin 0 -> 1357 bytes Map.ctxt | 8 +++ Map.java | 16 ++--- Map_World.class | Bin 0 -> 3419 bytes Map_World.ctxt | 7 +++ Map_World.java | 4 +- Start_Load.class | Bin 0 -> 845 bytes Start_Load.ctxt | 11 ++++ Start_Load.java | 17 +++--- project.greenfoot | 149 +++++++++++++++++++++++++++++++--------------- 15 files changed, 296 insertions(+), 64 deletions(-) create mode 100644 Colours.class create mode 100644 Colours.ctxt create mode 100644 Colours.java create mode 100644 GeneralMap.class create mode 100644 GeneralMap.ctxt create mode 100644 Map.class create mode 100644 Map.ctxt create mode 100644 Map_World.class create mode 100644 Map_World.ctxt create mode 100644 Start_Load.class create mode 100644 Start_Load.ctxt diff --git a/Colours.class b/Colours.class new file mode 100644 index 0000000000000000000000000000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=-#)MK&O^uDdKGG3s;lKETL4lj!7lQGU1d*~S%t^<9*^!L1) + { + Map m = new Map(colour, x, pn); + //setWorld(m); + } + } + +} diff --git a/GeneralMap.class b/GeneralMap.class new file mode 100644 index 0000000000000000000000000000000000000000..6babceea9a159f5f0068cb17719c48857d37433f GIT binary patch literal 2285 zcmZuxU2_v<6n=KI%_ix#X$vXRfKdD(O-qWkP^7d_`+>pq%Rr%2rQ38VfixSpDGnE+ zGj@hM{Q=&n!;Cjv=!_J{k6wD=UvS1t$4jp}B0lHcZCXn&@_w9s&NV%jc#LU((_4(nU+~|#&q1=^GdW?k6 z|1B6nMJt|rw^%MXD;nzOa#O*rUxQgG+4mfe_9*S@Olw17)$^Qk)i-DepDUJ&)j!vQ=v#QY+1#g(dteS7d>jDlNo zJs+XZiJJK;qcVX?&#stw-^2+M-TWriZiz%bp_G)(rslv4>mwGgAhZ?u5w=~q` z%M7DMROJh8rKZYTvx^&mZF9<(|89HqwjINEZ(VqSuX2SRh;aM6IM$d_ak$Hkh ze$CLndG^P53>v~KT+@hg?O-7-Xksx5(rhECBm9y=CwkC@OWdcB!K*~}l29i-j}vL| zK21~ycR8i`MN_9PoS+P1%b=T?PV#&Z`ZEIROuS~I$HeOFqP{C z<6M$OL|IH}-O&pP7Y?h0~oN05dcLHdIrgA5|l#w18`uL#q%>WHefC&p4_A~jaL zRnA_7ns!%peNRGzl+mwhJ|NVVG`@o6_v|6+^hYGfrmdq{BKp(T$Q>x4k$)gf{Qr=N zk~V-dw>3v?Y=jV%HW<(wh4K*I46;3-O=29E=o>%Ba>l?Rb$p0Kr#c;yl#^>Zhv2VH zQP)r1s$P=I7ggbyf4~8+uyren!ck&kNUBK?GRFfl5u%1Uz&;rZ`cuSYYB$we9;r$2 z1^wkQWI_YR;NgJIG1(6bndFy(??Ps33(V4LhF=HCkrau!ckBpk0P_^ zt}|@<3%c)ut~-N)X=%Ife<;)6!GiR=lEZs*zVn@X&e1vFy`z6#{Qeh!S$tDK37=~C z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UzO%4uOjXslp5-;BVi4*2HF2; z@i%F@V^$N}L2PHjb}-vvYjHt~Us|RoZh~2^+ZjhXe8b#M7IdP(=+sGRdM%z6vQ)f* z9bxQ9`)PXd8G1g63SAumh)`i$vo!XbCKaP5Yu%i^UJ7JG9dlcD|I6=z{#B3L_ zIJ1Y?Zf3iYeOZf-EHfCdDAz@SMFN`~Xwr?)J*?_+wD_|Y_oX=&t8i5$?H-F(rLJnq z)yt}0^g5-*8`2ELBgCE7$c3t=jnl`1KBZIN(qi2*!}Wc@!$FJsR^@cORr`~O{jBX* zI_+u^T4p3R8z3`eE!yC=JD3OtSTKNs8(N&P%<;O}ASwDufifH41{}pOZMv~UJILBW z)NX0<4QWQ>iL==RNt=QlWA+#}^(!rGX~yE&G0Qd_47a+|{N@d@Y6w+-)bOS><4x^g zntHg_B+@VohB4BJhA&Gq5!;MVH^)gZM%|$6LpCF<8bMX$UX^At?qjqe8cqz3GkTnR zh96jFDo(@(D5x7W2}W5kih>W^b!qY(h`w~(@dl2`9Csu!8Dq^DYC;Wvm*%miVR73i zuTNie`W>84_riSoJX}nNa4G#JETrFu<@ASeSq{JzIS*Im zYf!+`#ftnBtXU&)%__jU^>w(8XNV2!LwMdEffwv+@S^<{xMAOgoAv|noI%)h&VlcQ zaLf5N6rEqdj`I=RcK!*w@C>FOiVrg|11Iqgk2UZtoT9@IUVR=;W2XXpqK?n}7vz=G A82|tP literal 0 HcmV?d00001 diff --git a/Map_World.ctxt b/Map_World.ctxt new file mode 100644 index 0000000..5ca8991 --- /dev/null +++ b/Map_World.ctxt @@ -0,0 +1,7 @@ +#BlueJ class context +comment0.target=Map_World +comment0.text=\r\n\tKlasse\ der\ Standard-Welt\r\n\t(Also\ die\ normale\ Weltkarte\ mit\ allen\ Kontinenten)\r\n\r\n\t@author\ GruenerWal,\ MaxiJohl\r\n\t@version\ 0.3.0\r\n +comment1.params=playerList\ colorList +comment1.target=Map_World(java.lang.String[],\ int[]) +comment1.text=\ \r\n\t\tKonstruktor\ der\ Weltkarte;\r\n\t\tkonstruiert\ eine\ GeneralMap\ mit\ den\ Ausmassen\ 1600\ auf\ 900\ Pixel.\r\n +numComments=2 diff --git a/Map_World.java b/Map_World.java index dc1dfab..6da01fa 100644 --- a/Map_World.java +++ b/Map_World.java @@ -21,9 +21,9 @@ public class Map_World extends GeneralMap konstruiert eine GeneralMap mit den Ausmassen 1600 auf 900 Pixel. */ - public Map_World(String[] playerList, int[] colorList) + public Map_World(String[] playerList, int[] colourList) { - super("",playerList,colorList); + super("",playerList,colourList); /* Hier werden später sämtliche Provinzen der Standard-Map erstellt. Dies funktioniert folgendermassen: diff --git a/Start_Load.class b/Start_Load.class new file mode 100644 index 0000000000000000000000000000000000000000..9c8c79872dd171460f750eac39c32a659f486521 GIT binary patch literal 845 zcmYk4+iuf95QhJalQ?nQCQjQxfkN7Ha9n6Ol&c^FL{LRCa1qq1+<;>*!L8#(j#FNM zm*6pwfK*iCf=eC>F>B{^;aTr^=KKE{`R~79zX9ywp#~jSRa`5et|5cXB1+iOC~RxE zjvFd&YAE2AyqGE)Dl8Q{47p+KL@`6bem06@5w;lekNnV&A2TRsWU0WvaGto#4QUe0iTFv++lN$e`O@$$e)F$0OuYFM+oM-#y_TL&==VNd?xU z3aWQcUOJzq9NEdBb;T%h`3qkPmgmgfW9QV-QNeBUn>wc%LjJklcLrR3xT9kkWgWX{ zs<^A;9_}-!Z4nS~C<_c753naCW==_>A8{Uj5F&0KiYSm)Q~L8$9@3ifW~bAUp0`a~ zT4)AN*l%{@$PfFi&Sa>hwk4~Ij_1AZ9dnmjYo=AZJtYMWhQW3D|R-=>Q z0xnL}4yiLEd#p34U$JzK!qFJTGiZ{kB-CX(fpw_FG_a8nYiZYnD3#Y~7KTen7n8%t b;&h}PN=gH4?lhfoYr!3xxw}H88EpIqhRLEc literal 0 HcmV?d00001 diff --git a/Start_Load.ctxt b/Start_Load.ctxt new file mode 100644 index 0000000..1f74977 --- /dev/null +++ b/Start_Load.ctxt @@ -0,0 +1,11 @@ +#BlueJ class context +comment0.target=Start_Load +comment0.text=\r\n\ Beginnt\ neues\ Spiel/\ l\u00E4dt\ altes\ Spiel.\r\n\ \r\n\ @author\ 4ngelica\ \r\n\ @version\ 1.0\r\n +comment1.params= +comment1.target=Start_Load() +comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ Start_Load.\r\n\ \r\n +comment2.params=b +comment2.target=void\ buttonClicked(Button) +comment3.params= +comment3.target=void\ Load() +numComments=4 diff --git a/Start_Load.java b/Start_Load.java index a2633c7..97516e4 100644 --- a/Start_Load.java +++ b/Start_Load.java @@ -6,26 +6,29 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) * @author 4ngelica * @version 1.0 */ -public class Start_Load extends World +public class Start_Load extends World implements ButtonEvent { - + Button start = new Button ("new game", 16, this); /** * Constructor for objects of class Start_Load. * */ public Start_Load() { - // Create a new world with 600x400 cells with a cell size of 1x1 pixels. - super(600, 400, 1); + super(1600, 900, 1); + addObject (start, 800, 450); } - public void NewGame() + public void buttonClicked (Button b) { - addObject (new Start_Button()); + if (Greenfoot.mouseClicked(this)) + { + Greenfoot.setWorld(new Colours()); + } } - public void Load() + public void Load() //hat noch keine Funktion { } diff --git a/project.greenfoot b/project.greenfoot index de86cb1..74bbab3 100644 --- a/project.greenfoot +++ b/project.greenfoot @@ -2,15 +2,18 @@ class.ArmySchubser.superclass=Map_World class.Button.superclass=GUI_Interface class.ButtonEvent.superclass= +class.Colours.superclass=greenfoot.World class.CurrentPlayerArrow.superclass=GUI_Interface class.DefenderDices.superclass=DicesList class.Dice.superclass=GUI_Interface class.Dice_Defender.superclass=Dice class.Dice_Offender.superclass=Dice class.DicesList.superclass=greenfoot.Actor +class.Fight.superclass=Map_World class.GUI_Interface.superclass=greenfoot.Actor class.GeneralMap.superclass=greenfoot.World class.Label.superclass=GUI_Interface +class.Map.superclass= class.Map_World.superclass=GeneralMap class.Menue_Button.superclass=Button class.OffenderDices.superclass=DicesList @@ -19,7 +22,6 @@ class.Province.superclass=greenfoot.Actor class.Roll_Button.superclass=Button class.Spieleranzahl.superclass=Spieloptionen class.Spieloptionen.superclass=greenfoot.World -class.Start_Button.superclass=Button class.Start_Load.superclass=greenfoot.World class.Utils.superclass= class.Weltenauswahl.superclass=Spieloptionen @@ -50,15 +52,42 @@ dependency16.type=UsesDependency dependency17.from=Start_Load dependency17.to=ButtonEvent dependency17.type=UsesDependency -dependency18.from=Start_Button -dependency18.to=ButtonEvent +dependency18.from=Colours +dependency18.to=Button dependency18.type=UsesDependency -dependency19.from=Start_Load -dependency19.to=Start_Button +dependency19.from=Colours +dependency19.to=Map dependency19.type=UsesDependency dependency2.from=GeneralMap dependency2.to=Menue_Button dependency2.type=UsesDependency +dependency20.from=Fight +dependency20.to=Province +dependency20.type=UsesDependency +dependency21.from=Fight +dependency21.to=Dice_Offender +dependency21.type=UsesDependency +dependency22.from=Fight +dependency22.to=Dice_Defender +dependency22.type=UsesDependency +dependency23.from=Map +dependency23.to=Button +dependency23.type=UsesDependency +dependency24.from=Map +dependency24.to=GeneralMap +dependency24.type=UsesDependency +dependency25.from=Colours +dependency25.to=Map_World +dependency25.type=UsesDependency +dependency26.from=Start_Load +dependency26.to=Colours +dependency26.type=UsesDependency +dependency27.from=Map +dependency27.to=GeneralMap +dependency27.type=UsesDependency +dependency28.from=Colours +dependency28.to=Map_World +dependency28.type=UsesDependency dependency3.from=GeneralMap dependency3.to=Roll_Button dependency3.type=UsesDependency @@ -85,15 +114,15 @@ editor.fx.0.width=700 editor.fx.0.x=0 editor.fx.0.y=0 editor.swing.0.height=700 -editor.swing.0.width=700 +editor.swing.0.width=701 editor.swing.0.x=78 editor.swing.0.y=0 mainWindow.height=744 -mainWindow.width=1382 +mainWindow.width=1375 mainWindow.x=-8 -mainWindow.y=-8 -package.numDependencies=19 -package.numTargets=20 +mainWindow.y=0 +package.numDependencies=26 +package.numTargets=22 project.charset=UTF-8 readme.height=58 readme.name=@README @@ -109,77 +138,77 @@ target1.width=80 target1.x=120 target1.y=10 target10.height=50 -target10.name=Dice_Defender +target10.name=DefenderDices target10.showInterface=false target10.type=ClassTarget target10.typeParameters= target10.width=110 target10.x=10 -target10.y=310 +target10.y=490 target11.height=50 -target11.name=DefenderDices +target11.name=Province target11.showInterface=false target11.type=ClassTarget target11.typeParameters= -target11.width=110 -target11.x=10 -target11.y=490 +target11.width=80 +target11.x=130 +target11.y=310 target12.height=50 -target12.name=Province +target12.name=GeneralMap target12.showInterface=false -target12.type=ClassTarget +target12.type=AbstractTarget target12.typeParameters= -target12.width=80 -target12.x=130 -target12.y=310 +target12.width=90 +target12.x=70 +target12.y=70 target13.height=50 -target13.name=GeneralMap +target13.name=Map_World target13.showInterface=false -target13.type=AbstractTarget +target13.type=ClassTarget target13.typeParameters= target13.width=90 -target13.x=70 +target13.x=170 target13.y=70 target14.height=50 -target14.name=Map_World +target14.name=Button target14.showInterface=false target14.type=ClassTarget target14.typeParameters= -target14.width=90 -target14.x=170 -target14.y=70 +target14.width=80 +target14.x=10 +target14.y=130 target15.height=50 -target15.name=Button +target15.name=ButtonEvent target15.showInterface=false -target15.type=ClassTarget +target15.type=InterfaceTarget target15.typeParameters= -target15.width=80 -target15.x=10 -target15.y=130 +target15.width=90 +target15.x=130 +target15.y=490 target16.height=50 -target16.name=ButtonEvent +target16.name=Dice_Offender target16.showInterface=false -target16.type=InterfaceTarget +target16.type=ClassTarget target16.typeParameters= -target16.width=90 -target16.x=130 -target16.y=490 +target16.width=110 +target16.x=100 +target16.y=130 target17.height=50 -target17.name=Dice_Offender +target17.name=Utils target17.showInterface=false target17.type=ClassTarget target17.typeParameters= -target17.width=110 -target17.x=100 -target17.y=130 +target17.width=80 +target17.x=10 +target17.y=190 target18.height=50 -target18.name=Utils +target18.name=Colours target18.showInterface=false target18.type=ClassTarget target18.typeParameters= target18.width=80 target18.x=10 -target18.y=190 +target18.y=610 target19.height=50 target19.name=Start_Load target19.showInterface=false @@ -204,6 +233,30 @@ target20.typeParameters= target20.width=90 target20.x=190 target20.y=190 +target21.height=50 +target21.name=Fight +target21.showInterface=false +target21.type=ClassTarget +target21.typeParameters= +target21.width=80 +target21.x=100 +target21.y=610 +target22.height=50 +target22.name=Map +target22.showInterface=false +target22.type=ClassTarget +target22.typeParameters= +target22.width=80 +target22.x=190 +target22.y=610 +target23.height=50 +target23.name=Map +target23.showInterface=false +target23.type=ClassTarget +target23.typeParameters= +target23.width=80 +target23.x=190 +target23.y=610 target3.height=50 target3.name=GUI_Interface target3.showInterface=false @@ -253,12 +306,12 @@ target8.width=110 target8.x=100 target8.y=430 target9.height=50 -target9.name=Start_Button +target9.name=Dice_Defender target9.showInterface=false target9.type=ClassTarget target9.typeParameters= -target9.width=100 -target9.x=110 -target9.y=550 +target9.width=110 +target9.x=10 +target9.y=310 version=2.8.0 world.lastInstantiated=Map_World From dd89966aed48d9bddeffa6a317cf67ae0bb1711f Mon Sep 17 00:00:00 2001 From: JulienRo Date: Tue, 28 Jun 2016 08:13:12 +0200 Subject: [PATCH 08/24] Add files via upload --- Colours.java | 49 +++++++++++++++++++++++++++++-------------------- Map.java | 32 +++++++++++++++++++++----------- Start_Load.java | 26 +++++++++++++++----------- 3 files changed, 65 insertions(+), 42 deletions(-) diff --git a/Colours.java b/Colours.java index 4e75759..1f16b6a 100644 --- a/Colours.java +++ b/Colours.java @@ -1,7 +1,7 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** - * Write a description of class Colours here. + * Write a description of class Colors here. * * @author (your name) * @version (a version number or a date) @@ -15,9 +15,9 @@ public class Colours extends World implements ButtonEvent Button lila = new Button ("Lila", 16, this); Button gelb = new Button ("Gelb", 16, this); Button weiter = new Button ("Weiter", 16, this); - int [] colour = new int [6]; + int [] color = new int [6]; String [] pn = new String [6]; - int x; + int x = 0; boolean possw = true; boolean posbl = true; boolean posgr = true; @@ -32,18 +32,20 @@ public class Colours extends World implements ButtonEvent int li = 6; /** - * Constructor for objects of class Colours. + * Constructor for objects of class Colors. * */ - public Colours() + public Colours(int x, int y, int z) { - super(1600, 900, 1); + + super(x, y, z); addObject(schwarz, 10, 10); - addObject ( blau, 25, 10); - addObject ( grün, 40, 10); - addObject ( rot, 55, 10); - addObject(gelb, 70, 10); - addObject(lila, 85, 10); + addObject ( blau, 35, 10); + addObject ( grün, 55, 10); + addObject ( rot, 75, 10); + addObject(gelb, 100, 10); + addObject(lila, 125, 10); + addObject (weiter, 200,10); } // Überprüft, ob ein Farbbutton geklickt wurde @@ -58,50 +60,57 @@ public class Colours extends World implements ButtonEvent { if ( b == schwarz && possw == true) { - colour [x] = sw; + color [x] = sw; pn[x]="Schwarz"; x+=1; possw = false; } if (b == blau && posbl == true) { - colour[x] = bl; + color[x] = bl; pn[x] = "Blau"; x+=1; posbl = false; } if (b == grün && posgr == true ) { - colour[x] = gr; + color[x] = gr; pn[x]="Grün"; x+=1; posgr = false; } if ( b == rot && posrt == true) { - colour[x] = rt; + color[x] = rt; pn[x]="Rot"; x+=1; posrt = false; } if ( b == gelb && posgb == true) { - colour [x] = gb; + color [x] = gb; pn[x]="Gelb"; x+=1; posgb = false; } if ( b == lila && posli == true) { - colour [x] = li; + color [x] = li; pn[x]="Lila"; x+=1; posli = false; } - if ( b == weiter && x >1) + if ( b == weiter && x >=2 ) { - Map m = new Map(colour, x, pn); - //setWorld(m); + String[] newpn = new String[x]; + int[] newcolor = new int[x]; + for (int i = 0; i< x; i++) + { + newpn[i] = pn[i]; + newcolor[i] = color[i]; + } + World m = new Map(newcolor, x,newpn); + Greenfoot.setWorld(m); } } diff --git a/Map.java b/Map.java index e5e8273..bbc56b2 100644 --- a/Map.java +++ b/Map.java @@ -6,7 +6,7 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) * @author (your name) * @version (a version number or a date) */ -public class Map implements ButtonEvent +public class Map extends World implements ButtonEvent { private Button map1 = new Button ("map1",16,this); private Button map2 = new Button ("map2",16,this); @@ -17,21 +17,27 @@ public class Map implements ButtonEvent //private int x; //private int y; private int m=0; - private GeneralMap GM ; - + private Map_World MW ; + // int [] newcolour = new int [pnu]; + // String [] newpn = new String [pnu]; public Map( int [] bunt, int zahl , String [] name) { - super(1600, 900, 1); - - for (int i=0; i<6; i++) + + super (1600,900,1); + for (int i=0; i Date: Tue, 28 Jun 2016 08:20:33 +0200 Subject: [PATCH 09/24] Player-redraw Hallo --- Player.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Player.java b/Player.java index fceba65..24b73bc 100644 --- a/Player.java +++ b/Player.java @@ -261,7 +261,7 @@ public class Player extends Actor private void redraw(GreenfootImage statistics,GreenfootImage flag, int textSize) { - flag.scale(137,100); + flag.scale(137,83); statistics.drawImage(flag,0,textSize); GreenfootImage playerStatistics = new GreenfootImage(stats[0] + "||" + stats[1] + "||" + stats[2],textSize,new Color(0,0,0),new Color(1.0f,1.0f,1.0f,0.5f)); GreenfootImage playerStatistics2 = new GreenfootImage(stats[3] + "||" + stats[4] + "||" + stats[5],textSize,new Color(0,0,0),new Color(1.0f,1.0f,1.0f,0.5f)); From cbeb159f288e7a2c20b1155f707dd1025b866a06 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:25:26 +0200 Subject: [PATCH 10/24] Delete Start_Load.ctxt --- Start_Load.ctxt | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 Start_Load.ctxt diff --git a/Start_Load.ctxt b/Start_Load.ctxt deleted file mode 100644 index 1f74977..0000000 --- a/Start_Load.ctxt +++ /dev/null @@ -1,11 +0,0 @@ -#BlueJ class context -comment0.target=Start_Load -comment0.text=\r\n\ Beginnt\ neues\ Spiel/\ l\u00E4dt\ altes\ Spiel.\r\n\ \r\n\ @author\ 4ngelica\ \r\n\ @version\ 1.0\r\n -comment1.params= -comment1.target=Start_Load() -comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ Start_Load.\r\n\ \r\n -comment2.params=b -comment2.target=void\ buttonClicked(Button) -comment3.params= -comment3.target=void\ Load() -numComments=4 From 1de09cb6288dee7d650ed690bbe3572410a95c70 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:25:34 +0200 Subject: [PATCH 11/24] Delete Start_Load.class --- Start_Load.class | Bin 845 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Start_Load.class diff --git a/Start_Load.class b/Start_Load.class deleted file mode 100644 index 9c8c79872dd171460f750eac39c32a659f486521..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 845 zcmYk4+iuf95QhJalQ?nQCQjQxfkN7Ha9n6Ol&c^FL{LRCa1qq1+<;>*!L8#(j#FNM zm*6pwfK*iCf=eC>F>B{^;aTr^=KKE{`R~79zX9ywp#~jSRa`5et|5cXB1+iOC~RxE zjvFd&YAE2AyqGE)Dl8Q{47p+KL@`6bem06@5w;lekNnV&A2TRsWU0WvaGto#4QUe0iTFv++lN$e`O@$$e)F$0OuYFM+oM-#y_TL&==VNd?xU z3aWQcUOJzq9NEdBb;T%h`3qkPmgmgfW9QV-QNeBUn>wc%LjJklcLrR3xT9kkWgWX{ zs<^A;9_}-!Z4nS~C<_c753naCW==_>A8{Uj5F&0KiYSm)Q~L8$9@3ifW~bAUp0`a~ zT4)AN*l%{@$PfFi&Sa>hwk4~Ij_1AZ9dnmjYo=AZJtYMWhQW3D|R-=>Q z0xnL}4yiLEd#p34U$JzK!qFJTGiZ{kB-CX(fpw_FG_a8nYiZYnD3#Y~7KTen7n8%t b;&h}PN=gH4?lhfoYr!3xxw}H88EpIqhRLEc From 94f3e0c3f34780aaeec0196e0e12b42fdd00c9eb Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:25:43 +0200 Subject: [PATCH 12/24] Delete Map_World.ctxt --- Map_World.ctxt | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 Map_World.ctxt diff --git a/Map_World.ctxt b/Map_World.ctxt deleted file mode 100644 index 5ca8991..0000000 --- a/Map_World.ctxt +++ /dev/null @@ -1,7 +0,0 @@ -#BlueJ class context -comment0.target=Map_World -comment0.text=\r\n\tKlasse\ der\ Standard-Welt\r\n\t(Also\ die\ normale\ Weltkarte\ mit\ allen\ Kontinenten)\r\n\r\n\t@author\ GruenerWal,\ MaxiJohl\r\n\t@version\ 0.3.0\r\n -comment1.params=playerList\ colorList -comment1.target=Map_World(java.lang.String[],\ int[]) -comment1.text=\ \r\n\t\tKonstruktor\ der\ Weltkarte;\r\n\t\tkonstruiert\ eine\ GeneralMap\ mit\ den\ Ausmassen\ 1600\ auf\ 900\ Pixel.\r\n -numComments=2 From a9309045da84ce970bfc23bf7c84bacf3e7e559b Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:27:15 +0200 Subject: [PATCH 13/24] Delete Colors.java --- Colors.java | 109 ---------------------------------------------------- 1 file changed, 109 deletions(-) delete mode 100644 Colors.java diff --git a/Colors.java b/Colors.java deleted file mode 100644 index aef76cf..0000000 --- a/Colors.java +++ /dev/null @@ -1,109 +0,0 @@ -import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) - -/** - * Write a description of class Colors here. - * - * @author (your name) - * @version (a version number or a date) - */ -public class Colors extends World implements ButtonEvent -{ - Button schwarz = new Button ("Schwarz", 16, this); - Button blau = new Button ("Blau", 16, this); - Button grün = new Button ("Grün", 16, this); - Button rot = new Button ("Rot", 16, this); - Button lila = new Button ("Lila", 16, this); - Button gelb = new Button ("Gelb", 16, this); - Button weiter = new Button ("Weiter", 16, this); - int [] color = new int [6]; - String [] pn = new String [6]; - int x; - boolean possw = true; - boolean posbl = true; - boolean posgr = true; - boolean posrt = true; - boolean posgb = true; - boolean posli = true; - int sw = 1; - int bl = 2; - int gr = 3; - int rt = 4; - int gb = 5; - int li = 6; - - /** - * Constructor for objects of class Colors. - * - */ - public Colors() - { - super(1600, 900, 1); - addObject(schwarz, 10, 10); - addObject ( blau, 25, 10); - addObject ( grün, 40, 10); - addObject ( rot, 55, 10); - addObject(gelb, 70, 10); - addObject(lila, 85, 10); - - } - // Überprüft, ob ein Farbbutton geklickt wurde - //Überprüft, ob die Farbe noch nicht ausgewählt wurde - // Wenn alle Bedingungen erfüllt wurden: - // Setzt die aktuelle Stelle des Farbarrays gleich der Zahl der aktuellen Farbe - // erhöht die Variable zum Durchzählen um eins - // verhindert durch falschsetzten einer Variable die Wiederauswahl einer Farbe - // wenn Weiter geklickt wurde und x größer 1 ist wird eine neue Welt Map erzeugt, - //der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt - public void buttonClicked (Button b) - { - if ( b == schwarz && possw == true) - { - color [x] = sw; - pn[x]="Schwarz"; - x+=1; - possw = false; - } - if (b == blau && posbl == true) - { - color[x] = bl; - pn[x] = "Blau"; - x+=1; - posbl = false; - } - if (b == grün && posgr == true ) - { - color[x] = gr; - pn[x]="Grün"; - x+=1; - posgr = false; - } - if ( b == rot && posrt == true) - { - color[x] = rt; - pn[x]="Rot"; - x+=1; - posrt = false; - } - if ( b == gelb && posgb == true) - { - color [x] = gb; - pn[x]="Gelb"; - x+=1; - posgb = false; - } - if ( b == lila && posli == true) - { - color [x] = li; - pn[x]="Lila"; - x+=1; - posli = false; - } - if ( b == weiter && x >1) - { - Map m = new Map(color, x,pn); - addObject(m); - setWorld(Map,m); - } - } - -} From f52e2baabcc8590f3de018ac5b56791346adb20e Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:27:24 +0200 Subject: [PATCH 14/24] Delete Colours.class --- Colours.class | Bin 2123 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Colours.class diff --git a/Colours.class b/Colours.class deleted file mode 100644 index 2dde27b57fb994e976811fc472dcc00465f8b3a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2123 zcmZux&2v*#96dMRNnhL76#4~i!78Q?p;(2gMTAzU!SEr0);0*dq>uEqkGz_uErR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ctxt | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Colours.ctxt diff --git a/Colours.ctxt b/Colours.ctxt deleted file mode 100644 index a4c8b15..0000000 --- a/Colours.ctxt +++ /dev/null @@ -1,9 +0,0 @@ -#BlueJ class context -comment0.target=Colours -comment0.text=\r\n\ Write\ a\ description\ of\ class\ Colours\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n -comment1.params= -comment1.target=Colours() -comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ Colours.\r\n\ \r\n -comment2.params=b -comment2.target=void\ buttonClicked(Button) -numComments=3 From 0632fd183e34fbf4bb42a64ffc103f93eecbef09 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:27:42 +0200 Subject: [PATCH 16/24] Delete GeneralMap.class --- GeneralMap.class | Bin 2285 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 GeneralMap.class diff --git a/GeneralMap.class b/GeneralMap.class deleted file mode 100644 index 6babceea9a159f5f0068cb17719c48857d37433f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2285 zcmZuxU2_v<6n=KI%_ix#X$vXRfKdD(O-qWkP^7d_`+>pq%Rr%2rQ38VfixSpDGnE+ zGj@hM{Q=&n!;Cjv=!_J{k6wD=UvS1t$4jp}B0lHcZCXn&@_w9s&NV%jc#LU((_4(nU+~|#&q1=^GdW?k6 z|1B6nMJt|rw^%MXD;nzOa#O*rUxQgG+4mfe_9*S@Olw17)$^Qk)i-DepDUJ&)j!vQ=v#QY+1#g(dteS7d>jDlNo zJs+XZiJJK;qcVX?&#stw-^2+M-TWriZiz%bp_G)(rslv4>mwGgAhZ?u5w=~q` z%M7DMROJh8rKZYTvx^&mZF9<(|89HqwjINEZ(VqSuX2SRh;aM6IM$d_ak$Hkh ze$CLndG^P53>v~KT+@hg?O-7-Xksx5(rhECBm9y=CwkC@OWdcB!K*~}l29i-j}vL| zK21~ycR8i`MN_9PoS+P1%b=T?PV#&Z`ZEIROuS~I$HeOFqP{C z<6M$OL|IH}-O&pP7Y?h0~oN05dcLHdIrgA5|l#w18`uL#q%>WHefC&p4_A~jaL zRnA_7ns!%peNRGzl+mwhJ|NVVG`@o6_v|6+^hYGfrmdq{BKp(T$Q>x4k$)gf{Qr=N zk~V-dw>3v?Y=jV%HW<(wh4K*I46;3-O=29E=o>%Ba>l?Rb$p0Kr#c;yl#^>Zhv2VH zQP)r1s$P=I7ggbyf4~8+uyren!ck&kNUBK?GRFfl5u%1Uz&;rZ`cuSYYB$we9;r$2 z1^wkQWI_YR;NgJIG1(6bndFy Date: Tue, 28 Jun 2016 08:28:01 +0200 Subject: [PATCH 17/24] Delete GeneralMap.ctxt --- GeneralMap.ctxt | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 GeneralMap.ctxt diff --git a/GeneralMap.ctxt b/GeneralMap.ctxt deleted file mode 100644 index abb1e5b..0000000 --- a/GeneralMap.ctxt +++ /dev/null @@ -1,31 +0,0 @@ -#BlueJ class context -comment0.target=GeneralMap -comment0.text=\r\n\tOberklasse\ f\u00FCr\ verschiedene\ Maps;\r\n\tneue\ Maps\ werden\ als\ Unterklasse\ dieser\ Klasse\ eingef\u00FCgt.\r\n\r\n\t@author\ GruenerWal,\ MaxiJohl,\ Felix\ Stupp\r\n\t@version\ 0.3.0\r\n -comment1.params=backImage\ playerList\ colorList -comment1.target=GeneralMap(java.lang.String,\ java.lang.String[],\ int[]) -comment1.text=\r\n\t\tErstellt\ eine\ GeneralMap\ mit\ allen\ Eigenschaften\ und\ initialisiert\ die\ Arrays\ f\u00FCr\ Provinzen\ und\ Spieler.\r\n\t\t@param\ backImage\ Das\ Hintergrundbild,\ welches\ von\ dieser\ Klasse\ geladen\ und\ dargestellt\ wird.\r\n\t\t@param\ playerList\ Die\ Liste\ mit\ den\ Namen\ der\ Spieler\r\n\t\t@param\ colorList\ Die\ Liste\ mit\ den\ Farben\ der\ Spieler\r\n -comment2.params= -comment2.target=void\ initProvinces() -comment2.text=\r\n\t\tF\u00FCgt\ alle\ Provinzen\ aus\ dem\ Array\ der\ Welt\ an\ der\ entsprechden\ Stelle\ zu.\r\n -comment3.params= -comment3.target=int\ getPlayerCount() -comment3.text=\r\n\t\tGibt\ die\ Anzahl\ der\ vorhandenen\ Spieler\ aus.\r\n -comment4.params= -comment4.target=java.lang.String\ getPlayerName() -comment4.text=\r\n\t\tGibt\ den\ Namen\ des\ aktuellen\ Spielers\ aus.\r\n\t\t@return\ Der\ Name\ des\ aktuellen\ Spielers\r\n -comment5.params=plID -comment5.target=java.lang.String\ getPlayerName(int) -comment5.text=\r\n\t\tGibt\ den\ Namen\ des\ Spielers\ aus,\ dem\ dessen\ ID\ geh\u00F6rt.\r\n\t\t@param\ plID\ Die\ ID\ des\ zu\ findenden\ Spielers\r\n\t\t@return\ Der\ Name\ des\ Spielers\r\n -comment6.params= -comment6.target=int\ getPlayerStars() -comment6.text=\r\n\t\tGibt\ die\ Anzahl\ der\ Sterne\ des\ aktuellen\ Spielers\ zur\u00FCck.\r\n\t\t@return\ Die\ Anzahl\ der\ Sterne\ des\ aktuellen\ Spielers\r\n -comment7.params=prID -comment7.target=int\ getProvinceOwner(int) -comment7.text=\r\n\t\tGibt\ die\ ID\ des\ Spielers\ zur\u00FCck,\ dem\ die\ gefragte\ Provinz\ geh\u00F6rt.\r\n\t\t@param\ prID\ Die\ gefragte\ Provinz\r\n -comment8.params= -comment8.target=int[]\ getProvinceOwners() -comment8.text=\r\n\t\tGibt\ eine\ Liste\ mit\ allen\ Provinzen\ und\ deren\ Besitzern\ zur\u00FCck.\r\n\t\t@return\ Array\ mit\ der\ Provinz-ID\ als\ Index\ und\ dem\ Besitzer\ als\ Wert\r\n -comment9.params=playerID -comment9.target=int\ getProvinceEntityCount(int) -comment9.text=\r\n\t\tZ\u00E4hlt\ die\ Anzahl\ der\ Einheiten\ von\ allen\ Provinzen\ zusammen,\ die\ einem\ bestimmten\ Spieler\ geh\u00F6rt.\r\n\t\t@param\ playerID\ Die\ ID\ des\ Spielers,\ f\u00FCr\ den\ die\ Einheiten\ gez\u00E4hlt\ werden\ sollen.\r\n\t\t@return\ Die\ Anzahl\ der\ Einheiten,\ die\ dem\ Spieler\ geh\u00F6ren.\r\n -numComments=10 From 80da614b15c6dd947a0a0eb2110b1bb52c56956b Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:28:12 +0200 Subject: [PATCH 18/24] Delete Map.class --- Map.class | Bin 1357 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Map.class diff --git a/Map.class b/Map.class deleted file mode 100644 index e2f2d4706f5227d1b8e7d081ae857e0c98bee996..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1357 zcmZuxOLNm!6#lLyTe2f3%EJyRk3e}j3M3^>(??Ps33(V4LhF=HCkrau!ckBpk0P_^ zt}|@<3%c)ut~-N)X=%Ife<;)6!GiR=lEZs*zVn@X&e1vFy`z6#{Qeh!S$tDK37=~C zOh>tZ3_j0e1YhVlBynEHg2XSSxv1fi#LLoLk!DdAEJ<^9C<;D zrAj;K2nZ<_&!s3mEpQ8@Q3jU&wwRL38#syUTq#vfGTT5I zqXrIPRG|O(N>4%8_uat2m^}IbhXu^HwKH%8M-3duxPfERtmB4(4QX!TD+4F+p@y#w z)UZjFIe?rgcB1&U9XcFYsmM`JR^GjoYHye2du|ZV%PhU+#@~9)csnWMUF8{AbG_C! zCCfX_=0<(TZO|`Q>{jHu!JROSr>`{PFq*GcWryKc;njl#_T6LOF!DLh$m^9!j9=yw zBYeq#&gV#(=w+l*2~ry(q&x{yjsz(NF(Z{pkU}KLWpN4urvdR3a>z3J%z6xA{ejGP zLyBpVs9j`Jo;%=L%Jl=Dx6ItrLKg+%pXlqtu#_%}%A8tK&D<{-w;rNUQYTC5)COIn zq@FLSGqwAw_;vq3>qr;<7Q@-W++_)mFwo5UgUbDsm?V!dC^NJ)LrXKvvE~~|=JoG; zdHFOiFZ0rr#O3L4+)%+8+C`YOWvJ+*q6T#+@;A|s1q@&r!?;FOH>u=pYPmzdO)Wco zRzFk2zp3QEyos~yFiX|esbht4mHZhdU=gJ^$y$+k=Xjb)yz}g%V2b`IGW#seYM9pW zk Date: Tue, 28 Jun 2016 08:28:19 +0200 Subject: [PATCH 19/24] Delete Map.ctxt --- Map.ctxt | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 Map.ctxt diff --git a/Map.ctxt b/Map.ctxt deleted file mode 100644 index e275363..0000000 --- a/Map.ctxt +++ /dev/null @@ -1,8 +0,0 @@ -#BlueJ class context -comment0.target=Map -comment0.text=\r\n\ Write\ a\ description\ of\ class\ Map\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n -comment1.params=bunt\ zahl\ name -comment1.target=Map(int[],\ int,\ java.lang.String[]) -comment2.params=b -comment2.target=void\ buttonClicked(Button) -numComments=3 From 59ba3423aa81a1d4722b8938649b568a984e341f Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:28:26 +0200 Subject: [PATCH 20/24] Delete Map_World.class --- Map_World.class | Bin 3419 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Map_World.class diff --git a/Map_World.class b/Map_World.class deleted file mode 100644 index a0bd944d7ec137aa50c6530a27de3dd175087dce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3419 zcmZ{mU2Ggz701ury)$!ny|(9GJC46&JO13JHBd^SPD32$11J7SvaTJ+ZIiJ*Sx>y) zHM6sBQz{jSR|GsE`ce>;P=!>9N(q%9R6APIfzaP=$_nIxa}Qy(Tf7_!3td=qJJ=IWg*+(Ao=@U` z5ZukQkNHaAo_!jhd=^0c71|&T;C!4n;;|F&LMrd(??F1BzYA%3^CuwhfrZzW{4vON zDc#fVZE0-#es(==Ew4*^dE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ue, 28 Jun 2016 08:28:41 +0200 Subject: [PATCH 21/24] Delete Start_Button.java --- Start_Button.java | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Start_Button.java diff --git a/Start_Button.java b/Start_Button.java deleted file mode 100644 index 6ed3e01..0000000 --- a/Start_Button.java +++ /dev/null @@ -1,26 +0,0 @@ -import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) - -/** - * Startet neues Spiel. - * - * @author 4ngelica - * @version 1.0 - */ -public class Start_Button extends Button -{ - public Start_Button() { - super("New Game", 32); - } - - /** - * Erstellt neue Klasse Colors. - */ - public void act() - { - setLocation(100,100); - if (Greenfoot.mouseClicked(this)) - { - Greenfoot.setWorld(new Colors()); - } - } -} From 1e75b6527c8d687f117fb0c40b9e8d586ded8c36 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Tue, 28 Jun 2016 08:31:21 +0200 Subject: [PATCH 22/24] Add files via upload --- Colours.java | 8 ++++++++ Map.java | 4 ++++ Start_Load.java | 1 + 3 files changed, 13 insertions(+) diff --git a/Colours.java b/Colours.java index 1f16b6a..ea3c9ae 100644 --- a/Colours.java +++ b/Colours.java @@ -46,6 +46,13 @@ public class Colours extends World implements ButtonEvent addObject(gelb, 100, 10); addObject(lila, 125, 10); addObject (weiter, 200,10); + schwarz.setSize(100, 50); + gelb.setSize(100, 50); + blau.setSize(100, 50); + grün.setSize(100, 50); + rot.setSize(100, 50); + lila.setSize(100, 50); + weiter.setSize(100, 50); } // Überprüft, ob ein Farbbutton geklickt wurde @@ -58,6 +65,7 @@ public class Colours extends World implements ButtonEvent //der per Konstruktor die Daten der Colorklasse übertragen werden, dannach wird die Map die aktive Welt public void buttonClicked (Button b) { + if ( b == schwarz && possw == true) { color [x] = sw; diff --git a/Map.java b/Map.java index bbc56b2..a518e67 100644 --- a/Map.java +++ b/Map.java @@ -33,6 +33,9 @@ public class Map extends World implements ButtonEvent addObject(map1, (1600-map1.getWidth())/2, (900-map1.getHeight())/2); addObject(map2, ((1600-map2.getWidth())/2)-25, ((900-map1.getHeight())/2)+75); addObject(fertigst, (1600-fertigst.getWidth()), 900-fertigst.getWidth()); + map1.setSize(100, 50); + map2.setSize(100, 50); + fertigst.setSize(100, 50); // for ( int i=0; i<=pnu; i++) // { // newpn[i] = pn[i]; @@ -42,6 +45,7 @@ public class Map extends World implements ButtonEvent // Die Map Buttons geben der Variable m einen Wert public void buttonClicked(Button b) { + if (b== map1) { //x= ; diff --git a/Start_Load.java b/Start_Load.java index e2e39a8..fede870 100644 --- a/Start_Load.java +++ b/Start_Load.java @@ -18,6 +18,7 @@ public class Start_Load extends World implements ButtonEvent { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(1600, 900, 1); + chulien.setSize(100,50); addObject (chulien, (1600-chulien.getWidth())/2, (900-chulien.getHeight())/2); } public void buttonClicked ( Button b) From 42f78c03160ab9547051d975e108c9ec2d2173b5 Mon Sep 17 00:00:00 2001 From: aaronholz Date: Tue, 28 Jun 2016 08:37:44 +0200 Subject: [PATCH 23/24] Redraw Province Verbesserung Redraw Province Verbesserung, Verbesserung des Gesamtsystems --- Province.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Province.java b/Province.java index b1a7cc7..0b00510 100644 --- a/Province.java +++ b/Province.java @@ -169,7 +169,7 @@ public class Province extends Actor { int textSize; textSize = 20; - GreenfootImage province = new GreenfootImage(100,100); + GreenfootImage province = new GreenfootImage(120,100); GreenfootImage provinceName = new GreenfootImage(displayName,textSize,new Color(0,0,0),new Color(1.0f,1.0f,1.0f,0.5f)); province.drawImage(provinceName,0,0); oDecide(province,textSize); @@ -235,18 +235,18 @@ public class Province extends Actor if(eCountTanks == 2) { province.drawImage(tank,0,textSize); - province.drawImage(tank,17,textSize); + province.drawImage(tank,textSize,textSize); } if(eCountTanks == 3) { province.drawImage(tank,0,textSize); province.drawImage(tank,textSize,textSize); - province.drawImage(tank,textSize,textSize); + province.drawImage(tank,textSize*2,textSize); } } else { - GreenfootImage eCountTanksImage = new GreenfootImage(Integer.toString(eCountTanks) + "x",textSize,Color.CYAN,new Color(1.0f,1.0f,1.0f,0.5f)); + GreenfootImage eCountTanksImage = new GreenfootImage(Integer.toString(eCountTanks) + "x",textSize,Color.BLACK,new Color(1.0f,1.0f,1.0f,0.5f)); province.drawImage(eCountTanksImage,0,textSize); province.drawImage(tank,45,textSize); } @@ -255,7 +255,7 @@ public class Province extends Actor horse.scale(textSize,textSize); if(eCountHorse == 1) { - province.drawImage(horse,0,2 * textSize); + province.drawImage(horse,4*textSize,textSize); } GreenfootImage Inf = new GreenfootImage("images\\infanterieskal-" + ownerString + ".png"); int eCountInf = eCount - (eCountTanks * 5) - (eCountHorse * 3); @@ -264,12 +264,12 @@ public class Province extends Actor { if(eCountInf == 1) { - province.drawImage(Inf,0,3* textSize); + province.drawImage(Inf,5*textSize,textSize); } if(eCountInf == 2) { - province.drawImage(Inf,0,3 * textSize); - province.drawImage(Inf,25,3 * textSize); + province.drawImage(Inf,5*textSize,textSize); + province.drawImage(Inf,5*textSize,textSize); } } setImage(province); From 6a8ae155fee7b983d0f336051445422218a7fdb2 Mon Sep 17 00:00:00 2001 From: JulienRo Date: Tue, 28 Jun 2016 08:51:50 +0200 Subject: [PATCH 24/24] Add files via upload --- Colours.java | 14 +++++++------- Map.java | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Colours.java b/Colours.java index ea3c9ae..8675db2 100644 --- a/Colours.java +++ b/Colours.java @@ -39,13 +39,13 @@ public class Colours extends World implements ButtonEvent { super(x, y, z); - addObject(schwarz, 10, 10); - addObject ( blau, 35, 10); - addObject ( grün, 55, 10); - addObject ( rot, 75, 10); - addObject(gelb, 100, 10); - addObject(lila, 125, 10); - addObject (weiter, 200,10); + addObject(schwarz, 50, 30); + addObject ( blau, 170, 30); + addObject ( grün, 280, 30); + addObject ( rot, 390, 30); + addObject(gelb, 500, 30); + addObject(lila, 610, 30); + addObject (weiter, 335,90); schwarz.setSize(100, 50); gelb.setSize(100, 50); blau.setSize(100, 50); diff --git a/Map.java b/Map.java index a518e67..59f39cf 100644 --- a/Map.java +++ b/Map.java @@ -30,9 +30,9 @@ public class Map extends World implements ButtonEvent pn[i] = name[i]; } pnu=zahl; - addObject(map1, (1600-map1.getWidth())/2, (900-map1.getHeight())/2); - addObject(map2, ((1600-map2.getWidth())/2)-25, ((900-map1.getHeight())/2)+75); - addObject(fertigst, (1600-fertigst.getWidth()), 900-fertigst.getWidth()); + addObject(map1, 50, 30); + addObject(map2, 170, 30); + addObject(fertigst,110,90 ); map1.setSize(100, 50); map2.setSize(100, 50); fertigst.setSize(100, 50);