Merge branch 'gui' of https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02 into gui
After Width: | Height: | Size: 518 KiB |
@ -0,0 +1,152 @@
|
|||||||
|
# Blender 4.2.2 LTS MTL File: 'Hotel.V.1.2.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 3.8 4 0 Hotel_texture2.png
|
||||||
|
|
||||||
|
newmtl Material.002
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.799099 0.004025 0.021219
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Material.008
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.215859 0.215861 0.215861
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Material.010
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0 -15 -s 4.28 4 0 Hotel_texture3.jpeg
|
||||||
|
|
||||||
|
newmtl Material.011
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 3.8 4 0 Hotel_texture2.png
|
||||||
|
|
||||||
|
newmtl Material.012
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0 -15 -s 4.28 4 0 Hotel_texture3.jpeg
|
||||||
|
|
||||||
|
newmtl Material.013
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.799099 0.004025 0.021219
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Material.014
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 3.8 4 0 Hotel_texture2.png
|
||||||
|
|
||||||
|
newmtl Material.015
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0 -15 -s 4.28 4 0 Hotel_texture3.jpeg
|
||||||
|
|
||||||
|
newmtl Material.016
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.799099 0.004025 0.021219
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Material.019
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 4.15 3.9 0 Hotel_texture1.jpeg
|
||||||
|
|
||||||
|
newmtl Material.022
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 4.15 3.8 0 Hotel_texture1.jpeg
|
||||||
|
|
||||||
|
newmtl Material.023
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 4.15 3.8 0 Hotel_texture1.jpeg
|
||||||
|
|
||||||
|
newmtl Material.024
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd -o 0 0.6 0 -s 4.15 3.9 0 Hotel_texture1.jpeg
|
||||||
|
|
||||||
|
newmtl Material.025
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.215859 0.215861 0.215861
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.500000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
@ -0,0 +1,558 @@
|
|||||||
|
# Blender 4.2.2 LTS
|
||||||
|
# www.blender.org
|
||||||
|
mtllib Hotel.V.1.2.mtl
|
||||||
|
o Korridor
|
||||||
|
v 1.832325 0.743096 0.449194
|
||||||
|
v 1.832325 0.295686 0.449194
|
||||||
|
v 0.271347 0.743096 0.429009
|
||||||
|
v 0.271347 0.295686 0.429009
|
||||||
|
v 1.837850 0.743096 0.022004
|
||||||
|
v 1.837850 0.295686 0.022004
|
||||||
|
v 0.276871 0.743096 0.001818
|
||||||
|
v 0.276871 0.295686 0.001818
|
||||||
|
vn -0.0129 -0.0000 0.9999
|
||||||
|
vn -0.9999 -0.0000 -0.0129
|
||||||
|
vn 0.0129 -0.0000 -0.9999
|
||||||
|
vn 0.9999 -0.0000 0.0129
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.008
|
||||||
|
f 1/1/1 3/4/1 4/3/1 2/2/1
|
||||||
|
f 3/4/2 7/6/2 8/5/2 4/3/2
|
||||||
|
f 7/6/3 5/8/3 6/7/3 8/5/3
|
||||||
|
f 5/8/4 1/10/4 2/9/4 6/7/4
|
||||||
|
f 3/11/5 1/12/5 5/8/5 7/6/5
|
||||||
|
f 8/5/6 6/7/6 2/14/6 4/13/6
|
||||||
|
o Dach300.002
|
||||||
|
v 2.503119 1.817345 1.102498
|
||||||
|
v 2.142795 1.919807 1.102498
|
||||||
|
v 2.503119 1.817345 -0.809905
|
||||||
|
v 2.142795 1.919807 -0.809905
|
||||||
|
v 1.831221 1.817345 1.102498
|
||||||
|
v 2.138520 1.919807 1.102498
|
||||||
|
v 1.831221 1.817345 -0.809905
|
||||||
|
v 2.138520 1.919807 -0.809905
|
||||||
|
vn 0.2735 0.9619 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn -0.3163 0.9487 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.002
|
||||||
|
f 9/15/7 11/18/7 12/17/7 10/16/7
|
||||||
|
f 11/18/8 15/20/8 16/19/8 12/17/8
|
||||||
|
f 15/20/9 13/22/9 14/21/9 16/19/9
|
||||||
|
f 13/22/10 9/24/10 10/23/10 14/21/10
|
||||||
|
f 11/25/11 9/26/11 13/22/11 15/20/11
|
||||||
|
f 16/19/12 14/21/12 10/28/12 12/27/12
|
||||||
|
o neu1
|
||||||
|
v 1.833977 0.294749 1.094962
|
||||||
|
v 1.833977 1.817107 1.094962
|
||||||
|
v 1.833977 0.294749 -0.825603
|
||||||
|
v 1.833977 1.817107 -0.825603
|
||||||
|
v 2.517500 0.294749 1.094962
|
||||||
|
v 2.517500 1.817107 1.094962
|
||||||
|
v 2.517500 0.294749 -0.825603
|
||||||
|
v 2.517500 1.817107 -0.825603
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material
|
||||||
|
f 17/29/13 18/30/13 20/31/13 19/32/13
|
||||||
|
f 19/32/14 20/31/14 24/33/14 23/34/14
|
||||||
|
f 23/34/15 24/33/15 22/35/15 21/36/15
|
||||||
|
f 21/36/16 22/35/16 18/37/16 17/38/16
|
||||||
|
f 19/39/17 23/34/17 21/36/17 17/40/17
|
||||||
|
f 24/33/18 20/41/18 18/42/18 22/35/18
|
||||||
|
o Frontfassade
|
||||||
|
v 1.837487 0.305766 1.101834
|
||||||
|
v 1.837487 1.807752 1.101834
|
||||||
|
v 1.837487 0.305766 1.092930
|
||||||
|
v 1.837487 1.807752 1.092930
|
||||||
|
v 2.509542 0.305766 1.101834
|
||||||
|
v 2.509542 1.807752 1.101834
|
||||||
|
v 2.509542 0.305766 1.092930
|
||||||
|
v 2.509542 1.807752 1.092930
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.010
|
||||||
|
f 25/43/19 26/44/19 28/45/19 27/46/19
|
||||||
|
f 27/46/20 28/45/20 32/47/20 31/48/20
|
||||||
|
f 31/48/21 32/47/21 30/49/21 29/50/21
|
||||||
|
f 29/50/22 30/49/22 26/51/22 25/52/22
|
||||||
|
f 27/53/23 31/48/23 29/50/23 25/54/23
|
||||||
|
f 32/47/24 28/55/24 26/56/24 30/49/24
|
||||||
|
o neu1.001
|
||||||
|
v -2.645782 0.310702 1.102233
|
||||||
|
v -2.645782 1.833060 1.102233
|
||||||
|
v -2.645782 0.310702 -0.818333
|
||||||
|
v -2.645782 1.833060 -0.818333
|
||||||
|
v -1.962258 0.310702 1.102233
|
||||||
|
v -1.962258 1.833060 1.102233
|
||||||
|
v -1.962258 0.310702 -0.818333
|
||||||
|
v -1.962258 1.833060 -0.818333
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.011
|
||||||
|
f 33/57/25 34/58/25 36/59/25 35/60/25
|
||||||
|
f 35/60/26 36/59/26 40/61/26 39/62/26
|
||||||
|
f 39/62/27 40/61/27 38/63/27 37/64/27
|
||||||
|
f 37/64/28 38/63/28 34/65/28 33/66/28
|
||||||
|
f 35/67/29 39/62/29 37/64/29 33/68/29
|
||||||
|
f 40/61/30 36/69/30 34/70/30 38/63/30
|
||||||
|
o Frontfassade.001
|
||||||
|
v -2.642272 0.321718 1.109104
|
||||||
|
v -2.642272 1.823704 1.109104
|
||||||
|
v -2.642272 0.321718 1.100200
|
||||||
|
v -2.642272 1.823704 1.100200
|
||||||
|
v -1.970217 0.321718 1.109104
|
||||||
|
v -1.970217 1.823704 1.109104
|
||||||
|
v -1.970217 0.321718 1.100200
|
||||||
|
v -1.970217 1.823704 1.100200
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.012
|
||||||
|
f 41/71/31 42/72/31 44/73/31 43/74/31
|
||||||
|
f 43/74/32 44/73/32 48/75/32 47/76/32
|
||||||
|
f 47/76/33 48/75/33 46/77/33 45/78/33
|
||||||
|
f 45/78/34 46/77/34 42/79/34 41/80/34
|
||||||
|
f 43/81/35 47/76/35 45/78/35 41/82/35
|
||||||
|
f 48/75/36 44/83/36 42/84/36 46/77/36
|
||||||
|
o Dach300.001
|
||||||
|
v -1.976640 1.833298 1.092314
|
||||||
|
v -2.336963 1.935760 1.092314
|
||||||
|
v -1.976640 1.833298 -0.785180
|
||||||
|
v -2.336963 1.935760 -0.785180
|
||||||
|
v -2.648537 1.833298 1.092314
|
||||||
|
v -2.341239 1.935760 1.092314
|
||||||
|
v -2.648537 1.833298 -0.785180
|
||||||
|
v -2.341239 1.935760 -0.785180
|
||||||
|
vn 0.2735 0.9619 -0.0000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn -0.3163 0.9487 -0.0000
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.013
|
||||||
|
f 49/85/37 51/88/37 52/87/37 50/86/37
|
||||||
|
f 51/88/38 55/90/38 56/89/38 52/87/38
|
||||||
|
f 55/90/39 53/92/39 54/91/39 56/89/39
|
||||||
|
f 53/92/40 49/94/40 50/93/40 54/91/40
|
||||||
|
f 51/95/41 49/96/41 53/92/41 55/90/41
|
||||||
|
f 56/89/42 54/91/42 50/98/42 52/97/42
|
||||||
|
o neu1.002
|
||||||
|
v -0.141720 0.277559 1.245076
|
||||||
|
v -0.141720 1.799917 1.245076
|
||||||
|
v -0.526580 0.277559 -0.636534
|
||||||
|
v -0.526580 1.799917 -0.636534
|
||||||
|
v 0.527939 0.277559 1.108105
|
||||||
|
v 0.527939 1.799917 1.108105
|
||||||
|
v 0.143079 0.277559 -0.773505
|
||||||
|
v 0.143079 1.799917 -0.773505
|
||||||
|
vn -0.9797 -0.0000 0.2004
|
||||||
|
vn -0.2004 -0.0000 -0.9797
|
||||||
|
vn 0.9797 -0.0000 -0.2004
|
||||||
|
vn 0.2004 -0.0000 0.9797
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.014
|
||||||
|
f 57/99/43 58/100/43 60/101/43 59/102/43
|
||||||
|
f 59/102/44 60/101/44 64/103/44 63/104/44
|
||||||
|
f 63/104/45 64/103/45 62/105/45 61/106/45
|
||||||
|
f 61/106/46 62/105/46 58/107/46 57/108/46
|
||||||
|
f 59/109/47 63/104/47 61/106/47 57/110/47
|
||||||
|
f 64/103/48 60/111/48 58/112/48 62/105/48
|
||||||
|
o Frontfassade.002
|
||||||
|
v -0.136904 0.288576 1.251104
|
||||||
|
v -0.136904 1.790561 1.251104
|
||||||
|
v -0.138688 0.288576 1.242381
|
||||||
|
v -0.138688 1.790561 1.242381
|
||||||
|
v 0.521519 0.288576 1.116432
|
||||||
|
v 0.521519 1.790561 1.116432
|
||||||
|
v 0.519735 0.288576 1.107709
|
||||||
|
v 0.519735 1.790561 1.107709
|
||||||
|
vn -0.9797 -0.0000 0.2004
|
||||||
|
vn -0.2004 -0.0000 -0.9797
|
||||||
|
vn 0.9797 -0.0000 -0.2004
|
||||||
|
vn 0.2004 -0.0000 0.9797
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.015
|
||||||
|
f 65/113/49 66/114/49 68/115/49 67/116/49
|
||||||
|
f 67/116/50 68/115/50 72/117/50 71/118/50
|
||||||
|
f 71/118/51 72/117/51 70/119/51 69/120/51
|
||||||
|
f 69/120/52 70/119/52 66/121/52 65/122/52
|
||||||
|
f 67/123/53 71/118/53 69/120/53 65/124/53
|
||||||
|
f 72/117/54 68/125/54 66/126/54 70/119/54
|
||||||
|
o Dach300.003
|
||||||
|
v 0.511862 1.800155 1.101269
|
||||||
|
v 0.158847 1.902617 1.173474
|
||||||
|
v 0.135633 1.800155 -0.738143
|
||||||
|
v -0.217382 1.902617 -0.665938
|
||||||
|
v -0.146407 1.800155 1.235910
|
||||||
|
v 0.154658 1.902617 1.174331
|
||||||
|
v -0.522636 1.800155 -0.603502
|
||||||
|
v -0.221571 1.902617 -0.665081
|
||||||
|
vn 0.2680 0.9619 -0.0548
|
||||||
|
vn -0.2004 -0.0000 -0.9797
|
||||||
|
vn -0.3099 0.9487 0.0634
|
||||||
|
vn 0.2004 -0.0000 0.9797
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.016
|
||||||
|
f 73/127/55 75/130/55 76/129/55 74/128/55
|
||||||
|
f 75/130/56 79/132/56 80/131/56 76/129/56
|
||||||
|
f 79/132/57 77/134/57 78/133/57 80/131/57
|
||||||
|
f 77/134/58 73/136/58 74/135/58 78/133/58
|
||||||
|
f 75/137/59 73/138/59 77/134/59 79/132/59
|
||||||
|
f 80/131/60 78/133/60 74/140/60 76/139/60
|
||||||
|
o Korridor.002
|
||||||
|
v 0.294809 0.748953 0.441551
|
||||||
|
v 0.294809 0.301543 0.441551
|
||||||
|
v 1.816918 0.748953 0.453486
|
||||||
|
v 1.816918 0.301543 0.453486
|
||||||
|
v 0.294640 0.748953 0.463026
|
||||||
|
v 0.294640 0.301543 0.463026
|
||||||
|
v 1.816749 0.748953 0.474962
|
||||||
|
v 1.816749 0.301543 0.474962
|
||||||
|
vn 0.0078 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0078
|
||||||
|
vn -0.0078 -0.0000 1.0000
|
||||||
|
vn -1.0000 -0.0000 -0.0078
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.019
|
||||||
|
f 81/141/61 83/144/61 84/143/61 82/142/61
|
||||||
|
f 83/144/62 87/146/62 88/145/62 84/143/62
|
||||||
|
f 87/146/63 85/148/63 86/147/63 88/145/63
|
||||||
|
f 85/148/64 81/150/64 82/149/64 86/147/64
|
||||||
|
f 83/151/65 81/152/65 85/148/65 87/146/65
|
||||||
|
f 88/145/66 86/147/66 82/154/66 84/153/66
|
||||||
|
o Korridor.003
|
||||||
|
v 0.295923 0.753172 -0.007372
|
||||||
|
v 0.295923 0.305763 -0.007372
|
||||||
|
v 1.818032 0.753172 0.004563
|
||||||
|
v 1.818032 0.305763 0.004563
|
||||||
|
v 0.295755 0.753172 0.014104
|
||||||
|
v 0.295755 0.305763 0.014104
|
||||||
|
v 1.817863 0.753172 0.026039
|
||||||
|
v 1.817863 0.305763 0.026039
|
||||||
|
vn 0.0078 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0078
|
||||||
|
vn -0.0078 -0.0000 1.0000
|
||||||
|
vn -1.0000 -0.0000 -0.0078
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.022
|
||||||
|
f 89/155/67 91/158/67 92/157/67 90/156/67
|
||||||
|
f 91/158/68 95/160/68 96/159/68 92/157/68
|
||||||
|
f 95/160/69 93/162/69 94/161/69 96/159/69
|
||||||
|
f 93/162/70 89/164/70 90/163/70 94/161/70
|
||||||
|
f 91/165/71 89/166/71 93/162/71 95/160/71
|
||||||
|
f 96/159/72 94/161/72 90/168/72 92/167/72
|
||||||
|
o Korridor.004
|
||||||
|
v -2.035452 0.753172 0.001578
|
||||||
|
v -2.035452 0.305763 0.001578
|
||||||
|
v -0.305429 0.753172 0.015144
|
||||||
|
v -0.305429 0.305763 0.015144
|
||||||
|
v -2.035621 0.753172 0.023054
|
||||||
|
v -2.035621 0.305763 0.023054
|
||||||
|
v -0.305598 0.753172 0.036620
|
||||||
|
v -0.305598 0.305763 0.036620
|
||||||
|
vn 0.0078 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0078
|
||||||
|
vn -0.0078 -0.0000 1.0000
|
||||||
|
vn -1.0000 -0.0000 -0.0078
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.023
|
||||||
|
f 97/169/73 99/172/73 100/171/73 98/170/73
|
||||||
|
f 99/172/74 103/174/74 104/173/74 100/171/74
|
||||||
|
f 103/174/75 101/176/75 102/175/75 104/173/75
|
||||||
|
f 101/176/76 97/178/76 98/177/76 102/175/76
|
||||||
|
f 99/179/77 97/180/77 101/176/77 103/174/77
|
||||||
|
f 104/173/78 102/175/78 98/182/78 100/181/78
|
||||||
|
o Korridor.005
|
||||||
|
v -2.036718 0.748953 0.450501
|
||||||
|
v -2.036718 0.301543 0.450501
|
||||||
|
v -0.306695 0.748953 0.464067
|
||||||
|
v -0.306695 0.301543 0.464067
|
||||||
|
v -2.036887 0.748953 0.471977
|
||||||
|
v -2.036887 0.301543 0.471977
|
||||||
|
v -0.306864 0.748953 0.485542
|
||||||
|
v -0.306864 0.301543 0.485542
|
||||||
|
vn 0.0078 -0.0000 -1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0078
|
||||||
|
vn -0.0078 -0.0000 1.0000
|
||||||
|
vn -1.0000 -0.0000 -0.0078
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.024
|
||||||
|
f 105/183/79 107/186/79 108/185/79 106/184/79
|
||||||
|
f 107/186/80 111/188/80 112/187/80 108/185/80
|
||||||
|
f 111/188/81 109/190/81 110/189/81 112/187/81
|
||||||
|
f 109/190/82 105/192/82 106/191/82 110/189/82
|
||||||
|
f 107/193/83 105/194/83 109/190/83 111/188/83
|
||||||
|
f 112/187/84 110/189/84 106/196/84 108/195/84
|
||||||
|
o Korridor.006
|
||||||
|
v -0.288805 0.743096 0.460344
|
||||||
|
v -0.288805 0.295686 0.460344
|
||||||
|
v -2.062986 0.743096 0.437401
|
||||||
|
v -2.062986 0.295686 0.437401
|
||||||
|
v -0.283281 0.743096 0.033143
|
||||||
|
v -0.283281 0.295686 0.033143
|
||||||
|
v -2.057462 0.743096 0.010200
|
||||||
|
v -2.057462 0.295686 0.010200
|
||||||
|
vn -0.0129 -0.0000 0.9999
|
||||||
|
vn -0.9999 -0.0000 -0.0129
|
||||||
|
vn 0.0129 -0.0000 -0.9999
|
||||||
|
vn 0.9999 -0.0000 0.0129
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
s 0
|
||||||
|
usemtl Material.025
|
||||||
|
f 113/197/85 115/200/85 116/199/85 114/198/85
|
||||||
|
f 115/200/86 119/202/86 120/201/86 116/199/86
|
||||||
|
f 119/202/87 117/204/87 118/203/87 120/201/87
|
||||||
|
f 117/204/88 113/206/88 114/205/88 118/203/88
|
||||||
|
f 115/207/89 113/208/89 117/204/89 119/202/89
|
||||||
|
f 120/201/90 118/203/90 114/210/90 116/209/90
|
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 552 KiB |
After Width: | Height: | Size: 100 KiB |
@ -218,7 +218,6 @@ selector("button", "pp") {
|
|||||||
insets = new Insets3f(3, 3, 3, 3) // Adjust the border thickness
|
insets = new Insets3f(3, 3, 3, 3) // Adjust the border thickness
|
||||||
textHAlignment = HAlignment.Center
|
textHAlignment = HAlignment.Center
|
||||||
textVAlignment = VAlignment.Center
|
textVAlignment = VAlignment.Center
|
||||||
buttonCommands = stdButtonCommands
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selector("slider", "pp") {
|
selector("slider", "pp") {
|
||||||
@ -387,7 +386,7 @@ selector("button-toolbar", "pp") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
selector("button-toolbar2", "pp") { playerColor ->
|
selector("button-clear", "pp") { playerColor ->
|
||||||
def validColor = playerColor ?: new ColorRGBA(0, 0, 0, 0) // Vollständig transparent
|
def validColor = playerColor ?: new ColorRGBA(0, 0, 0, 0) // Vollständig transparent
|
||||||
def playerGradientBackground = new QuadBackgroundComponent(validColor)
|
def playerGradientBackground = new QuadBackgroundComponent(validColor)
|
||||||
|
|
||||||
@ -395,12 +394,7 @@ selector("button-toolbar2", "pp") { playerColor ->
|
|||||||
playerGradientBackground.setColor(new ColorRGBA(0, 0, 0, 0)) // RGBA (Rot, Grün, Blau, Alpha)
|
playerGradientBackground.setColor(new ColorRGBA(0, 0, 0, 0)) // RGBA (Rot, Grün, Blau, Alpha)
|
||||||
|
|
||||||
background = playerGradientBackground.clone() // Setze den Hintergrund
|
background = playerGradientBackground.clone() // Setze den Hintergrund
|
||||||
insets = new Insets3f(3, 3, 3, 3) // Optional: Ränder
|
insets = new Insets3f(-3, -3, -3, -3) // Optional: Ränder
|
||||||
textHAlignment = HAlignment.Center // Text-Zentrierung
|
textHAlignment = HAlignment.Center // Text-Zentrierung
|
||||||
textVAlignment = VAlignment.Center // Text-Zentrierung
|
textVAlignment = VAlignment.Center // Text-Zentrierung
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,38 +2,92 @@ package pp.monopoly.client.gui;
|
|||||||
|
|
||||||
import com.jme3.texture.Texture;
|
import com.jme3.texture.Texture;
|
||||||
import com.simsilica.lemur.Button;
|
import com.simsilica.lemur.Button;
|
||||||
|
import com.simsilica.lemur.Command;
|
||||||
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
||||||
import com.simsilica.lemur.style.ElementId;
|
|
||||||
|
|
||||||
import pp.monopoly.client.MonopolyApp;
|
import pp.monopoly.client.MonopolyApp;
|
||||||
|
import pp.monopoly.game.server.Player;
|
||||||
|
import pp.monopoly.game.server.PlayerColor;
|
||||||
|
import pp.monopoly.notification.Sound;
|
||||||
|
|
||||||
public class ImageButton extends Button {
|
public class ImageButton extends Button {
|
||||||
|
|
||||||
private final String file;
|
private final MonopolyApp app;
|
||||||
private static MonopolyApp app;
|
private final String functionality;
|
||||||
|
private final PlayerColor playerColor;
|
||||||
public ImageButton( String s, String file, MonopolyApp app ) {
|
|
||||||
this(s, true, new ElementId(ELEMENT_ID), null, file, app);
|
public ImageButton(String functionality, MonopolyApp app) {
|
||||||
}
|
super("", "button-clear");
|
||||||
|
this.app = app;
|
||||||
public ImageButton( String s, String style, String file, MonopolyApp app ) {
|
this.functionality = functionality;
|
||||||
this(s, true, new ElementId(ELEMENT_ID), style, file, app);
|
this.playerColor = Player.getColor(app.getId());
|
||||||
}
|
|
||||||
|
updateButtonAppearance(ButtonState.ENABLED);
|
||||||
public ImageButton( String s, ElementId elementId, String file, MonopolyApp app ) {
|
addButtonCommands();
|
||||||
this(s, true, elementId, null, file, app);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageButton( String s, ElementId elementId, String style, String file, MonopolyApp app ) {
|
|
||||||
this(s, true, elementId, style, file, app);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ImageButton( String s, boolean applyStyles, ElementId elementId, String style, String file, MonopolyApp app ) {
|
|
||||||
super(s, false, elementId, style);
|
|
||||||
this.file = file;
|
|
||||||
ImageButton.app = app;
|
|
||||||
Texture backgroundImage = app.getAssetManager().loadTexture("Pictures/Buttons/"+file+".png");
|
|
||||||
setBackground(new QuadBackgroundComponent(backgroundImage));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the button's appearance based on its state.
|
||||||
|
*
|
||||||
|
* @param state the current button state
|
||||||
|
*/
|
||||||
|
private void updateButtonAppearance(ButtonState state) {
|
||||||
|
setBackgroundTexture(state.name().toLowerCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds button commands for state-specific actions like hover, press, enable, and disable.
|
||||||
|
*/
|
||||||
|
private void addButtonCommands() {
|
||||||
|
addCommands(ButtonAction.Enabled, source -> updateButtonAppearance(ButtonState.ENABLED));
|
||||||
|
addCommands(ButtonAction.Disabled, source -> updateButtonAppearance(ButtonState.DISABLED));
|
||||||
|
addCommands(ButtonAction.Hover, source -> {
|
||||||
|
if (isEnabled()) {
|
||||||
|
updateButtonAppearance(ButtonState.HOVER);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
addCommands(ButtonAction.HighlightOff, source -> updateButtonAppearance(isEnabled() ? ButtonState.ENABLED : ButtonState.DISABLED));
|
||||||
|
addCommands(ButtonAction.Up, source -> updateButtonAppearance(isEnabled() ? ButtonState.ENABLED : ButtonState.DISABLED));
|
||||||
|
addCommands(ButtonAction.Down, source -> {
|
||||||
|
if (isEnabled()) {
|
||||||
|
app.getGameLogic().playSound(Sound.BUTTON);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the background texture for the button based on the given state.
|
||||||
|
*
|
||||||
|
* @param state the button state (e.g., "enabled", "disabled", "hover")
|
||||||
|
*/
|
||||||
|
private void setBackgroundTexture(String state) {
|
||||||
|
String texturePath = buildTexturePath(state);
|
||||||
|
Texture texture = app.getAssetManager().loadTexture(texturePath);
|
||||||
|
setBackground(new QuadBackgroundComponent(texture));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the file path for the button texture.
|
||||||
|
*
|
||||||
|
* @param state the button state (e.g., "enabled", "disabled", "hover")
|
||||||
|
* @return the full file path to the texture
|
||||||
|
*/
|
||||||
|
private String buildTexturePath(String state) {
|
||||||
|
return String.format("Pictures/Buttons/Button_%s_%s_%s.png", functionality, playerColor.getColorName(), state);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Button states for handling appearance transitions.
|
||||||
|
*/
|
||||||
|
private enum ButtonState {
|
||||||
|
ENABLED, DISABLED, HOVER
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addClickCommands( Command<? super Button> command ) {
|
||||||
|
super.addCommands(ButtonAction.Down, command);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked") // because Java doesn't like var-arg generics
|
||||||
|
public void addClickCommands( Command<? super Button>... commands ) {
|
||||||
|
super.addCommands(ButtonAction.Down, commands);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,8 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
|
|
||||||
toolbarContainer = setupToolbar();
|
toolbarContainer = setupToolbar();
|
||||||
app.getGuiNode().attachChild(toolbarContainer);
|
app.getGuiNode().attachChild(toolbarContainer);
|
||||||
|
|
||||||
|
endTurnButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -175,9 +177,9 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
*/
|
*/
|
||||||
private void setupActionMenu(Container container) {
|
private void setupActionMenu(Container container) {
|
||||||
Container menuContainer = container.addChild(new Container());
|
Container menuContainer = container.addChild(new Container());
|
||||||
menuContainer.addChild(createTradeButton(getCurrentPlayerColor()));
|
menuContainer.addChild(createTradeButton());
|
||||||
menuContainer.addChild(createPropertyMenuButton(getCurrentPlayerColor()));
|
menuContainer.addChild(createPropertyMenuButton());
|
||||||
menuContainer.addChild(createEndTurnButton(getCurrentPlayerColor()));
|
menuContainer.addChild(createEndTurnButton());
|
||||||
menuContainer.setBackground(null);
|
menuContainer.setBackground(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,58 +280,65 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a trade button with the specified player color.
|
|
||||||
*
|
|
||||||
* @param playerColor The color of the player.
|
|
||||||
* @return The button representing the trade action.
|
|
||||||
*/
|
|
||||||
private Button createTradeButton(ColorRGBA playerColor) {
|
|
||||||
return createActionButton(playerColor, "icons/icon-handeln.png", 100, () -> new ChoosePartner(app).open());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
private Button createTradeButton() {
|
||||||
* Creates a property menu button with the specified player color.
|
String iconPath = "icons/icon-handeln.png";
|
||||||
*
|
// createActionButton(playerColor, "icons/icon-handeln.png", 100, () -> new ChoosePartner(app).open());
|
||||||
* @param playerColor The color of the player.
|
tradeButton = new ImageButton("generic", app);
|
||||||
* @return The button representing the property menu action.
|
tradeButton.setPreferredSize(new Vector3f(150, 50, 0));
|
||||||
*/
|
|
||||||
private Button createPropertyMenuButton(ColorRGBA playerColor) {
|
|
||||||
return createActionButton(playerColor, "icons/icon-gebaude.png", 75, () -> new BuildingAdminMenu(app).open());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an end turn button with the specified player color.
|
|
||||||
*
|
|
||||||
* @param playerColor The color of the player.
|
|
||||||
* @return The button representing the end turn action.
|
|
||||||
*/
|
|
||||||
private Button createEndTurnButton(ColorRGBA playerColor) {
|
|
||||||
return createActionButton(playerColor, "icons/icon-zugbeenden.png", 75, () -> handleEndTurn());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an action button with the specified color, icon path, icon size, and action.
|
|
||||||
*
|
|
||||||
* @param color The color of the button.
|
|
||||||
* @param iconPath The path to the icon image.
|
|
||||||
* @param iconSize The size of the icon.
|
|
||||||
* @param action The action to perform when the button is clicked.
|
|
||||||
* @return The button representing the action.
|
|
||||||
*/
|
|
||||||
private Button createActionButton(ColorRGBA color, String iconPath, int iconSize, Runnable action) {
|
|
||||||
Button button = new Button("", new ElementId("button-toolbar2"));
|
|
||||||
button.setPreferredSize(new Vector3f(150, 50, 0));
|
|
||||||
button.setBackground(createButtonBackground(color));
|
|
||||||
|
|
||||||
IconComponent icon = new IconComponent(iconPath);
|
IconComponent icon = new IconComponent(iconPath);
|
||||||
icon.setHAlignment(HAlignment.Center);
|
icon.setHAlignment(HAlignment.Center);
|
||||||
icon.setVAlignment(VAlignment.Center);
|
icon.setVAlignment(VAlignment.Center);
|
||||||
icon.setIconSize(new Vector2f(iconSize, iconSize));
|
icon.setIconSize(new Vector2f(75 , 75));
|
||||||
button.setIcon(icon);
|
tradeButton.setIcon(icon);
|
||||||
|
|
||||||
button.addClickCommands(source -> ifTopDialog(action));
|
tradeButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||||
return button;
|
new ChoosePartner(app).open();
|
||||||
|
}));
|
||||||
|
|
||||||
|
return tradeButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Button createPropertyMenuButton() {
|
||||||
|
|
||||||
|
String iconPath = "icons/icon-gebaude.png";
|
||||||
|
propertyMenuButton = new ImageButton("generic", app);
|
||||||
|
propertyMenuButton.setPreferredSize(new Vector3f(150, 50, 0));
|
||||||
|
|
||||||
|
IconComponent icon = new IconComponent(iconPath);
|
||||||
|
icon.setHAlignment(HAlignment.Center);
|
||||||
|
icon.setVAlignment(VAlignment.Center);
|
||||||
|
icon.setIconSize(new Vector2f(50 , 50));
|
||||||
|
propertyMenuButton.setIcon(icon);
|
||||||
|
|
||||||
|
propertyMenuButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||||
|
new BuildingAdminMenu(app).open();
|
||||||
|
}));
|
||||||
|
|
||||||
|
return propertyMenuButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Button createEndTurnButton() {
|
||||||
|
// return createActionButton(playerColor, "icons/icon-zugbeenden.png", 75, () -> handleEndTurn());
|
||||||
|
|
||||||
|
String iconPath = "icons/icon-zugbeenden.png";
|
||||||
|
endTurnButton = new ImageButton("generic", app);
|
||||||
|
endTurnButton.setPreferredSize(new Vector3f(150, 50, 0));
|
||||||
|
|
||||||
|
IconComponent icon = new IconComponent(iconPath);
|
||||||
|
icon.setHAlignment(HAlignment.Center);
|
||||||
|
icon.setVAlignment(VAlignment.Center);
|
||||||
|
icon.setIconSize(new Vector2f(50 , 50));
|
||||||
|
endTurnButton.setIcon(icon);
|
||||||
|
|
||||||
|
endTurnButton.addClickCommands(s -> ifTopDialog(() -> {
|
||||||
|
app.getGameLogic().send(new EndTurn());
|
||||||
|
receivedEvent(new ButtonStatusEvent(false));
|
||||||
|
}));
|
||||||
|
|
||||||
|
return endTurnButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -517,11 +526,12 @@ public class Toolbar extends Dialog implements GameEventListener {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void receivedEvent(ButtonStatusEvent event) {
|
public void receivedEvent(ButtonStatusEvent event) {
|
||||||
|
System.out.println("Button status event received: " + event.buttonsEnabled()+ "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG");
|
||||||
boolean enabled = event.buttonsEnabled();
|
boolean enabled = event.buttonsEnabled();
|
||||||
canRollDice = enabled;
|
canRollDice = enabled;
|
||||||
if (tradeButton != null) tradeButton.setEnabled(enabled);
|
tradeButton.setEnabled(enabled);
|
||||||
if (propertyMenuButton != null) propertyMenuButton.setEnabled(enabled);
|
propertyMenuButton.setEnabled(enabled);
|
||||||
if (endTurnButton != null) endTurnButton.setEnabled(false);
|
endTurnButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 518 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 552 KiB |
After Width: | Height: | Size: 100 KiB |
@ -447,16 +447,99 @@ public class ServerGameLogic implements ClientInterpreter {
|
|||||||
} else if (msg.getKeyword().equals("PayJail")) {
|
} else if (msg.getKeyword().equals("PayJail")) {
|
||||||
playerHandler.getPlayerById(from).payBail();
|
playerHandler.getPlayerById(from).payBail();
|
||||||
} else if(msg.getKeyword().equals("hack")) {
|
} else if(msg.getKeyword().equals("hack")) {
|
||||||
// for (BuildingProperty bp : boardManager.getPropertyFields( List.of(1,3)).stream().filter(p -> p instanceof BuildingProperty).map(p -> (BuildingProperty) p).collect(Collectors.toList())) {
|
generatePredefinedGameState();
|
||||||
// bp.build();
|
|
||||||
// }
|
|
||||||
for(PropertyField field : boardManager.getBoard().stream().filter(p -> p instanceof PropertyField).map(p -> (PropertyField) p).collect(Collectors.toList())) {
|
|
||||||
field.setOwner(playerHandler.getPlayerById(0));
|
|
||||||
playerHandler.getPlayerById(0).addProperty(field.getId());
|
|
||||||
}
|
|
||||||
playerHandler.getPlayerById(0).earnMoney(20000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateAllPlayers();
|
updateAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void generatePredefinedGameState() {
|
||||||
|
// Ensure at least two players exist
|
||||||
|
if (playerHandler.getPlayers().size() < 2) {
|
||||||
|
Player player1 = new Player(0, "Player1", playerHandler);
|
||||||
|
Player player2 = new Player(1, "Player2", playerHandler);
|
||||||
|
|
||||||
|
playerHandler.addPlayer(player1);
|
||||||
|
playerHandler.addPlayer(player2);
|
||||||
|
}
|
||||||
|
|
||||||
|
Player p1 = playerHandler.getPlayerById(0);
|
||||||
|
Player p2 = playerHandler.getPlayerById(1);
|
||||||
|
|
||||||
|
// Reset properties and balances for a clean state
|
||||||
|
p1.getProperties().clear();
|
||||||
|
p2.getProperties().clear();
|
||||||
|
boardManager.getBoard().forEach(field -> {
|
||||||
|
if (field instanceof PropertyField) {
|
||||||
|
((PropertyField) field).setOwner(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Define properties to assign
|
||||||
|
Set<Integer> p1Properties = Set.of(1, 3, 6, 8); // Gym, Sportplatz, Studium+, PhysikHörsaal
|
||||||
|
Set<Integer> p2Properties = Set.of(21, 23, 24, 9); // Red set + Audimax
|
||||||
|
|
||||||
|
// Assign properties via AlterProperty
|
||||||
|
assignProperties(p1, p1Properties);
|
||||||
|
assignProperties(p2, p2Properties);
|
||||||
|
|
||||||
|
// Player 1 builds houses on Gym and Sportplatz
|
||||||
|
buildHouses(p1, Set.of(1, 3));
|
||||||
|
|
||||||
|
// Player 2 builds houses on the Red set
|
||||||
|
buildHouses(p2, Set.of(21, 23, 24));
|
||||||
|
|
||||||
|
// Set player balances
|
||||||
|
p1.setAccountBalance(12325);
|
||||||
|
p2.setAccountBalance(26750);
|
||||||
|
|
||||||
|
// Add Get Out of Jail cards
|
||||||
|
p1.addJailCard();
|
||||||
|
|
||||||
|
// Set player positions
|
||||||
|
p1.setPosition(6); // Near Studium+
|
||||||
|
p2.setPosition(25); // Near Nordtor
|
||||||
|
|
||||||
|
LOGGER.log(Level.INFO, "Predefined game state generated.");
|
||||||
|
updateAllPlayers();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assigns properties to a player using AlterProperty messages.
|
||||||
|
*
|
||||||
|
* @param player the player to assign properties to
|
||||||
|
* @param properties the set of property IDs to assign
|
||||||
|
*/
|
||||||
|
private void assignProperties(Player player, Set<Integer> properties) {
|
||||||
|
AlterProperty alterProperty = new AlterProperty("AssignProperties");
|
||||||
|
alterProperty.setProperties(properties);
|
||||||
|
|
||||||
|
for (Integer propertyId : properties) {
|
||||||
|
PropertyField field = (PropertyField) boardManager.getFieldAtIndex(propertyId);
|
||||||
|
field.setOwner(player);
|
||||||
|
player.addProperty(propertyId);
|
||||||
|
}
|
||||||
|
LOGGER.log(Level.DEBUG, "Properties assigned to player {0}: {1}", player.getName(), properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds houses for a player on specific properties using AlterProperty messages.
|
||||||
|
*
|
||||||
|
* @param player the player building houses
|
||||||
|
* @param properties the set of property IDs to build houses on
|
||||||
|
*/
|
||||||
|
private void buildHouses(Player player, Set<Integer> properties) {
|
||||||
|
AlterProperty alterProperty = new AlterProperty("BuyHouse");
|
||||||
|
alterProperty.setProperties(properties);
|
||||||
|
|
||||||
|
for (Integer propertyId : properties) {
|
||||||
|
BuildingProperty field = (BuildingProperty) boardManager.getFieldAtIndex(propertyId);
|
||||||
|
if (boardManager.canBuild(field) && player.getAccountBalance() >= field.getHousePrice()) {
|
||||||
|
field.build();
|
||||||
|
player.pay(field.getHousePrice());
|
||||||
|
LOGGER.log(Level.DEBUG, "House built on property {0} for player {1}.", field.getName(), player.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ public class ServerGameLogicTest {
|
|||||||
// Arrange: Spieler initialisieren und Position setzen
|
// Arrange: Spieler initialisieren und Position setzen
|
||||||
Player player = new Player(1, "Testspieler", mock(PlayerHandler.class)); // Spieler-Objekt erstellen
|
Player player = new Player(1, "Testspieler", mock(PlayerHandler.class)); // Spieler-Objekt erstellen
|
||||||
Figure figure = mock(Figure.class); // Mock für die Spielfigur
|
Figure figure = mock(Figure.class); // Mock für die Spielfigur
|
||||||
player.setFigure(figure); // Mock-Figur dem Spieler zuweisen
|
|
||||||
int initialFieldID = player.getFieldID(); // Startfeld
|
int initialFieldID = player.getFieldID(); // Startfeld
|
||||||
DiceResult diceResult = new DiceResult(3, 4); // Würfel: 3 und 4
|
DiceResult diceResult = new DiceResult(3, 4); // Würfel: 3 und 4
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ public class ServerGameLogicTest {
|
|||||||
|
|
||||||
// Assert: Position überprüfen und sicherstellen, dass `figure.moveTo` aufgerufen wurde
|
// Assert: Position überprüfen und sicherstellen, dass `figure.moveTo` aufgerufen wurde
|
||||||
assertEquals(expectedFieldID, player.getFieldID()); // Überprüfen, ob der Spieler auf dem erwarteten Feld ist
|
assertEquals(expectedFieldID, player.getFieldID()); // Überprüfen, ob der Spieler auf dem erwarteten Feld ist
|
||||||
verify(figure).moveTo(expectedFieldID); // Sicherstellen, dass die Figur bewegt wurde
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -748,7 +748,6 @@ public class ServerGameLogicTest {
|
|||||||
|
|
||||||
// Create a player with mocked handler
|
// Create a player with mocked handler
|
||||||
Player player = new Player(1, "Spieler 1", handler);
|
Player player = new Player(1, "Spieler 1", handler);
|
||||||
player.setFigure(figure); // Set the mocked figure
|
|
||||||
// player.setPosition(5); // Set the initial position
|
// player.setPosition(5); // Set the initial position
|
||||||
|
|
||||||
// Stub handler.getLogic() to return mocked ServerGameLogic
|
// Stub handler.getLogic() to return mocked ServerGameLogic
|
||||||
@ -1028,7 +1027,11 @@ public class ServerGameLogicTest {
|
|||||||
|
|
||||||
player.jail();
|
player.jail();
|
||||||
|
|
||||||
player.payBail();
|
try {
|
||||||
|
player.payBail();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
// Assert: Spieler ist nicht mehr im Gulag und Geld wurde abgezogen
|
// Assert: Spieler ist nicht mehr im Gulag und Geld wurde abgezogen
|
||||||
assertTrue(player.canFinishTurn()); // Spieler kann den Zug beenden
|
assertTrue(player.canFinishTurn()); // Spieler kann den Zug beenden
|
||||||
@ -1231,10 +1234,6 @@ public class ServerGameLogicTest {
|
|||||||
handler.addPlayer(player2);
|
handler.addPlayer(player2);
|
||||||
handler.addPlayer(player3);
|
handler.addPlayer(player3);
|
||||||
|
|
||||||
player1.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
player2.setFigure(figure);
|
|
||||||
player3.setFigure(figure);
|
|
||||||
|
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
Card card = null;
|
Card card = null;
|
||||||
@ -1263,7 +1262,7 @@ public class ServerGameLogicTest {
|
|||||||
// Arrange
|
// Arrange
|
||||||
PlayerHandler handler = new PlayerHandler(null);
|
PlayerHandler handler = new PlayerHandler(null);
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure);
|
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
Card card = null;
|
Card card = null;
|
||||||
@ -1290,7 +1289,7 @@ public class ServerGameLogicTest {
|
|||||||
// Arrange
|
// Arrange
|
||||||
PlayerHandler handler = new PlayerHandler(null);
|
PlayerHandler handler = new PlayerHandler(null);
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
Card card = null;
|
Card card = null;
|
||||||
@ -1316,7 +1315,7 @@ public class ServerGameLogicTest {
|
|||||||
// Arrange
|
// Arrange
|
||||||
PlayerHandler handler = new PlayerHandler(null);
|
PlayerHandler handler = new PlayerHandler(null);
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
Card card = null;
|
Card card = null;
|
||||||
@ -1346,7 +1345,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
Card card = null;
|
Card card = null;
|
||||||
@ -1370,7 +1369,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1395,7 +1394,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1422,7 +1421,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1449,7 +1448,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1484,7 +1483,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
player.setAccountBalance(1500); // Startguthaben
|
player.setAccountBalance(1500); // Startguthaben
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
@ -1511,7 +1510,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1542,7 +1541,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1565,7 +1564,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
try {
|
try {
|
||||||
player.setPosition(10); // Starte auf Position 10
|
player.setPosition(10); // Starte auf Position 10
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -1594,7 +1593,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
PlayerHandler handler = new PlayerHandler(logic); // Übergebe den Mock
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Zuweisung einer Spielfigur
|
|
||||||
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
handler.addPlayer(player); // Spieler zur Liste hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1619,7 +1618,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1644,7 +1643,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1673,7 +1672,7 @@ public class ServerGameLogicTest {
|
|||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
|
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler 1 hinzufügen
|
handler.addPlayer(player); // Spieler 1 hinzufügen
|
||||||
|
|
||||||
|
|
||||||
@ -1698,7 +1697,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
player.setAccountBalance(1500); // Startsaldo setzen
|
player.setAccountBalance(1500); // Startsaldo setzen
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
@ -1725,7 +1724,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
player.setAccountBalance(1500); // Startsaldo setzen
|
player.setAccountBalance(1500); // Startsaldo setzen
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
@ -1753,7 +1752,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|
|
||||||
@ -1780,7 +1779,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
player.setAccountBalance(15000); // Anfangsstand des Kontos
|
player.setAccountBalance(15000); // Anfangsstand des Kontos
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
@ -1806,7 +1805,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
player.setAccountBalance(15000); // Anfangsstand des Kontos
|
player.setAccountBalance(15000); // Anfangsstand des Kontos
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
@ -1833,7 +1832,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
player.setAccountBalance(15000); // Anfangsstand des Kontos
|
player.setAccountBalance(15000); // Anfangsstand des Kontos
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
@ -1860,7 +1859,7 @@ public class ServerGameLogicTest {
|
|||||||
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
ServerGameLogic logic = mock(ServerGameLogic.class); // Mock der ServerGameLogic
|
||||||
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
PlayerHandler handler = new PlayerHandler(logic); // Mock-Logik übergeben
|
||||||
Player player = new Player(1, handler);
|
Player player = new Player(1, handler);
|
||||||
player.setFigure(figure); // Spielfigur setzen
|
|
||||||
handler.addPlayer(player); // Spieler hinzufügen
|
handler.addPlayer(player); // Spieler hinzufügen
|
||||||
player.setAccountBalance(15000); // Startguthaben des Spielers
|
player.setAccountBalance(15000); // Startguthaben des Spielers
|
||||||
DeckHelper deckHelper = new DeckHelper();
|
DeckHelper deckHelper = new DeckHelper();
|
||||||
|