diff --git a/deliverables/Coverage/coverage_1.JPG b/deliverables/Coverage/coverage_1.JPG index 3cb96bb..32f01e4 100644 Binary files a/deliverables/Coverage/coverage_1.JPG and b/deliverables/Coverage/coverage_1.JPG differ diff --git a/deliverables/Coverage/coverage_2.JPG b/deliverables/Coverage/coverage_2.JPG index 34fbd2b..1550e9f 100644 Binary files a/deliverables/Coverage/coverage_2.JPG and b/deliverables/Coverage/coverage_2.JPG differ diff --git a/deliverables/Coverage/htmlReport/css/coverage.css b/deliverables/Coverage/htmReport/css/coverage.css similarity index 100% rename from deliverables/Coverage/htmlReport/css/coverage.css rename to deliverables/Coverage/htmReport/css/coverage.css diff --git a/deliverables/Coverage/htmlReport/css/idea.min.css b/deliverables/Coverage/htmReport/css/idea.min.css similarity index 100% rename from deliverables/Coverage/htmlReport/css/idea.min.css rename to deliverables/Coverage/htmReport/css/idea.min.css diff --git a/deliverables/Coverage/htmlReport/img/arrowDown.gif b/deliverables/Coverage/htmReport/img/arrowDown.gif similarity index 100% rename from deliverables/Coverage/htmlReport/img/arrowDown.gif rename to deliverables/Coverage/htmReport/img/arrowDown.gif diff --git a/deliverables/Coverage/htmlReport/img/arrowUp.gif b/deliverables/Coverage/htmReport/img/arrowUp.gif similarity index 100% rename from deliverables/Coverage/htmlReport/img/arrowUp.gif rename to deliverables/Coverage/htmReport/img/arrowUp.gif diff --git a/deliverables/Coverage/htmlReport/index.html b/deliverables/Coverage/htmReport/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/index.html rename to deliverables/Coverage/htmReport/index.html index 14f1208..62df9f4 100644 --- a/deliverables/Coverage/htmlReport/index.html +++ b/deliverables/Coverage/htmReport/index.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -125,7 +125,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -133,7 +133,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -157,18 +157,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -184,26 +184,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -219,10 +219,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -235,10 +235,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -282,10 +282,10 @@ Current scope: all classes - 100% + 94.7% - (38/38) + (36/38) @@ -298,10 +298,10 @@ Current scope: all classes - 100% + 98.4% - (129/129) + (127/129) @@ -320,7 +320,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -329,7 +329,7 @@ Current scope: all classes 100% - (29/29) + (26/26) @@ -345,10 +345,10 @@ Current scope: all classes - 100% + 94.3% - (49/49) + (50/53) @@ -361,10 +361,10 @@ Current scope: all classes - 100% + 97.2% - (108/108) + (103/106) @@ -383,7 +383,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -399,7 +399,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -458,10 +458,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -469,7 +469,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -523,7 +523,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -539,7 +539,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -593,7 +593,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -601,7 +601,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -609,7 +609,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -636,7 +636,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -671,7 +671,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -679,7 +679,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -698,7 +698,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -706,7 +706,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -714,7 +714,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -730,10 +730,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -746,10 +746,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/index_SORT_BY_BLOCK.html index 7e0d1b2..6eeed9b 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_BLOCK.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -145,7 +145,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -154,7 +154,7 @@ Current scope: all classes 100% - (29/29) + (26/26) @@ -181,7 +181,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -189,7 +189,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -243,7 +243,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -259,7 +259,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -313,7 +313,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -321,7 +321,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -329,7 +329,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -356,7 +356,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -391,7 +391,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -399,7 +399,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -418,7 +418,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -426,7 +426,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -434,7 +434,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -450,10 +450,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -466,10 +466,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -493,18 +493,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -520,26 +520,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -563,10 +563,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -574,7 +574,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -590,10 +590,10 @@ Current scope: all classes - 100% + 94.7% - (38/38) + (36/38) @@ -606,10 +606,10 @@ Current scope: all classes - 100% + 98.4% - (129/129) + (127/129) @@ -660,10 +660,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -676,10 +676,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -695,10 +695,10 @@ Current scope: all classes - 100% + 94.3% - (49/49) + (50/53) @@ -711,10 +711,10 @@ Current scope: all classes - 100% + 97.2% - (108/108) + (103/106) @@ -733,7 +733,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -749,7 +749,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/index_SORT_BY_BLOCK_DESC.html index a5b86da..490cb72 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_BLOCK_DESC.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -117,7 +117,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -133,7 +133,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -149,10 +149,10 @@ Current scope: all classes - 100% + 94.3% - (49/49) + (50/53) @@ -165,10 +165,10 @@ Current scope: all classes - 100% + 97.2% - (108/108) + (103/106) @@ -184,10 +184,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -200,10 +200,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -254,10 +254,10 @@ Current scope: all classes - 100% + 94.7% - (38/38) + (36/38) @@ -270,10 +270,10 @@ Current scope: all classes - 100% + 98.4% - (129/129) + (127/129) @@ -297,10 +297,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -308,7 +308,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -324,26 +324,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -367,18 +367,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -394,10 +394,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -410,10 +410,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -432,7 +432,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -440,7 +440,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -448,7 +448,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -475,7 +475,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -483,7 +483,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -510,7 +510,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -537,7 +537,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -545,7 +545,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -553,7 +553,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -607,7 +607,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -623,7 +623,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -685,7 +685,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -693,7 +693,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -712,7 +712,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -721,7 +721,7 @@ Current scope: all classes 100% - (29/29) + (26/26) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/index_SORT_BY_CLASS.html index 6dbfa6f..80a16d3 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_CLASS.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -125,7 +125,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -133,7 +133,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -187,7 +187,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -203,7 +203,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -257,7 +257,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -265,7 +265,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -273,7 +273,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -300,7 +300,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -335,7 +335,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -343,7 +343,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -362,7 +362,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -370,7 +370,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -378,7 +378,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -402,18 +402,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -429,10 +429,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -445,10 +445,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -464,26 +464,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -499,10 +499,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -515,10 +515,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -562,10 +562,10 @@ Current scope: all classes - 100% + 94.7% - (38/38) + (36/38) @@ -578,10 +578,10 @@ Current scope: all classes - 100% + 98.4% - (129/129) + (127/129) @@ -600,7 +600,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -609,7 +609,7 @@ Current scope: all classes 100% - (29/29) + (26/26) @@ -625,10 +625,10 @@ Current scope: all classes - 100% + 94.3% - (49/49) + (50/53) @@ -641,10 +641,10 @@ Current scope: all classes - 100% + 97.2% - (108/108) + (103/106) @@ -663,7 +663,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -679,7 +679,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -738,10 +738,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -749,7 +749,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/index_SORT_BY_CLASS_DESC.html index af31910..b3e2186 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_CLASS_DESC.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -122,10 +122,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -133,7 +133,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -187,7 +187,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -203,7 +203,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -219,10 +219,10 @@ Current scope: all classes - 100% + 94.3% - (49/49) + (50/53) @@ -235,10 +235,10 @@ Current scope: all classes - 100% + 97.2% - (108/108) + (103/106) @@ -257,7 +257,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -266,7 +266,7 @@ Current scope: all classes 100% - (29/29) + (26/26) @@ -282,10 +282,10 @@ Current scope: all classes - 100% + 94.7% - (38/38) + (36/38) @@ -298,10 +298,10 @@ Current scope: all classes - 100% + 98.4% - (129/129) + (127/129) @@ -345,10 +345,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -361,10 +361,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -380,26 +380,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -415,10 +415,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -431,10 +431,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -458,18 +458,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -488,7 +488,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -496,7 +496,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -504,7 +504,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -531,7 +531,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -539,7 +539,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -566,7 +566,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -593,7 +593,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -601,7 +601,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -609,7 +609,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -663,7 +663,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -679,7 +679,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -741,7 +741,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -749,7 +749,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/index_SORT_BY_LINE.html index 8ea3920..8e560d9 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_LINE.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -125,7 +125,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -133,7 +133,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -187,7 +187,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -203,7 +203,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -257,7 +257,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -265,7 +265,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -273,7 +273,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -300,7 +300,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -335,7 +335,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -343,7 +343,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -362,7 +362,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -370,7 +370,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -378,7 +378,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -394,10 +394,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -410,10 +410,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -437,18 +437,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -464,26 +464,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -542,10 +542,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -553,7 +553,42 @@ Current scope: all classes 96.5% - (111/115) + (110/114) + + + + + it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters + + + 100% + + + (6/6) + + + + + 94.3% + + + (50/53) + + + + + 100% + + + (40/40) + + + + + 97.2% + + + (103/106) @@ -569,10 +604,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -583,12 +618,47 @@ Current scope: all classes (25/25) + + + 98.1% + + + (52/53) + + + + + it.polimi.ingsw.gc14.Model.Cards.Building.Effects 100% - (58/58) + (7/7) + + + + + 94.7% + + + (36/38) + + + + + 92% + + + (46/50) + + + + + 98.4% + + + (127/129) @@ -618,41 +688,6 @@ Current scope: all classes (7/7) - - - - it.polimi.ingsw.gc14.Model.Cards.Building.Effects - - - 100% - - - (7/7) - - - - - 100% - - - (38/38) - - - - - 92% - - - (46/50) - - - - - 100% - - - (129/129) - @@ -670,7 +705,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -679,42 +714,7 @@ Current scope: all classes 100% - (29/29) - - - - - it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - - - 100% - - - (6/6) - - - - - 100% - - - (49/49) - - - - - 100% - - - (40/40) - - - - - 100% - - - (108/108) + (26/26) @@ -733,7 +733,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -749,7 +749,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/index_SORT_BY_LINE_DESC.html index b34f70c..cf910f4 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_LINE_DESC.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -117,7 +117,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -133,42 +133,7 @@ Current scope: all classes 100% - (91/91) - - - - - it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - - - 100% - - - (6/6) - - - - - 100% - - - (49/49) - - - - - 100% - - - (40/40) - - - - - 100% - - - (108/108) + (93/93) @@ -187,7 +152,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -196,42 +161,7 @@ Current scope: all classes 100% - (29/29) - - - - - it.polimi.ingsw.gc14.Model.Cards.Building.Effects - - - 100% - - - (7/7) - - - - - 100% - - - (38/38) - - - - - 92% - - - (46/50) - - - - - 100% - - - (129/129) + (26/26) @@ -261,6 +191,41 @@ Current scope: all classes (7/7) + + + + it.polimi.ingsw.gc14.Model.Cards.Building.Effects + + + 100% + + + (7/7) + + + + + 94.7% + + + (36/38) + + + + + 92% + + + (46/50) + + + + + 98.4% + + + (127/129) + @@ -275,10 +240,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -289,12 +254,47 @@ Current scope: all classes (25/25) + + + 98.1% + + + (52/53) + + + + + it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (58/58) + (6/6) + + + + + 94.3% + + + (50/53) + + + + + 100% + + + (40/40) + + + + + 97.2% + + + (103/106) @@ -318,10 +318,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -329,7 +329,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -380,26 +380,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -423,18 +423,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -450,10 +450,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -466,10 +466,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -488,7 +488,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -496,7 +496,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -504,7 +504,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -531,7 +531,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -539,7 +539,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -566,7 +566,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -593,7 +593,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -601,7 +601,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -609,7 +609,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -663,7 +663,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -679,7 +679,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -741,7 +741,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -749,7 +749,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/index_SORT_BY_METHOD.html index 44f562a..4c55b13 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_METHOD.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -125,7 +125,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -133,7 +133,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -187,7 +187,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -203,7 +203,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -257,7 +257,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -265,7 +265,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -273,7 +273,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -300,7 +300,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -335,7 +335,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -343,7 +343,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -362,7 +362,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -370,7 +370,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -378,7 +378,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -402,18 +402,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -429,10 +429,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -445,10 +445,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -464,26 +464,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -520,6 +520,76 @@ Current scope: all classes (120/136) + + + + it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters + + + 100% + + + (6/6) + + + + + 94.3% + + + (50/53) + + + + + 100% + + + (40/40) + + + + + 97.2% + + + (103/106) + + + + + it.polimi.ingsw.gc14.Model.Cards.Building.Effects + + + 100% + + + (7/7) + + + + + 94.7% + + + (36/38) + + + + + 92% + + + (46/50) + + + + + 98.4% + + + (127/129) + @@ -534,10 +604,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -550,10 +620,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -583,41 +653,6 @@ Current scope: all classes (7/7) - - - - it.polimi.ingsw.gc14.Model.Cards.Building.Effects - - - 100% - - - (7/7) - - - - - 100% - - - (38/38) - - - - - 92% - - - (46/50) - - - - - 100% - - - (129/129) - @@ -635,7 +670,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -644,42 +679,7 @@ Current scope: all classes 100% - (29/29) - - - - - it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - - - 100% - - - (6/6) - - - - - 100% - - - (49/49) - - - - - 100% - - - (40/40) - - - - - 100% - - - (108/108) + (26/26) @@ -698,7 +698,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -714,7 +714,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -738,10 +738,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -749,7 +749,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/index_SORT_BY_METHOD_DESC.html index f7c944b..1fbd7a8 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_METHOD_DESC.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -122,10 +122,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -133,7 +133,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -152,7 +152,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -168,42 +168,7 @@ Current scope: all classes 100% - (91/91) - - - - - it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - - - 100% - - - (6/6) - - - - - 100% - - - (49/49) - - - - - 100% - - - (40/40) - - - - - 100% - - - (108/108) + (93/93) @@ -222,7 +187,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -231,42 +196,7 @@ Current scope: all classes 100% - (29/29) - - - - - it.polimi.ingsw.gc14.Model.Cards.Building.Effects - - - 100% - - - (7/7) - - - - - 100% - - - (38/38) - - - - - 92% - - - (46/50) - - - - - 100% - - - (129/129) + (26/26) @@ -310,10 +240,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -324,12 +254,82 @@ Current scope: all classes (25/25) + + + 98.1% + + + (52/53) + + + + + it.polimi.ingsw.gc14.Model.Cards.Building.Effects 100% - (58/58) + (7/7) + + + + + 94.7% + + + (36/38) + + + + + 92% + + + (46/50) + + + + + 98.4% + + + (127/129) + + + + + it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters + + + 100% + + + (6/6) + + + + + 94.3% + + + (50/53) + + + + + 100% + + + (40/40) + + + + + 97.2% + + + (103/106) @@ -380,26 +380,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -415,10 +415,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -431,10 +431,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -458,18 +458,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -488,7 +488,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -496,7 +496,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -504,7 +504,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -531,7 +531,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -539,7 +539,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -566,7 +566,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -593,7 +593,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -601,7 +601,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -609,7 +609,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -663,7 +663,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -679,7 +679,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -741,7 +741,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -749,7 +749,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/index_SORT_BY_NAME_DESC.html index 2b9cbe7..6aee1ee 100644 --- a/deliverables/Coverage/htmlReport/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/index_SORT_BY_NAME_DESC.html @@ -52,26 +52,26 @@ Current scope: all classes - 45.4% + 45.1% - (333/734) + (330/731) - 43.2% + 42.8% - (664/1536) + (660/1542) - 36% + 35.6% - (1326/3684) + (1308/3671) @@ -114,10 +114,10 @@ Current scope: all classes - 53.3% + 58.5% - (24/45) + (24/41) @@ -130,10 +130,10 @@ Current scope: all classes - 38.7% + 36.3% - (84/217) + (82/226) @@ -152,7 +152,7 @@ Current scope: all classes 0% - (0/130) + (0/132) @@ -160,7 +160,7 @@ Current scope: all classes 0% - (0/291) + (0/302) @@ -168,7 +168,7 @@ Current scope: all classes 0% - (0/1000) + (0/1014) @@ -195,7 +195,7 @@ Current scope: all classes 0% - (0/50) + (0/52) @@ -203,7 +203,7 @@ Current scope: all classes 0% - (0/166) + (0/164) @@ -230,7 +230,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -257,7 +257,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -265,7 +265,7 @@ Current scope: all classes 0% - (0/36) + (0/38) @@ -273,7 +273,7 @@ Current scope: all classes 0% - (0/113) + (0/105) @@ -327,7 +327,7 @@ Current scope: all classes 0% - (0/41) + (0/40) @@ -343,7 +343,7 @@ Current scope: all classes 0% - (0/175) + (0/162) @@ -402,10 +402,10 @@ Current scope: all classes - 88.2% + 89.2% - (67/76) + (66/74) @@ -413,7 +413,7 @@ Current scope: all classes 96.5% - (111/115) + (110/114) @@ -467,7 +467,7 @@ Current scope: all classes 100% - (24/24) + (28/28) @@ -483,7 +483,7 @@ Current scope: all classes 100% - (91/91) + (93/93) @@ -499,10 +499,10 @@ Current scope: all classes - 100% + 94.3% - (49/49) + (50/53) @@ -515,10 +515,10 @@ Current scope: all classes - 100% + 97.2% - (108/108) + (103/106) @@ -537,7 +537,7 @@ Current scope: all classes 100% - (15/15) + (12/12) @@ -546,7 +546,7 @@ Current scope: all classes 100% - (29/29) + (26/26) @@ -562,10 +562,10 @@ Current scope: all classes - 100% + 94.7% - (38/38) + (36/38) @@ -578,10 +578,10 @@ Current scope: all classes - 100% + 98.4% - (129/129) + (127/129) @@ -625,10 +625,10 @@ Current scope: all classes - 100% + 95% - (20/20) + (19/20) @@ -641,10 +641,10 @@ Current scope: all classes - 100% + 98.1% - (58/58) + (52/53) @@ -660,26 +660,26 @@ Current scope: all classes - 77.6% + 78.5% - (97/125) + (95/121) - 73.5% + 72.8% - (349/475) + (343/471) - 82% + 82.1% - (547/667) + (541/659) @@ -703,18 +703,18 @@ Current scope: all classes - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -741,7 +741,7 @@ Current scope: all classes 0% - (0/149) + (0/144) @@ -749,7 +749,7 @@ Current scope: all classes 0% - (0/394) + (0/391) @@ -775,7 +775,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/js/highlight.min.js b/deliverables/Coverage/htmReport/js/highlight.min.js similarity index 100% rename from deliverables/Coverage/htmlReport/js/highlight.min.js rename to deliverables/Coverage/htmReport/js/highlight.min.js diff --git a/deliverables/Coverage/htmlReport/js/highlightjs-line-numbers.min.js b/deliverables/Coverage/htmReport/js/highlightjs-line-numbers.min.js similarity index 100% rename from deliverables/Coverage/htmlReport/js/highlightjs-line-numbers.min.js rename to deliverables/Coverage/htmReport/js/highlightjs-line-numbers.min.js diff --git a/deliverables/Coverage/htmlReport/ns-1/index.html b/deliverables/Coverage/htmReport/ns-1/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index.html rename to deliverables/Coverage/htmReport/ns-1/index.html index 902753a..6cdf453 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index.html +++ b/deliverables/Coverage/htmReport/ns-1/index.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -146,7 +146,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -154,7 +154,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -244,7 +244,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -260,7 +260,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -288,7 +288,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -323,7 +323,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_BLOCK.html index d41ab41..ec4239b 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_BLOCK.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -183,7 +183,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -202,7 +202,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -210,7 +210,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -253,7 +253,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -272,7 +272,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -288,7 +288,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -323,7 +323,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_BLOCK_DESC.html index 5a4a6e2..a41e6d5 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_BLOCK_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_CLASS.html index 8f87b87..42b1200 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_CLASS.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -146,7 +146,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -154,7 +154,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -244,7 +244,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -260,7 +260,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -288,7 +288,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -323,7 +323,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_CLASS_DESC.html index e7cf41a..35e5cff 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_CLASS_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -279,7 +279,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -287,7 +287,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -295,7 +295,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_LINE.html index 037a43c..919c4aa 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_LINE.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -146,7 +146,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -154,7 +154,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -244,7 +244,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -260,7 +260,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -288,7 +288,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -323,7 +323,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_LINE_DESC.html index a7f816a..1a58809 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_LINE_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -279,7 +279,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -287,7 +287,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -295,7 +295,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_METHOD.html index dcfb312..3ce859a 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_METHOD.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -146,7 +146,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -154,7 +154,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -244,7 +244,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -260,7 +260,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -288,7 +288,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -323,7 +323,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_METHOD_DESC.html index 6e78f3e..69a0862 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_METHOD_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -279,7 +279,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -287,7 +287,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -295,7 +295,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-1/index_SORT_BY_NAME_DESC.html index 27997af..0e35554 100644 --- a/deliverables/Coverage/htmlReport/ns-1/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-1/index_SORT_BY_NAME_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14 0% - (0/149) + (0/144) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14 0% - (0/394) + (0/391) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14 0% - (0/72) + (0/71) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14 0% - (0/23) + (0/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14 0% - (0/16) + (0/15) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14 0% - (0/28) + (0/27) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14 0% - (0/108) + (0/111) @@ -279,7 +279,7 @@ it.polimi.ingsw.gc14 0% - (0/11) + (0/12) @@ -287,7 +287,7 @@ it.polimi.ingsw.gc14 0% - (0/67) + (0/62) @@ -295,7 +295,7 @@ it.polimi.ingsw.gc14 0% - (0/142) + (0/139) @@ -350,7 +350,7 @@ it.polimi.ingsw.gc14 diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-1.html b/deliverables/Coverage/htmReport/ns-1/sources/source-1.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-1.html index 99363ec..30bd842 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-1.html @@ -116,12 +116,15 @@ Current scope: all classes   *   * @param args command-line arguments passed to the JavaFX runtime.   */ -  public static void main(String[] args) { +  static void main(String[] args) {   System.setProperty("glass.gtk.uiScale", "1.0");   System.setProperty("glass.win.uiScale", "1.0");   Application.launch(GUIApp.class, args);   } -  //TODO +  /** +  * Inner {@link Application} subclass that wires the GUI to the client controller +  * and hands off control to {@link GUI#start(Stage)}. +  */   public static class GUIApp extends Application {   @Override   public void start(Stage stage) throws Exception { @@ -155,7 +158,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-2.html b/deliverables/Coverage/htmReport/ns-1/sources/source-2.html similarity index 80% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-2.html index 1e6fae1..7a3b0c2 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-2.html @@ -59,7 +59,7 @@ Current scope: all classes 0% - (0/11) + (0/12) @@ -67,7 +67,7 @@ Current scope: all classes 0% - (0/67) + (0/62) @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/142) + (0/139) @@ -91,6 +91,7 @@ Current scope: all classes    import it.polimi.ingsw.gc14.Controller.ClientController;  import it.polimi.ingsw.gc14.Model.GamePackage.GameStages; + import it.polimi.ingsw.gc14.Network.IClient;  import it.polimi.ingsw.gc14.Network.NetworkConfig;  import it.polimi.ingsw.gc14.Network.InterfaceResolver;  import it.polimi.ingsw.gc14.Network.RMI.Client.RMIClient; @@ -114,13 +115,13 @@ Current scope: all classes   * Handles login, connects to the server, and drives the JLine-powered command loop.   */  public class ClientLauncherTUI { -  //TODO +  /** TUI view shared with the client controller. */   private TUI view; -  //TODO +  /** JLine terminal used for all input/output. */   private Terminal terminal; -  //TODO +  /** Line reader used during active gameplay, with tab-completion wired. */   private LineReader gameReader; -  //TODO +  /** Username of the currently logged-in player; empty string before login. */   private String currentUsername = "";     private static final String BUILDING_DETAILS = @@ -170,17 +171,21 @@ Current scope: all classes   "HUNTERS — Adding a Hunter without the \uD83C\uDF56 icon: nothing. Adding a Hunter WITH the \uD83C\uDF56 icon:\n" +   " immediately take 1 \uD83C\uDF56 for each Hunter in your tribe (with or without the icon).\n" +   " During Hunt Event, take \uD83C\uDF56 and gain PP based on your Hunter count (see 'details events')."; -  //TODO -  public static void main(String[] args) throws InterruptedException { +  /** +  * Launches the TUI client. +  * +  * @param args command-line arguments (unused). +  * @throws InterruptedException if the thread is interrupted during startup. +  */ +  static void main(String[] args) throws InterruptedException {   new ClientLauncherTUI().start();   }     /**   * Starts the TUI client. Creates a JLine terminal, loops through login → game → rematch.   * -  * @throws InterruptedException if the thread is interrupted while waiting.   */ -  private void start() throws InterruptedException { +  private void start() {   try {   System.setOut(new PrintStream(System.out, true, StandardCharsets.UTF_8));   System.setErr(new PrintStream(System.err, true, StandardCharsets.UTF_8)); @@ -204,7 +209,7 @@ Current scope: all classes   if (!doLogin(controller)) continue;     while (controller.getClient() != null) { -  String prompt = buildPrompt(controller); +  String prompt = buildPrompt();   String line;   try {   line = gameReader.readLine(prompt); @@ -221,7 +226,12 @@ Current scope: all classes   }   }   } -  //TODO +  /** +  * Prompts for username, player count, network type, and server IP, then connects. +  * +  * @param controller the client controller to connect. +  * @return {@code true} on successful connection; {@code false} if input is invalid or connection fails. +  */   private boolean doLogin(ClientController controller) {   LineReader loginReader = LineReaderBuilder.builder()   .terminal(terminal) @@ -232,6 +242,22 @@ Current scope: all classes   .completer(new StringsCompleter("localhost"))   .build();   +  view.setLineReader(loginReader); +  try { +  return doLoginInner(controller, loginReader, ipReader); +  } finally { +  view.setLineReader(gameReader); +  } +  } +  /** +  * Reads login fields from the terminal and connects to the server. +  * +  * @param controller the client controller to connect. +  * @param loginReader line reader used for username, player count, and network type. +  * @param ipReader line reader with localhost auto-complete for the server IP. +  * @return {@code true} on successful connection; {@code false} if input is invalid or connection fails. +  */ +  private boolean doLoginInner(ClientController controller, LineReader loginReader, LineReader ipReader) {   String username, networkStr, ip;   int nPlayers;   @@ -245,7 +271,7 @@ Current scope: all classes   System.exit(0);   return false;   } catch (NumberFormatException e) { -  System.out.println("Invalid number of players."); +  loginReader.printAbove("\033[H\033[2J" + "\033[31mERROR: Invalid number of players.\033[0m");   return false;   }   @@ -253,45 +279,47 @@ Current scope: all classes   view.setUsername(username);   controller.setMyUsername(username);   +  IClient client;   if (networkStr.equals("rmi")) {   String myIP;   try {   myIP = InterfaceResolver.resolveLocalInterface(ip);   } catch (Exception e) { -  System.out.println("Cannot resolve local interface: " + e.getMessage()); +  loginReader.printAbove("\033[H\033[2J" + "\033[31mERROR: Cannot resolve local interface: " + e.getMessage() + "\033[0m");   return false;   }   System.setProperty("java.rmi.server.hostname", myIP); -  RMIClient client = new RMIClient(controller, ip, NetworkConfig.RMI_PORT, myIP); +  client = new RMIClient(controller, ip, NetworkConfig.RMI_PORT, myIP);   ErrorType err = client.connect(username, nPlayers);   if (err != null) { -  terminal.writer().print("\033[H\033[2J"); -  terminal.writer().flush(); -  System.out.println("Errore: " + err); +  loginReader.printAbove("\033[H\033[2J" + "\033[31mERROR: " + err + "\033[0m");   return false;   } -  System.out.println("Connected via RMI."); +  System.out.println("Connected via RMI, waiting for other players...");   controller.setClient(client);     } else if (networkStr.equals("tcp")) { -  TCPClient client = new TCPClient(controller, ip, NetworkConfig.TCP_PORT, NetworkConfig.HEARTBEAT_PORT); +  client = new TCPClient(controller, ip, NetworkConfig.TCP_PORT, NetworkConfig.HEARTBEAT_PORT);   ErrorType err = client.connect(username, nPlayers);   if (err != null) { -  terminal.writer().print("\033[H\033[2J"); -  terminal.writer().flush(); -  System.out.println("Errore: " + err); +  loginReader.printAbove("\033[H\033[2J" + "\033[31mERROR: " + err + "\033[0m");   return false;   } -  System.out.println("Connected via TCP."); +  System.out.println("Connected via TCP, waiting for other players...");   controller.setClient(client);     } else { -  System.out.println("Unknown network type '" + networkStr + "'. Use rmi or tcp."); +  loginReader.printAbove("\033[H\033[2J" + "\033[31mERROR: Unknown network type '" + networkStr + "'. Use rmi or tcp.\033[0m");   return false;   }   return true;   } -  //TODO +  /** +  * Builds the JLine {@link LineReader} used during gameplay, with tab-completion +  * for all valid commands. +  * +  * @return the configured {@link LineReader}. +  */   private LineReader buildGameReader() {   Completer completer = new TreeCompleter(   node("slot"), @@ -304,8 +332,7 @@ Current scope: all classes   node("building"))),   node("totem"),   node("skip"), -  node("render"), -  node("help"), +  node("clear"),   node("details", node("buildings"), node("events"), node("characters")),   node("rematch"),   node("quit") @@ -316,8 +343,12 @@ Current scope: all classes   .option(LineReader.Option.DISABLE_EVENT_EXPANSION, true)   .build();   } -  //TODO -  private String buildPrompt(ClientController controller) { +  /** +  * Returns the command-line prompt string showing the current username. +  * +  * @return the prompt string. +  */ +  private String buildPrompt() {   return currentUsername.isEmpty() ? "> " : currentUsername + "> ";   }   @@ -329,16 +360,15 @@ Current scope: all classes   switch (cmd) {   case "slot" -> {   int pos = parsePos(parts, 1); -  if (pos >= 0) controller.slotChoice(pos); +  controller.slotChoice(pos);   }   case "draw" -> handleDraw(parts, controller);   case "totem" -> {   int pos = parsePos(parts, 1); -  if (pos >= 0) controller.totemChoice(pos); +  controller.totemChoice(pos);   }   case "skip" -> controller.skipTurn(); -  case "render" -> handleRender(parts); -  case "help" -> gameReader.printAbove("Commands: slot, draw, totem, skip, render, help, details, rematch, quit"); +  case "clear" -> handleRender();   case "details" -> {   if (parts.length > 1 && parts[1].equalsIgnoreCase("buildings"))   gameReader.printAbove(BUILDING_DETAILS); @@ -368,7 +398,12 @@ Current scope: all classes   }   return false;   } -  //TODO +  /** +  * Handles the {@code draw} command, dispatching to the appropriate controller draw method. +  * +  * @param parts the tokenized command: {@code [draw, upper|lower, tribe|building, pos]}. +  * @param controller the client controller to invoke. +  */   private void handleDraw(String[] parts, ClientController controller) {   if (parts.length < 4) {   view.showError(ErrorType.GENERIC_ERROR, "Usage: draw upper|lower tribe|building <pos>"); @@ -384,11 +419,20 @@ Current scope: all classes   else if (tribe) controller.drawLowerTribeCard(pos);   else controller.drawLowerBuildingCard(pos);   } -  //TODO -  private void handleRender(String[] parts) { +  /** +  * Handles the {@code clear} command by triggering a full board re-render. +  * +  */ +  private void handleRender() {   view.renderBoard();   } -  //TODO +  /** +  * Parses an integer position argument at {@code idx} in {@code parts}. +  * +  * @param parts the tokenized command array. +  * @param idx index of the position argument. +  * @return the parsed integer, or {@code -1} if missing or malformed. +  */   private int parsePos(String[] parts, int idx) {   if (parts.length <= idx) {   view.showError(ErrorType.GENERIC_ERROR, "Missing position argument."); @@ -402,7 +446,11 @@ Current scope: all classes   return -1;   }   } -  //TODO +  /** +  * Disconnects the client if one is currently connected; safe to call when already disconnected. +  * +  * @param controller the client controller to disconnect. +  */   private void safeQuit(ClientController controller) {   if (controller.getClient() != null) controller.disconnect();   } @@ -430,7 +478,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-3.html b/deliverables/Coverage/htmReport/ns-1/sources/source-3.html similarity index 68% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-3.html index 5302623..91d2163 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-3.html @@ -79,19 +79,39 @@ Current scope: all classes    /** Enumeration of error types that can be returned by server-side operations. */  public enum ErrorType { -  USER_NOT_FOUND("User not found"), -  USERNAME_ALREADY_USED("Username is already in use"), +  /** The chosen username is already taken by another connected player. */ +  INVALID_USERNAME("Username is already in use or too long"), +  /** The user is already connected to the server. */   USER_ALREADY_CONNECTED("User is already connected"), +  /** The requested number of players is outside the allowed range. */   WRONG_PLAYER_NUMBER("Wrong player number"), +  /** The server has crashed or become unreachable. */   SERVER_CRASHED("Server crashed"), +  /** The server is unreachable. */ +  SERVER_UNREACHABLE("Server unreachable"), +  /** A generic, unclassified error occurred. */   GENERIC_ERROR("Generic error"), +  /** The game has already started and cannot accept new players. */   GAME_ALREADY_STARTED("Game already started"), +  /** The action attempted is not valid in the current game state. */   WRONG_ACTION("Wrong action"); -  //TODO +  /** Human-readable description of this error, returned by {@link #toString()}. */   private final String description; +  +  /** +  * Creates an error type constant with the given human-readable description. +  * +  * @param description the message returned by {@link #toString()}. +  */   ErrorType(String description) {   this.description = description;   } +  +  /** +  * Returns the human-readable description of this error. +  * +  * @return the error description string. +  */   @Override   public String toString() {   return description; @@ -120,7 +140,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-4.html b/deliverables/Coverage/htmReport/ns-1/sources/source-4.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-4.html index 7dfdab3..cc81fe4 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-4.html @@ -64,7 +64,7 @@ Current scope: all classes 0% - (0/107) + (0/110) @@ -110,7 +110,7 @@ Current scope: all classes 0% - (0/108) + (0/111) @@ -144,7 +144,7 @@ Current scope: all classes   * <p>The three top-level states that determine routing are:   * <ul>   * <li><b>Inactive</b> – no game model is present, or the game has ended. -  * Only disconnection clean-up is performed.</li> +  * Only disconnection cleanup is performed.</li>   * <li><b>Suspended</b> – a forfeit timer is running because exactly one   * player remains online. Only reconnection events are accepted.</li>   * <li><b>Active</b> – normal gameplay; every event is applied, saved, @@ -156,11 +156,15 @@ Current scope: all classes   * thread via {@link #doFirstEvent()}.   */  public class GameEventProcessor { -  +  /** Queue from which incoming client events are consumed one at a time. */   private final BlockingQueue<NetworkEvent> actionQueue; +  /** Server-side game controller; all model mutations go through this. */   private final GameController gameController; +  /** Shared map tracking each player's online status ({@code true} = online). */   private final LimitedMap<String, Boolean> playerList; +  /** Broadcaster used to push events and model snapshots to all connected clients. */   private final CompositeClientBroadcaster broadcaster; +  /** Persists and deletes game save files. */   private final SaveManager saveManager;     /** Single-thread executor used exclusively for the forfeit timer. Daemon so it does not block JVM shutdown. */ @@ -173,7 +177,7 @@ Current scope: all classes     /**   * Handle to the running forfeit timer, or {@code null} when no timer is active. -  * A non-null value signals that the game is in the {@em suspended} state. +  * A non-null value signals that the game is in the suspended state.   */   private ScheduledFuture<?> disconnectionTimer;   @@ -199,7 +203,6 @@ Current scope: all classes   this.saveManager = saveManager;   }   -  // ── Public entry point ────────────────────────────────────────────────────     /**   * Blocks until one event is available in the queue, then routes it to the @@ -220,7 +223,6 @@ Current scope: all classes   }   }   -  // ── State guards ──────────────────────────────────────────────────────────     /**   * Returns {@code true} when there is an ongoing game that has not yet ended. @@ -239,11 +241,10 @@ Current scope: all classes   return disconnectionTimer != null;   }   -  // ── Inactive game path ────────────────────────────────────────────────────     /**   * Handles events that arrive when no active game exists (not yet started, -  * or already ended). Only disconnection clean-up is relevant here. +  * or already ended). Only disconnection cleanup is relevant here.   *   * @param event the incoming event.   */ @@ -259,7 +260,6 @@ Current scope: all classes   }   }   -  // ── Suspended game path ───────────────────────────────────────────────────     /**   * Routes events while the game is suspended waiting for a reconnection. @@ -303,7 +303,6 @@ Current scope: all classes   broadcaster.notifyAll(event);   }   -  // ── Active game path ──────────────────────────────────────────────────────     /**   * Applies the event to the game controller, saves the updated state, @@ -331,6 +330,9 @@ Current scope: all classes   if (!saveManager.save(game)) {   System.out.println("\n!!! Save failed !!!\n");   } +  else { +  System.out.println(event.getUsername()+": "+ event.getEventType() + " save successful."); +  }     // During the lobby phase a disconnection only removes the player   // from the list; no broadcast is needed. @@ -378,7 +380,7 @@ Current scope: all classes   * Schedules the 60-second forfeit timer if a disconnection has left   * exactly one player online.   * -  * <p>If a previous timer is still pending it is cancelled first to avoid +  * <p>If a previous timer is still pending it is canceled first to avoid   * duplicate timers.   *   * @param event the event that was just applied. @@ -391,12 +393,14 @@ Current scope: all classes     if (disconnectionTimer != null && !disconnectionTimer.isDone()) {   disconnectionTimer.cancel(false); +  System.out.println("Disconnection TIMER reset");   }     disconnectionTimer = timerExecutor.schedule(   () -> endGameForfeit(game),   1, TimeUnit.MINUTES   ); +  System.out.println("Disconnection TIMER started, 60 seconds from now..." );   }     /** @@ -459,7 +463,6 @@ Current scope: all classes   }   }   -  // ── Utilities ─────────────────────────────────────────────────────────────     /**   * Returns the number of players currently marked as online in the player list. @@ -517,7 +520,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-5.html b/deliverables/Coverage/htmReport/ns-1/sources/source-5.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-5.html index 453f922..fb729ed 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-5.html @@ -59,7 +59,7 @@ Current scope: all classes 0% - (0/16) + (0/15) @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/28) + (0/27) @@ -103,7 +103,7 @@ Current scope: all classes   * @param <V> the type of mapped values.   */  public class LimitedMap<K, V> implements Map<K, V> { -  +  /** The underlying thread-safe hash map storing all key-value pairs. */   private final ConcurrentHashMap<K, V> map = new ConcurrentHashMap<>();     /** @@ -191,13 +191,6 @@ Current scope: all classes   public void setLimit(int num) { this.limit = num; }     /** -  * Returns the current size limit of this map. -  * -  * @return the current limit. -  */ -  public int getLimit() { return limit; } -  -  /**   * Sets a new action to execute when the map size reaches or exceeds the limit.   *   * @param action the new action to set; must not be {@code null}. @@ -230,7 +223,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-6.html b/deliverables/Coverage/htmReport/ns-1/sources/source-6.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-6.html index 32bc5e2..b9498f2 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-6.html @@ -63,7 +63,7 @@ Current scope: all classes 0% - (0/23) + (0/22) @@ -142,7 +142,6 @@ Current scope: all classes   try (ObjectOutputStream oos = new ObjectOutputStream(   new BufferedOutputStream(new FileOutputStream(filePath.toFile())))) {   oos.writeObject(game); -  System.out.println("Game saved to: " + filePath.toAbsolutePath());   return true;   }   } catch (IOException e) { @@ -210,7 +209,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-1/sources/source-7.html b/deliverables/Coverage/htmReport/ns-1/sources/source-7.html similarity index 91% rename from deliverables/Coverage/htmlReport/ns-1/sources/source-7.html rename to deliverables/Coverage/htmReport/ns-1/sources/source-7.html index 42d562d..cf99b7f 100644 --- a/deliverables/Coverage/htmlReport/ns-1/sources/source-7.html +++ b/deliverables/Coverage/htmReport/ns-1/sources/source-7.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/72) + (0/71) @@ -143,17 +143,16 @@ Current scope: all classes   actionQueue, gameController, playerList, broadcaster, saveManager);   }   -  // ── Entry point ───────────────────────────────────────────────────────────     /** -  * Initialises all server components, wires them together, restores a saved +  * Initializes all server components, wires them together, restores a saved   * game if available, and starts the event-processing loop and both network   * servers.   *   * @param args command-line arguments (unused).   * @throws RemoteException if the RMI server cannot be created.   */ -  public static void main(String[] args) throws RemoteException { +  static void main(String[] args) throws RemoteException {   LimitedMap<String, Boolean> playerList = new LimitedMap<>(5, () -> {});   BlockingQueue<NetworkEvent> actionQueue = new LinkedBlockingQueue<>();   GameController gameController = new GameController(); @@ -206,10 +205,8 @@ Current scope: all classes     rmiServer.start();   new Thread(() -> tcpServer.start()).start(); -  System.out.println("Server RMI: " + System.getProperty("java.rmi.server.hostname"));   }   -  // ── Game loop ─────────────────────────────────────────────────────────────     /**   * Runs the event-processing loop until the thread is interrupted. @@ -227,14 +224,13 @@ Current scope: all classes   }   }   -  // ── Crash recovery ────────────────────────────────────────────────────────     /**   * Attempts to restore a previously saved game.   *   * <p>The save is discarded if all but at most one player was offline at the   * time of the crash, since there would be nobody to resume the game with. -  * Otherwise the model is restored, the player-list limit is set, and each +  * Otherwise, the model is restored, the player-list limit is set, and each   * player who was offline at crash time is pre-populated as offline so the   * reconnection flow can handle them correctly.   * @@ -270,7 +266,6 @@ Current scope: all classes   System.out.println("Game restored from save (" + game.getNPlayers() + " players).");   }   -  // ── Network interface selection ───────────────────────────────────────────     /**   * Lists active non-loopback IPv4 network interfaces and prompts the operator @@ -334,7 +329,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-10/index.html b/deliverables/Coverage/htmReport/ns-10/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index.html rename to deliverables/Coverage/htmReport/ns-10/index.html index 49cbb56..d9248d6 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index.html +++ b/deliverables/Coverage/htmReport/ns-10/index.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_BLOCK.html index a4dee60..ceb797f 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_BLOCK.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_BLOCK_DESC.html index 4442931..d6f5a65 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_BLOCK_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_CLASS.html index df5c91d..3af84ca 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_CLASS.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_CLASS_DESC.html index b5c5fdd..f2b37cf 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_CLASS_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_LINE.html index ef31f5e..e5e64d5 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_LINE.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_LINE_DESC.html index 74dd8b3..e148473 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_LINE_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_METHOD.html index f827250..308985f 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_METHOD.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_METHOD_DESC.html index 57659d3..4fe1e6f 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_METHOD_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-10/index_SORT_BY_NAME_DESC.html index df71b79..50813be 100644 --- a/deliverables/Coverage/htmlReport/ns-10/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-10/index_SORT_BY_NAME_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client 0% - (0/26) + (0/24) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.TCP.Client diff --git a/deliverables/Coverage/htmlReport/ns-10/sources/source-1.html b/deliverables/Coverage/htmReport/ns-10/sources/source-1.html similarity index 91% rename from deliverables/Coverage/htmlReport/ns-10/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-10/sources/source-1.html index e166537..3c1f462 100644 --- a/deliverables/Coverage/htmlReport/ns-10/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-10/sources/source-1.html @@ -67,7 +67,7 @@ Current scope: all classes 0% - (0/26) + (0/24) @@ -107,7 +107,9 @@ Current scope: all classes   * Client TCP. Sends and receives messages with the TCP server.   */  public class TCPClient implements IClient { +  /** Byte value sent by the client to signal it is still alive. */   private static final int PING = 1; +  /** Byte value expected from the server in response to a {@link #PING}. */   private static final int PONG = 2;     /** Socket TCP */ @@ -120,18 +122,21 @@ Current scope: all classes   private ObjectOutputStream socketSend;     /** Client game's controller */ -  private ClientController controller; +  private final ClientController controller;     /** IP address of the server to connect to */ -  private String hostname; -  +  private final String hostname; +  /** {@code true} while the connection is active; set to {@code false} on disconnect. */   private boolean running;   /** TCP port */ -  private int mainPort; -  -  private int heartbeatPort; +  private final int mainPort; +  /** TCP port dedicated to heartbeat communication. */ +  private final int heartbeatPort; +  /** Socket used exclusively for heartbeat ping/pong exchange. */   private Socket heartbeatSocket; +  /** Output stream of {@link #heartbeatSocket}, used to write {@link #PING} bytes. */   private OutputStream heartbeatOut; +  /** Input stream of {@link #heartbeatSocket}, used to read {@link #PONG} bytes. */   private InputStream heartbeatIn;     @@ -157,7 +162,7 @@ Current scope: all classes   * Otherwise, a listener thread is started.   * @param user The username of the player   * @param proposedNPlayers The desired number of players for the game -  * @return true if the connection is successful, false otherwise. +  * @return null if the connection is successful, GENERIC_ERROR otherwise.   */   public ErrorType connect(String user, int proposedNPlayers) {   try { @@ -194,10 +199,14 @@ Current scope: all classes     } catch (IOException e) {   e.printStackTrace(); -  return ErrorType.GENERIC_ERROR; +  return ErrorType.SERVER_UNREACHABLE;   }   } -  +  /** +  * Sends a {@link #PING} byte to the server every 3 seconds and waits for a {@link #PONG} reply. +  * If no reply arrives within {@value NetworkConfig#SILENCE_THRESHOLD_MS} ms, the server is +  * considered unreachable and {@link #disconnect()} is called. +  */   private void heartbeatLoop() {   ScheduledExecutorService sender = Executors.newSingleThreadScheduledExecutor();   sender.scheduleAtFixedRate(() -> { @@ -223,7 +232,7 @@ Current scope: all classes   heartbeatSocket.setSoTimeout((int) NetworkConfig.SILENCE_THRESHOLD_MS);   while (running) {   int b = heartbeatIn.read(); -  if (b == -1 || b != PONG) { +  if (b != PONG) {   disconnect();   controller.getView().showError(ErrorType.SERVER_CRASHED, ErrorType.SERVER_CRASHED.toString());   break; @@ -243,6 +252,10 @@ Current scope: all classes   sender.shutdownNow();   }   } +  +  /** +  * Disconnects the player and cleans model and controller +  */   private synchronized void disconnect() {   if (!running) return;   running = false; @@ -423,7 +436,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-11/index.html b/deliverables/Coverage/htmReport/ns-11/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index.html rename to deliverables/Coverage/htmReport/ns-11/index.html index 66b1790..775e257 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index.html +++ b/deliverables/Coverage/htmReport/ns-11/index.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_BLOCK.html index c802910..5f1906f 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_BLOCK.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_BLOCK_DESC.html index 43a0b4a..dd650c2 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_BLOCK_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_CLASS.html index b1326d3..1b02777 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_CLASS.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_CLASS_DESC.html index 4b3dc5b..fb7e8b2 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_CLASS_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_LINE.html index ed8485c..fa4700b 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_LINE.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_LINE_DESC.html index faac8f3..cd8e322 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_LINE_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_METHOD.html index 6fa987d..f0c6e11 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_METHOD.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_METHOD_DESC.html index 67d2f65..b892449 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_METHOD_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-11/index_SORT_BY_NAME_DESC.html index a15292f..ddb5687 100644 --- a/deliverables/Coverage/htmlReport/ns-11/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-11/index_SORT_BY_NAME_DESC.html @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/50) + (0/52) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/166) + (0/164) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/28) + (0/30) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/29) + (0/28) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server 0% - (0/32) + (0/31) @@ -231,7 +231,7 @@ it.polimi.ingsw.gc14.Network.TCP.Server diff --git a/deliverables/Coverage/htmlReport/ns-11/sources/source-1.html b/deliverables/Coverage/htmReport/ns-11/sources/source-1.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-11/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-11/sources/source-1.html index 4feb039..551683b 100644 --- a/deliverables/Coverage/htmlReport/ns-11/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-11/sources/source-1.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/32) + (0/31) @@ -90,7 +90,6 @@ Current scope: all classes  package it.polimi.ingsw.gc14.Network.TCP.Server;    import it.polimi.ingsw.gc14.LimitedMap; - import it.polimi.ingsw.gc14.Model.Game;  import it.polimi.ingsw.gc14.Model.MiniModel;  import it.polimi.ingsw.gc14.Network.NetworkEvent;  import it.polimi.ingsw.gc14.Network.NetworkEvents.DisconnectedPlayer; @@ -111,7 +110,7 @@ Current scope: all classes   * The username of the connected client on this handler   */   private final String username; -  +  /** {@code true} while the handler is actively reading from the socket; set to {@code false} on disconnect. */   private volatile boolean running;     /** @@ -123,25 +122,25 @@ Current scope: all classes   return username;   }   /** The TCP socket */ -  private Socket clientSocket; +  private final Socket clientSocket;     /** Input stream used to receive objects from the client */ -  private ObjectInputStream in; +  private final ObjectInputStream in;     /** Output stream used to send objects to the client */ -  private ObjectOutputStream out; +  private final ObjectOutputStream out;     /**   * Shared list of all client handlers.   * This handler removes itself from the list when disconnected.   */ -  private List<ClientHandler> clientHandlers; +  private final List<ClientHandler> clientHandlers;     /** Maps each connected player's username to their connection state (true = connected). */ -  private LimitedMap<String, Boolean> limitedMap; +  private final LimitedMap<String, Boolean> limitedMap;     /** Queue containing the events to be applied to the game model */ -  private BlockingQueue<NetworkEvent> actionQueue; +  private final BlockingQueue<NetworkEvent> actionQueue;       /** @@ -181,7 +180,6 @@ Current scope: all classes   }   }   } catch (IOException e) { -  System.err.println("Error in incoming connection/disconnection: " + username);   } catch (ClassNotFoundException e) {   System.err.println("Class not found: " + username);   } finally { @@ -234,7 +232,7 @@ Current scope: all classes   clientHandlers.remove(this);   limitedMap.put(username, false);   actionQueue.add(new DisconnectedPlayer(username)); -  System.out.println("Disconnected player: " + username); +  System.err.println("(TCP) Disconnected player: " + username);   try { clientSocket.close(); } catch (IOException ignored) {}   }  } @@ -261,7 +259,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-11/sources/source-2.html b/deliverables/Coverage/htmReport/ns-11/sources/source-2.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-11/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-11/sources/source-2.html index 5e540fd..1de640a 100644 --- a/deliverables/Coverage/htmlReport/ns-11/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-11/sources/source-2.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/29) + (0/28) @@ -105,10 +105,13 @@ Current scope: all classes   * both the heartbeat connection and the main client connection are disconnected.   */  public class HeartbeatHandler implements Runnable { -  +  /** Username of the client associated with this heartbeat connection. */   private final String username; +  /** Dedicated socket used solely for heartbeat ping/pong exchange. */   private final Socket socket; +  /** Input stream of {@link #socket} used to receive {@code PING} bytes from the client. */   private final InputStream in; +  /** Output stream of {@link #socket} used to send {@code PONG} bytes back to the client. */   private final OutputStream out;     /** @@ -173,10 +176,10 @@ Current scope: all classes   startWatchdog();   try {   while (running) { -  int b = in.read(); // blocks until a byte arrives +  int b = in.read();   if (b == -1) {   disconnect(); -  break; // stream closed +  break;   }   if (b == PING) {   lastReceivedTime = System.currentTimeMillis(); @@ -213,8 +216,7 @@ Current scope: all classes   private synchronized void disconnect() {   running = false;   watchdog.shutdownNow(); -  mainHandler.disconnect(); // disconnette anche il socket principale -  System.out.println("Disconnected: " + username); +  mainHandler.disconnect();   try { socket.close(); } catch (IOException ignored) {}   }  } @@ -241,7 +243,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-11/sources/source-3.html b/deliverables/Coverage/htmReport/ns-11/sources/source-3.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-11/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-11/sources/source-3.html index 5b356c9..47120f7 100644 --- a/deliverables/Coverage/htmlReport/ns-11/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-11/sources/source-3.html @@ -67,7 +67,7 @@ Current scope: all classes 0% - (0/28) + (0/30) @@ -124,12 +124,12 @@ Current scope: all classes   /**   * Main TCP port used for standard client-server communication.   */ -  private int port; +  private final int port;     /**   * TCP port dedicated to heartbeat communication.   */ -  private int heartbeatPort; +  private final int heartbeatPort;     /**   * Main server socket used to accept client connections. @@ -149,17 +149,17 @@ Current scope: all classes   /**   * Queue containing network events received from clients.   */ -  private BlockingQueue<NetworkEvent> actionQueue; +  private final BlockingQueue<NetworkEvent> actionQueue;     /**   * Map storing the online/offline status of connected players.   */ -  private LimitedMap<String, Boolean> playerList; +  private final LimitedMap<String, Boolean> playerList;     /**   * List of active TCP client handlers.   */ -  private CopyOnWriteArrayList<ClientHandler> clientHandlers; +  private final CopyOnWriteArrayList<ClientHandler> clientHandlers;       /** @@ -214,7 +214,7 @@ Current scope: all classes   }     System.out.println("TCP server started on port: " + port); -  System.out.println("Heartbeat server started on port: " + heartbeatPort); +  System.out.println("TCP heartbeat server started on port: " + heartbeatPort);     new Thread(this::acceptHeartbeat, "heartbeat-acceptor").start();   @@ -249,11 +249,11 @@ Current scope: all classes   synchronized (controller) {   String username = eventAddPlayer.getUsername();   //reconnect players after a server crash -  if (playerList.isEmpty()&& controller.getModel()==null) { +  if (playerList.isEmpty() &&(controller.getModel()==null || controller.getModel().getCurrentState().getGameStage().equals(GameStages.WAITING))) {   Game model = new Game(eventAddPlayer.getProposedNPlayer());   controller.setModel(model);   playerList.setLimit(eventAddPlayer.getProposedNPlayer()); -  System.out.println("Game Created With :"+eventAddPlayer.getProposedNPlayer()+" Players"); +  System.out.println("Game Created With: "+eventAddPlayer.getProposedNPlayer()+" Players");   }   if(controller.getModel().getCurrentState().getGameStage()!= GameStages.WAITING ) {   if (controller.getModel().getPlayers().stream().noneMatch(p -> p.getUserName().equals(username))|| controller.getModel().getCurrentState().getGameStage()==GameStages.ENDED) { @@ -275,7 +275,7 @@ Current scope: all classes   new Thread(handler).start();   continue;   } else { -  eventAddPlayer.setErrorType(ErrorType.USERNAME_ALREADY_USED); +  eventAddPlayer.setErrorType(ErrorType.INVALID_USERNAME);   eventAddPlayer.setIsError(true);   clientSend.writeObject(eventAddPlayer);   clientSocket.close(); @@ -432,7 +432,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-12/index.html b/deliverables/Coverage/htmReport/ns-12/index.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index.html rename to deliverables/Coverage/htmReport/ns-12/index.html index 6d23daa..5bd414d 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index.html +++ b/deliverables/Coverage/htmReport/ns-12/index.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_BLOCK.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_BLOCK.html index 62971b8..7d69cef 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_BLOCK.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_BLOCK_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_BLOCK_DESC.html index ae466fe..0d21161 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_BLOCK_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -293,7 +293,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -301,7 +301,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_CLASS.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_CLASS.html index 3f8e5d1..af71e73 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_CLASS.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_CLASS_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_CLASS_DESC.html index d7ec019..41f4d9a 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_CLASS_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -293,7 +293,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -301,7 +301,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_LINE.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_LINE.html index a931949..d0f0b98 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_LINE.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_LINE_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_LINE_DESC.html index 1598621..f444f85 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_LINE_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -293,7 +293,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -301,7 +301,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_METHOD.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_METHOD.html index 0069a94..a9647ea 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_METHOD.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_METHOD_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_METHOD_DESC.html index e2380f9..31e64cc 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_METHOD_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -293,7 +293,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -301,7 +301,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_NAME_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-12/index_SORT_BY_NAME_DESC.html index 6ad726f..f0c0b5a 100644 --- a/deliverables/Coverage/htmlReport/ns-12/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-12/index_SORT_BY_NAME_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/130) + (0/132) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/291) + (0/302) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/1000) + (0/1014) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/50) + (0/53) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/124) + (0/137) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/426) + (0/448) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/182) + (0/181) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/116) + (0/110) @@ -293,7 +293,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/15) + (0/14) @@ -301,7 +301,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/73) + (0/71) @@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.View.GUI 0% - (0/123) + (0/122) @@ -336,7 +336,7 @@ it.polimi.ingsw.gc14.View.GUI diff --git a/deliverables/Coverage/htmlReport/ns-12/sources/source-1.html b/deliverables/Coverage/htmReport/ns-12/sources/source-1.html similarity index 68% rename from deliverables/Coverage/htmlReport/ns-12/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-12/sources/source-1.html index 54af74a..1e56f52 100644 --- a/deliverables/Coverage/htmlReport/ns-12/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-12/sources/source-1.html @@ -48,7 +48,7 @@ Current scope: all classes 0% - (0/6) + (0/5) @@ -56,7 +56,7 @@ Current scope: all classes 0% - (0/31) + (0/29) @@ -64,7 +64,7 @@ Current scope: all classes 0% - (0/50) + (0/49) @@ -129,7 +129,7 @@ Current scope: all classes 0% - (0/15) + (0/14) @@ -137,7 +137,7 @@ Current scope: all classes 0% - (0/73) + (0/71) @@ -145,7 +145,7 @@ Current scope: all classes 0% - (0/123) + (0/122) @@ -169,23 +169,50 @@ Current scope: all classes  import java.util.List;  import java.util.Random;   - //TODO ALL JAVADOC + /** +  * Ambient fire-particle effect rendered on a transparent overlay pane. +  * +  * <p>Three particle types float from the screen corners toward the center: +  * <ul> +  * <li><b>embers</b> (type 0) — slow, glowing orange circles with a soft halo.</li> +  * <li><b>sparks</b> (type 1) — fast, short-lived bright particles.</li> +  * <li><b>dust</b> (type 2) — large, translucent brown drifting circles.</li> +  * </ul> +  * +  * <p>Call {@link #start()} after adding {@link #getPane()} to the scene graph +  */  public class FireParticleSystem {   +  /** Maximum number of live particles at any given time. */   private static final int MAX_PARTICLES = 30; +  /** Minimum nanoseconds between particle spawn batches. */   private static final long SPAWN_INTERVAL_NS = 100_000_000L; -  private static final long FRAME_INTERVAL_NS = 1_000_000_000L / 30; // 30 fps cap -  private static final int STEPS_PER_FRAME = 3; // physics steps per frame → 3× speed +  /** Minimum nanoseconds between rendered frames (30 fps cap). */ +  private static final long FRAME_INTERVAL_NS = 1_000_000_000L / 30; +  /** Physics update steps applied per rendered frame (multiplies effective speed). */ +  private static final int STEPS_PER_FRAME = 3;   +  /** Mouse-transparent overlay pane that hosts all particle nodes. */   private final Pane pane; +  /** The scene whose dimensions are used to position and fade particles. */   private final Scene scene; +  /** Currently live particles. */   private final List<Particle> particles = new ArrayList<>(); +  /** Shared random source for particle initialization and physics noise. */   private final Random rnd = new Random(); -  private AnimationTimer timer; +  /** Timestamp (ns) of the last particle spawn batch. */   private long lastSpawn = 0; +  /** Timestamp (ns) of the last rendered frame. */   private long lastFrame = 0; +  /** {@code true} after the first tick pre-populates the particle pool. */   private boolean warmedUp = false;   +  /** +  * Creates the particle system bound to the given scene. +  * The internal overlay pane is transparent and mouse-transparent. +  * +  * @param scene the scene whose dimensions are used for particle positioning and fading. +  */   public FireParticleSystem(Scene scene) {   this.scene = scene;   pane = new Pane(); @@ -193,12 +220,16 @@ Current scope: all classes   pane.setPickOnBounds(false);   }   -  /** Returns the transparent overlay pane that holds all particle nodes. */ +  /** +  * Returns the transparent overlay pane that holds all particle nodes. +  * +  * @return the mouse-transparent {@link Pane} overlay. +  */   public Pane getPane() { return pane; }     /** Starts the animation timer. */   public void start() { -  timer = new AnimationTimer() { +  AnimationTimer timer = new AnimationTimer() {   @Override   public void handle(long now) {   if (now - lastFrame < FRAME_INTERVAL_NS) return; @@ -209,11 +240,12 @@ Current scope: all classes   timer.start();   }   -  /** Stops the animation timer. */ -  public void stop() { -  if (timer != null) timer.stop(); -  } -  +  /** +  * Advances the simulation by one frame: pre-warms on first call, spawns new particles, +  * steps existing ones, removes dead ones, and updates their visual state. +  * +  * @param now the current timestamp in nanoseconds from the animation timer. +  */   private void tick(long now) {   double w = scene.getWidth();   double h = scene.getHeight(); @@ -256,6 +288,13 @@ Current scope: all classes   }   }   +  /** +  * Creates a new particle starting near one of the four screen corners. +  * +  * @param w scene width in pixels. +  * @param h scene height in pixels. +  * @return the newly constructed {@link Particle}. +  */   private Particle spawnParticle(double w, double h) {   int corner = rnd.nextInt(4);   double margin = 0.12; @@ -269,20 +308,52 @@ Current scope: all classes   return new Particle(x, y, w, h, corner, rnd);   }   -  // ── Particle ──────────────────────────────────────────────────────────────   +  /** +  * A single fire particle with position, velocity, wobble, and JavaFX visual nodes. +  * Particles are typed: 0 = ember, 1 = spark, 2 = dust. +  */   private static class Particle {   -  double x, y, vx, vy; +  /** Current X position in scene pixels. */ +  double x; +  /** Current Y position in scene pixels. */ +  double y; +  /** Horizontal velocity component. */ +  double vx; +  /** Vertical velocity component. */ +  double vy; +  /** Remaining life fraction (1.0 = full, 0.0 = dead); only decrements for sparks. */   double life; -  double size; -  double wobblePhase, wobbleSpeed, wobbleAmp; +  /** Visual radius of the particle's core circle. */ +  final double size; +  /** Current phase of the sinusoidal wobble. */ +  double wobblePhase; +  /** Angular speed of the wobble oscillation. */ +  final double wobbleSpeed; +  /** Amplitude factor of the wobble displacement. */ +  final double wobbleAmp; +  /** Particle type: 0 = ember, 1 = spark, 2 = dust. */   final int type; +  /** Shared random source used during physics updates. */   final Random rnd;   +  /** Primary visible circle node. */   final Circle core; -  final Circle glow; // non-null only for embers +  /** Soft glow halo circle behind {@link #core}; non-null only for embers (type 0). */ +  final Circle glow;   +  /** +  * Initializes the particle at position ({@code x}, {@code y}) with velocity +  * aimed roughly from the given {@code corner} toward the scene center. +  * +  * @param x spawn X coordinate. +  * @param y spawn Y coordinate. +  * @param w scene width (used to compute target direction). +  * @param h scene height (used to compute target direction). +  * @param corner spawn corner index: 0 = bottom-left, 1 = bottom-right, 2 = top-left, 3 = top-right. +  * @param rnd shared random source. +  */   Particle(double x, double y, double w, double h, int corner, Random rnd) {   this.x = x;   this.y = y; @@ -296,17 +367,17 @@ Current scope: all classes   double angle = baseAngle + (rnd.nextDouble() - 0.5) * (Math.PI / 3.5);     double speed; -  if (type == 0) { // ember +  if (type == 0) {   speed = 0.5 + rnd.nextDouble() * 0.7;   size = rnd.nextDouble() * 3 + 2;   glow = new Circle(size * 2.2);   core = new Circle(size / 2); -  } else if (type == 1) { // spark +  } else if (type == 1) {   speed = 1.5 + rnd.nextDouble() * 2.0;   size = rnd.nextDouble() * 1.5 + 0.5;   glow = null;   core = new Circle(size / 2); -  } else { // dust +  } else {   speed = 0.2 + rnd.nextDouble() * 0.35;   size = rnd.nextDouble() * 8 + 5;   glow = null; @@ -321,6 +392,12 @@ Current scope: all classes   wobbleAmp = 0.1 + rnd.nextDouble() * 0.4;   }   +  /** +  * Returns a particle type weighted toward embers (55% ember, 23% spark, 22% dust). +  * +  * @param rnd the random source. +  * @return particle type: 0, 1, or 2. +  */   private static int weightedType(Random rnd) {   double r = rnd.nextDouble();   if (r < 0.55) return 0; @@ -328,16 +405,27 @@ Current scope: all classes   return 2;   }   +  /** +  * Adds this particle's visual nodes to {@code pane} (glow first so core renders on top). +  * +  * @param pane the overlay pane to add nodes to. +  */   void addTo(Pane pane) {   if (glow != null) pane.getChildren().add(glow);   pane.getChildren().add(core);   }   +  /** +  * Removes this particle's visual nodes from {@code pane}. +  * +  * @param pane the overlay pane to remove nodes from. +  */   void removeFrom(Pane pane) {   pane.getChildren().remove(core);   if (glow != null) pane.getChildren().remove(glow);   }   +  /** Advances this particle by one physics step: applies wobble, moves, and decrements spark life. */   void update() {   wobblePhase += wobbleSpeed;   vx += Math.sin(wobblePhase) * wobbleAmp * 0.05; @@ -347,12 +435,26 @@ Current scope: all classes   if (type == 1) life -= 0.008 + rnd.nextDouble() * 0.006;   }   +  /** +  * Returns {@code true} when this particle has left the scene bounds or, for sparks, its life reached zero. +  * +  * @param w scene width. +  * @param h scene height. +  * @return {@code true} if the particle should be removed. +  */   boolean isDead(double w, double h) {   double pad = size * 4;   return x < -pad || x > w + pad || y < -pad || y > h + pad   || (type == 1 && life <= 0);   }   +  /** +  * Updates color, opacity, and translate position of this particle's visual nodes +  * based on distance from scene edges and remaining life. +  * +  * @param w scene width. +  * @param h scene height. +  */   void updateVisual(double w, double h) {   double edge = Math.min(w, h) * 0.05;   double fadeX = Math.min(x / edge, Math.min((w - x) / edge, 1.0)); @@ -407,7 +509,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-12/sources/source-2.html b/deliverables/Coverage/htmReport/ns-12/sources/source-2.html similarity index 89% rename from deliverables/Coverage/htmlReport/ns-12/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-12/sources/source-2.html index b148f7b..0519e89 100644 --- a/deliverables/Coverage/htmlReport/ns-12/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-12/sources/source-2.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/116) + (0/110) @@ -104,8 +104,7 @@ Current scope: all classes  import javafx.scene.input.KeyEvent;  import javafx.scene.input.KeyCombination;  import javafx.scene.layout.StackPane; - import javafx.scene.media.Media; - import javafx.scene.media.MediaPlayer; +   import javafx.scene.paint.Color;  import javafx.scene.shape.Rectangle;  import javafx.stage.Screen; @@ -122,49 +121,45 @@ Current scope: all classes   * main game, and leaderboard scenes based on the current game state.   */  public class GUI extends Application implements IView { -  //TODO +  /** The primary JavaFX stage. */   private Stage primaryStage; -  //TODO +  /** Latest mini model received from the server. */   private volatile MiniModel miniModel; -  //TODO +  /** FXML loader for the login scene. */   private FXMLLoader loaderLogin; -  //TODO +  /** The login scene. */   private Scene loginScene; -  //TODO +  /** Controller for the login FXML scene. */   private LoginFXMLController controllerLogin; -  //TODO +  /** FXML loader for the totem selection scene. */   private FXMLLoader loaderTotem; -  //TODO +  /** The totem selection scene. */   private Scene totemScene; -  //TODO +  /** Controller for the totem FXML scene. */   private TotemFXMLController controllerTotem; -  //TODO +  /** FXML loader for the main game scene. */   private FXMLLoader loaderMain; -  -  //TODO +  /** The main game scene. */   private Scene mainScene; -  //TODO +  /** Controller for the main FXML scene. */   private MainFXMLController controllerMain; -  //TODO +  /** FXML loader for the leaderboard scene. */   private FXMLLoader loaderLeaderboard; -  //TODO +  /** The end-of-game leaderboard scene. */   private Scene leaderboardScene; -  //TODO +  /** Controller for the leaderboard FXML scene. */   private LeaderboardFXMLController controllerLeaderboard; -  -  //TODO +  /** Client controller injected before JavaFX startup. */   private ClientController controller; -  //TODO +  /** When {@code true}, the app re-enters fullscreen automatically after ESC is pressed. */   private boolean autoReenterFullscreen = true; -  //TODO +  /** Guards against overlapping fade transitions. */   private boolean isFading = false; -  //TODO -  private MediaPlayer bgMusic;       /**   * JavaFX entry point: loads all FXML scenes, wires up controllers, -  * configures fullscreen behaviour, and shows the login scene. +  * configures fullscreen behavior, and shows the login scene.   *   * @param stage the primary stage provided by the JavaFX runtime.   * @throws Exception if any FXML resource cannot be loaded. @@ -196,7 +191,7 @@ Current scope: all classes   controllerLogin.updateLoginButton(true);   controllerLogin.showError("");   fadeToScene(loginScene); -  }, loginScene); +  });       @@ -247,15 +242,6 @@ Current scope: all classes   primaryStage.show();   Platform.runLater(() -> primaryStage.setFullScreen(true));   -  try { -  String musicUrl = getClass().getResource("/Audio/Music.mp3").toExternalForm(); -  bgMusic = new MediaPlayer(new Media(musicUrl)); -  bgMusic.setCycleCount(MediaPlayer.INDEFINITE); -  bgMusic.setVolume(0.4); -  bgMusic.play(); -  } catch (Exception e) { -  System.err.println("Audio unavailable: " + e.getMessage()); -  }   }     @@ -297,12 +283,22 @@ Current scope: all classes   }   });   } -  //TODO +  /** +  * Wraps the current root of {@code scene} in a {@link StackPane} so that +  * fade overlay rectangles can be layered over it during scene transitions. +  * +  * @param scene the scene whose root to wrap. +  */   private void wrapScene(Scene scene) {   Parent root = scene.getRoot();   scene.setRoot(new StackPane(root));   } -  //TODO +  /** +  * Performs a black-overlay crossfade from the current scene to {@code newScene}. +  * No-op if already fading or if {@code newScene} is already displayed. +  * +  * @param newScene the scene to transition to. +  */   private void fadeToScene(Scene newScene) {   Scene currentScene = primaryStage.getScene();   if (currentScene == newScene || isFading) return; @@ -348,7 +344,7 @@ Current scope: all classes   * Displays an error on the JavaFX application thread.   *   * <p>If the server crashed, returns to the login scene and re-enables the login button. -  * Otherwise delegates to the active scene's error display. +  * Otherwise, delegates to the active scene's error display.   *   * @param error the error type.   * @param message a human-readable description of the error. @@ -392,7 +388,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-12/sources/source-3.html b/deliverables/Coverage/htmReport/ns-12/sources/source-3.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-12/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-12/sources/source-3.html index 6bc607c..9fed9c1 100644 --- a/deliverables/Coverage/htmlReport/ns-12/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-12/sources/source-3.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/182) + (0/181) @@ -95,7 +95,6 @@ Current scope: all classes  import it.polimi.ingsw.gc14.Model.PlayableCard;  import javafx.event.Event;  import javafx.fxml.FXML; - import javafx.scene.Scene;  import javafx.scene.control.ScrollPane;  import javafx.stage.Popup;  import javafx.geometry.Insets; @@ -113,7 +112,6 @@ Current scope: all classes  import javafx.scene.paint.Stop;  import javafx.scene.paint.CycleMethod;  import javafx.scene.text.Font; - import javafx.stage.Stage;  import javafx.stage.Window;  import javafx.util.Duration;   @@ -125,29 +123,28 @@ Current scope: all classes   * <p>Displays the final player rankings and a winner/game-over banner.   */  public class LeaderboardFXMLController { -  +  /** Root pane of the leaderboard scene; used to set the background and anchor the popup. */   @FXML private StackPane rootPane; +  /** Main vertical container holding the outcome label and ranking rows. */   @FXML private VBox mainVBox; +  /** Vertical list populated with one {@code HBox} row per ranked player. */   @FXML private VBox rankingList; -  // title label removed; outcome text is added dynamically in render() -  //TODO -  private ClientController controller; -  //TODO -  private Popup popup; -  //TODO -  private VBox popupContent; -  //TODO -  private static final Map<String, Image> imageCache = new HashMap<>(); -  //TODO -  private Scene loginScene;   -  //TODO +  /** Client controller for fetching game state and sending actions. */ +  private ClientController controller; +  /** Auto-hiding popup that shows detailed player card information. */ +  private Popup popup; +  /** Content container inside {@link #popup}. */ +  private VBox popupContent; +  /** Shared image cache to avoid reloading resources multiple times. */ +  private static final Map<String, Image> imageCache = new HashMap<>(); +  /** Action run when the player returns to the login screen (disconnect + scene switch). */   private Runnable action;     /** Returns a cached {@link Image} for the given classpath {@code path}, loading it on first access. */   private Image loadImage(String path) {   return imageCache.computeIfAbsent(path, -  p -> new Image(getClass().getResourceAsStream(p))); +  p -> new Image(Objects.requireNonNull(getClass().getResourceAsStream(p))));   }     @@ -156,11 +153,9 @@ Current scope: all classes   *   * @param controller the client controller.   * @param action the action to run when the player returns to the login screen. -  * @param loginScene the login scene to show on exit.   */ -  public void setController(ClientController controller, Runnable action, Scene loginScene) { +  public void setController(ClientController controller, Runnable action) {   this.controller = controller; -  this.loginScene = loginScene;   this.action = action;   }   @@ -492,7 +487,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-12/sources/source-4.html b/deliverables/Coverage/htmReport/ns-12/sources/source-4.html similarity index 88% rename from deliverables/Coverage/htmlReport/ns-12/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-12/sources/source-4.html index ae9add3..757c70b 100644 --- a/deliverables/Coverage/htmlReport/ns-12/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-12/sources/source-4.html @@ -91,6 +91,7 @@ Current scope: all classes    import it.polimi.ingsw.gc14.Controller.ClientController;  import it.polimi.ingsw.gc14.ErrorType; + import it.polimi.ingsw.gc14.Network.IClient;  import it.polimi.ingsw.gc14.Network.NetworkConfig;  import it.polimi.ingsw.gc14.Network.InterfaceResolver;  import it.polimi.ingsw.gc14.Network.RMI.Client.RMIClient; @@ -108,8 +109,7 @@ Current scope: all classes  import javafx.stage.Screen;  import javafx.util.Duration;   - import java.net.*; - import java.util.Enumeration; + import java.util.Objects;    /**   * FXML controller for the login scene. @@ -118,33 +118,33 @@ Current scope: all classes   * and initiates the connection to the server.   */  public class LoginFXMLController { -  //TODO +  /** Background image displayed behind the login form. */   @FXML private ImageView backgroundImage; -  //TODO +  /** Text field for the player's username. */   @FXML private TextField campoNome; -  //TODO +  /** Text field for the desired number of players. */   @FXML private TextField campoNumPlayers; -  //TODO +  /** Text field for the server IP address. */   @FXML private TextField campoIP; -  //TODO +  /** Button that submits the login form. */   @FXML private Button btnAccedi; -  //TODO +  /** Label used to show error or success messages. */   @FXML private Label labelErrore; -  //TODO +  /** VBox containing the login form controls. */   @FXML private VBox formPanel; -  //TODO +  /** Toggle container for switching between RMI and TCP. */   @FXML private StackPane protocolToggle; -  //TODO +  /** Sliding thumb inside the protocol toggle. */   @FXML private Region toggleThumb; -  //TODO +  /** Label for the RMI side of the protocol toggle. */   @FXML private Label labelRMI; -  //TODO +  /** Label for the TCP side of the protocol toggle. */   @FXML private Label labelTCP; -  //TODO +  /** {@code true} when RMI is selected; {@code false} for TCP. */   private boolean isRMI = true; -  //TODO +  /** Client controller used to initiate the connection. */   private ClientController controller; -  //TODO +  /** CSS pseudo-class applied to the active protocol label. */   private final PseudoClass activeProtocolPseudo = PseudoClass.getPseudoClass("active-protocol");     /** @@ -160,7 +160,7 @@ Current scope: all classes   @FXML   public void initialize() {   // Background setup -  Image img = new Image(getClass().getResourceAsStream("/GUIImages/BackgroundLogin.png")); +  Image img = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/GUIImages/BackgroundLogin.png")));   backgroundImage.setImage(img);   Rectangle2D screenBounds = Screen.getPrimary().getBounds();   backgroundImage.setFitWidth(screenBounds.getWidth()); @@ -185,7 +185,6 @@ Current scope: all classes   tt.setToX(isRMI ? 0 : 110);   tt.play();   -  // pseudoClassStateChanged preserves layout properties unlike direct style mutation   labelRMI.pseudoClassStateChanged(activeProtocolPseudo, isRMI);   labelTCP.pseudoClassStateChanged(activeProtocolPseudo, !isRMI);   } @@ -248,8 +247,9 @@ Current scope: all classes     /** Connects to the server using the selected protocol and transitions to the waiting state on success. */   private void connect(String nome, String ip, int numPlayers, String localInterface) { +  IClient client;   if (isRMI) { -  RMIClient client = new RMIClient(controller, ip, NetworkConfig.RMI_PORT, localInterface); +  client = new RMIClient(controller, ip, NetworkConfig.RMI_PORT, localInterface);   ErrorType serverResponse = client.connect(nome, numPlayers);   if (serverResponse == null) {   controller.setClient(client); @@ -261,7 +261,7 @@ Current scope: all classes   });   }   } else { -  TCPClient client = new TCPClient(controller, ip, NetworkConfig.TCP_PORT, NetworkConfig.HEARTBEAT_PORT); +  client = new TCPClient(controller, ip, NetworkConfig.TCP_PORT, NetworkConfig.HEARTBEAT_PORT);   ErrorType serverResponse = client.connect(nome, numPlayers);   if (serverResponse == null) {   controller.setClient(client); @@ -323,7 +323,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-12/sources/source-5.html b/deliverables/Coverage/htmReport/ns-12/sources/source-5.html similarity index 90% rename from deliverables/Coverage/htmlReport/ns-12/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-12/sources/source-5.html index 0e4481e..bcda61e 100644 --- a/deliverables/Coverage/htmlReport/ns-12/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-12/sources/source-5.html @@ -59,7 +59,7 @@ Current scope: all classes 0% - (0/50) + (0/53) @@ -67,7 +67,7 @@ Current scope: all classes 0% - (0/124) + (0/137) @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/426) + (0/448) @@ -95,21 +95,16 @@ Current scope: all classes  import it.polimi.ingsw.gc14.Model.Cards.TribeCard;  import it.polimi.ingsw.gc14.Model.Orders.OrderPlayer;  import it.polimi.ingsw.gc14.Network.EventType; - import it.polimi.ingsw.gc14.Network.NetworkEvent; + import javafx.application.Platform; + import javafx.animation.PauseTransition;  import javafx.animation.ScaleTransition;  import javafx.animation.TranslateTransition; - import javafx.application.Platform; - import javafx.beans.value.ChangeListener; - import javafx.beans.value.ObservableValue;  import javafx.event.Event;  import javafx.fxml.FXML; - import javafx.geometry.Bounds;  import javafx.geometry.Insets;  import javafx.geometry.Pos; - import javafx.geometry.Rectangle2D;  import javafx.scene.Cursor;  import javafx.scene.Node; - import javafx.scene.Scene;  import javafx.scene.control.Button;  import javafx.scene.control.Label;  import javafx.scene.control.ScrollPane; @@ -122,7 +117,6 @@ Current scope: all classes  import javafx.scene.shape.*;  import javafx.scene.text.Font;  import javafx.stage.Popup; - import javafx.stage.Screen;  import javafx.stage.Window;  import javafx.util.Duration;   @@ -135,47 +129,49 @@ Current scope: all classes   * the player's hand, and action buttons (skip, details).   */  public class MainFXMLController { -  //TODO -  @FXML private GridPane leftGrid; -  //TODO +  /** Scrollable container holding all player side-panel cards. */   @FXML private ScrollPane playerSide; -  //TODO +  /** Root HBox containing all main scene elements. */   @FXML private HBox mainHBox; -  //TODO -  @FXML private ImageView backgroundImage; -  //TODO +  /** HBox holding the board slot and order cards. */   @FXML private HBox board; -  //TODO +  /** HBox holding the upper tribe card row (and upper building stack). */   @FXML private HBox upperList; -  //TODO +  /** HBox holding the lower tribe card row (and lower building stack). */   @FXML private HBox lowerList; -  //TODO +  /** HBox displaying the local player's card piles. */   @FXML private HBox myHand; -  //TODO +  /** Button that sends a skip-turn command. */   @FXML private Button skipBtn; -  //TODO +  /** Button that opens the game details popup. */   @FXML private Button detailsBtn; -  //TODO +  /** Button that disconnects and closes the client. */ +  @FXML private Button quitBtn; +  /** Label showing the current round number and game stage. */   @FXML private Label infoText; -  //TODO +  /** Maps each player's username to their current food-value label in the side panel. */   private final Map<String, Label> foodLabels = new HashMap<>(); -  //TODO +  /** Maps each player's username to their current prestige-value label in the side panel. */   private final Map<String, Label> prestigeLabels = new HashMap<>(); -  //TODO +  /** Maps each player's username to their player-card VBox in the side panel. */   private final Map<String, VBox> playerCards = new HashMap<>(); -  //TODO +  /** Maps each player's username to their ordered list of card-type icon ImageViews. */   private final Map<String, List<ImageView>> iconViews = new HashMap<>(); -  //TODO +  /** Shared popup used for card previews and building selection. */   private Popup popup; -  //TODO +  /** HBox inside {@link #popup} that holds the displayed card images. */   private HBox popupCards; -  //TODO +  /** Client controller for fetching game state and sending player actions. */   private ClientController controller;     /** {@code true} when the last received event was an error response. */   private boolean isError;   -  /** Sets the error flag; called by {@link GUI} before delegating to {@link #render()}. */ +  /** +  * Sets the error flag; called by {@link GUI} before delegating to {@link #render()}. +  * +  * @param error {@code true} if the last received event was an error response. +  */   public void setError(boolean error) { this.isError = error; }     // ==== IMAGE CACHE ==== @@ -184,7 +180,7 @@ Current scope: all classes   /** Returns a cached {@link Image} for the given classpath {@code path}, loading it on first access. */   private Image loadImage(String path) {   return imageCache.computeIfAbsent(path, -  p -> new Image(getClass().getResourceAsStream(p))); +  p -> new Image(Objects.requireNonNull(getClass().getResourceAsStream(p))));   }     /** @@ -195,6 +191,30 @@ Current scope: all classes   public void setController(ClientController controller) {   this.controller = controller;   skipBtn.setOnAction(e -> controller.skipTurn()); +  +  PauseTransition quitTimer = new PauseTransition(javafx.util.Duration.seconds(3)); +  quitTimer.setOnFinished(e -> { +  quitBtn.setText("Quit"); +  quitBtn.setStyle(""); +  }); +  final boolean[] quitPending = {false}; +  quitBtn.setOnAction(e -> { +  if (quitPending[0]) { +  controller.disconnect(); +  Platform.exit(); +  System.exit(0); +  } else { +  quitPending[0] = true; +  quitBtn.setText("Sure?"); +  quitBtn.setStyle("-fx-background-color: #c0392b; -fx-text-fill: white;"); +  quitTimer.playFromStart(); +  quitTimer.setOnFinished(ev -> { +  quitPending[0] = false; +  quitBtn.setText("Quit"); +  quitBtn.setStyle(""); +  }); +  } +  });   }     /** Initializes the scene: loads fonts, sets up the popup, and registers input listeners. */ @@ -204,6 +224,7 @@ Current scope: all classes     addHoverZoom(skipBtn);   addHoverZoom(detailsBtn); +  addHoverZoom(quitBtn);   popup = new Popup();   mainHBox.sceneProperty().addListener((obs, oldScene, newScene) -> {   if (newScene != null) { @@ -234,7 +255,9 @@ Current scope: all classes   /** Incrementally re-renders only the parts of the scene affected by the last network event. */   public void render() {   if(foodLabels.isEmpty() || controller.getMiniModel().lastEvent == null -  || controller.getMiniModel().lastEvent.getEventType().equals(EventType.TOTEM_CHOICE)) +  || controller.getMiniModel().lastEvent.getEventType().equals(EventType.TOTEM_CHOICE) +  || controller.getMiniModel().lastEvent.getEventType().equals(EventType.RECONNECT_PLAYER) +  || controller.getMiniModel().lastEvent.getEventType().equals(EventType.DISCONNECTED_PLAYER))   buildSidePanel();   if(isError)   { @@ -242,7 +265,7 @@ Current scope: all classes   isError=false;   return;   } -  if(controller.getMiniModel().lastEvent==null ||controller.getMiniModel().lastEvent.getEventType().equals(EventType.TOTEM_CHOICE) || controller.getMiniModel().lastEvent.getEventType().equals(EventType.NEXT_ROUND)) { +  if(controller.getMiniModel().lastEvent==null ||controller.getMiniModel().lastEvent.getEventType().equals(EventType.TOTEM_CHOICE) || controller.getMiniModel().lastEvent.getEventType().equals(EventType.NEXT_ROUND) || controller.getMiniModel().lastEvent.getEventType().equals(EventType.RECONNECT_PLAYER) || controller.getMiniModel().lastEvent.getEventType().equals(EventType.DISCONNECTED_PLAYER)) {   renderMyHand();   renderUpper();   renderBoard(); @@ -478,7 +501,7 @@ Current scope: all classes   // ==== GROUPS ====   /** Builds the full side panel from scratch, creating a player card for each connected player. */   private void buildSidePanel() { -  infoText.setText("Round: "+Integer.toString(controller.getMiniModel().currentState.getRound()) + " • " + controller.getMiniModel().currentState.getGameStage().toString()); +  infoText.setText("Round: "+ controller.getMiniModel().currentState.getRound() + " • " + controller.getMiniModel().currentState.getGameStage().toString());   VBox playerList = new VBox();   playerList.setFillWidth(true);   for (Player p : controller.getMiniModel().players.values()) { @@ -491,10 +514,9 @@ Current scope: all classes     /** Updates food/prestige labels, current-player highlight, card-icon opacity, and plays error shake if needed. */   private void updateSidePanel() { -  infoText.setText("Round: "+Integer.toString(controller.getMiniModel().currentState.getRound()) + " • " + controller.getMiniModel().currentState.getGameStage().toString()); +  infoText.setText("Round: "+ controller.getMiniModel().currentState.getRound() + " • " + controller.getMiniModel().currentState.getGameStage().toString());   if (controller.getMiniModel().currentState.getCurrentPlayer() == null) return;   String current = controller.getMiniModel().currentState.getCurrentPlayer().getUserName(); -  // ordine: building, artists, gatherers, inventors, builders, shamans, hunters   String[] fields = {"building", "artists", "gatherers", "inventors", "builders", "shamans", "hunters"};     for (Player p : controller.getMiniModel().players.values()) { @@ -625,8 +647,13 @@ Current scope: all classes   int i = 0;   for (TribeCard card : controller.getMiniModel().upperListTribeCards) {   final int index = i; -  StackPane img = createCard(card, true, true, upperList); -  img.setOnMouseClicked(e -> controller.drawUpperTribeCard(index)); +  StackPane img; +  if(!card.isEventCard()) { +  img = createCard(card, true, true, upperList); +  img.setOnMouseClicked(e -> controller.drawUpperTribeCard(index)); +  } else { +  img = createCard(card, false, false, upperList); +  }   upperList.getChildren().add(img);   i++;   } @@ -642,8 +669,13 @@ Current scope: all classes   int i = 0;   for (TribeCard card : controller.getMiniModel().lowerListTribeCards) {   final int index = i; -  StackPane img = createCard(card, true, true, lowerList); -  img.setOnMouseClicked(e -> controller.drawLowerTribeCard(index)); +  StackPane img; +  if(!card.isEventCard()) { +  img = createCard(card, true, true, lowerList); +  img.setOnMouseClicked(e -> controller.drawLowerTribeCard(index)); +  } else { +  img = createCard(card, false, false, lowerList); +  }   lowerList.getChildren().add(img);   i++;   } @@ -678,7 +710,6 @@ Current scope: all classes   /** Adds the era-specific deck back image to the board. */   private void renderDeck() {   String path = switch (controller.getMiniModel().currentState.getEra()) { -  case 1 -> "/GUIImages/Backs/back-001.png";   case 2 -> "/GUIImages/Backs/back-030.png";   case 3 -> "/GUIImages/Backs/back-058.png";   default -> "/GUIImages/Backs/back-001.png"; @@ -687,8 +718,6 @@ Current scope: all classes   back.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(56).divide(4).multiply(0.94));   back.setPreserveRatio(true);   addClip(back); -  addShadow(back); -  addHoverZoom(back);   board.getChildren().add(back);   }   @@ -736,7 +765,6 @@ Current scope: all classes   totem.setLayoutX(nv.doubleValue() * 0.364);   });   -  // initialize immediately if already laid out   if (card.getHeight() > 0) totem.setLayoutY(card.getHeight() *(yRatio-0.196));   if (card.getWidth() > 0) totem.setLayoutX(card.getWidth() * 0.364);   @@ -896,7 +924,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-12/sources/source-6.html b/deliverables/Coverage/htmReport/ns-12/sources/source-6.html similarity index 93% rename from deliverables/Coverage/htmlReport/ns-12/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-12/sources/source-6.html index 1582b47..ac05c37 100644 --- a/deliverables/Coverage/htmlReport/ns-12/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-12/sources/source-6.html @@ -105,6 +105,7 @@ Current scope: all classes  import javafx.util.Duration;    import java.util.Locale; + import java.util.Objects;    /**   * FXML controller for the totem selection scene. @@ -113,20 +114,20 @@ Current scope: all classes   * other players see a waiting banner.   */  public class TotemFXMLController { -  //TODO +  /** Background image displayed behind the totem selection grid. */   @FXML private ImageView backgroundImage; -  //TODO +  /** HBox containing the totem card widgets. */   @FXML private HBox mainHBox; -  //TODO +  /** Banner label showing whose turn it is to choose a totem. */   @FXML private Label turnBanner; -  //TODO +  /** Button that submits the selected totem to the server. */   @FXML private Button confirmButton;   -  //TODO +  /** Client controller for sending the totem choice. */   private ClientController controller; -  //TODO +  /** Index of the currently selected totem, or {@code -1} if none selected. */   private int selectedIndex = -1; -  //TODO +  /** The {@link StackPane} frame of the currently selected totem card, or {@code null}. */   private StackPane selectedFrame = null;     /** @@ -141,7 +142,7 @@ Current scope: all classes   /** Initializes the scene: sets the background image to fill the screen. */   @FXML   public void initialize() { -  Image img = new Image(getClass().getResourceAsStream("/GUIImages/Background.png")); +  Image img = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/GUIImages/Background.png")));   backgroundImage.setImage(img);   Rectangle2D screenBounds = Screen.getPrimary().getBounds();   backgroundImage.setFitWidth(screenBounds.getWidth()); @@ -211,7 +212,7 @@ Current scope: all classes     /** Builds a totem card widget; if {@code interactive}, wires click/hover handlers and selection logic. */   private VBox buildCard(Totems totem, int idx, boolean interactive) { -  ImageView img = new ImageView(new Image(getClass().getResourceAsStream("/GUIImages/Totems/totem_" + String.valueOf(totem).toLowerCase(Locale.ROOT) + ".png"))); +  ImageView img = new ImageView(new Image(Objects.requireNonNull(getClass().getResourceAsStream("/GUIImages/Totems/totem_" + String.valueOf(totem).toLowerCase(Locale.ROOT) + ".png"))));   img.setFitHeight(150);   img.setPreserveRatio(true);   @@ -301,7 +302,7 @@ Current scope: all classes   "-fx-text-fill: " + (selected ? "#FFD700" : "#ffffff") + ";";   }   -  /** Returns the totem name with only the first letter capitalised. */ +  /** Returns the totem name with only the first letter capitalized. */   private String capitalize(Totems t) {   String s = t.name().toLowerCase(Locale.ROOT);   return Character.toUpperCase(s.charAt(0)) + s.substring(1); @@ -339,7 +340,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-13/index.html b/deliverables/Coverage/htmReport/ns-13/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index.html rename to deliverables/Coverage/htmReport/ns-13/index.html index 37110f5..5a702e4 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index.html +++ b/deliverables/Coverage/htmReport/ns-13/index.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -150,19 +150,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_BLOCK.html index 2ccee0e..36b3279 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_BLOCK.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -146,7 +146,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_BLOCK_DESC.html index e619b1e..ef18440 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_BLOCK_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -185,19 +185,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_CLASS.html index 485e336..c64d6c2 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_CLASS.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -185,19 +185,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_CLASS_DESC.html index 6feb925..3d3b10a 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_CLASS_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_LINE.html index 0382d86..90cad0b 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_LINE.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -185,19 +185,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_LINE_DESC.html index 029f14c..cd4192d 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_LINE_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_METHOD.html index 171c5f7..dcb39b4 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_METHOD.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -134,35 +134,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) - - - - - BorderStyle - - - 100% - - - (1/1) - - - - - 82.4% - - - (14/17) - - - - - - 88.9% - - - (24/27) + (0/131) @@ -199,6 +171,34 @@ it.polimi.ingsw.gc14.View.TUI (60/73) + + + + BorderStyle + + + 100% + + + (1/1) + + + + + 100% + + + (14/14) + + + + + + 100% + + + (22/22) + @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_METHOD_DESC.html index c6e51ee..4a43d93 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_METHOD_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -103,6 +103,34 @@ it.polimi.ingsw.gc14.View.TUI Line, % + + BorderStyle + + + 100% + + + (1/1) + + + + + 100% + + + (14/14) + + + + + + 100% + + + (22/22) + + + AsciiTable @@ -136,34 +164,6 @@ it.polimi.ingsw.gc14.View.TUI (60/73) - - - - BorderStyle - - - 100% - - - (1/1) - - - - - 82.4% - - - (14/17) - - - - - - 88.9% - - - (24/27) - @@ -181,7 +181,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-13/index_SORT_BY_NAME_DESC.html index 117182d..487907f 100644 --- a/deliverables/Coverage/htmlReport/ns-13/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-13/index_SORT_BY_NAME_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.View.TUI - 53.3% + 58.5% - (24/45) + (24/41) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.View.TUI - 38.7% + 36.3% - (84/217) + (82/226) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/17) + (0/16) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.View.TUI 0% - (0/117) + (0/131) @@ -150,19 +150,19 @@ it.polimi.ingsw.gc14.View.TUI - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.View.TUI diff --git a/deliverables/Coverage/htmlReport/ns-13/sources/source-1.html b/deliverables/Coverage/htmReport/ns-13/sources/source-1.html similarity index 74% rename from deliverables/Coverage/htmlReport/ns-13/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-13/sources/source-1.html index 08637a2..a498a80 100644 --- a/deliverables/Coverage/htmlReport/ns-13/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-13/sources/source-1.html @@ -110,33 +110,62 @@ Current scope: all classes   * }</pre>   */  public class AsciiTable { -  //TODO +  /** Border style used to draw corners, lines, and junctions. */   private final BorderStyle s; -  //TODO +  +  /** Number of columns in this table. */   private final int cols; -  //TODO +  +  /** All rows of the table, in insertion order. */   private final List<List<String>> rows = new ArrayList<>(); -  //TODO +  +  /** Indices of rows after which a horizontal separator line is drawn. */   private final List<Integer> separators = new ArrayList<>(); -  //TODO +  +  /** +  * Creates a new empty table with the given border style and column count. +  * +  * @param s the border style to use when rendering. +  * @param cols the number of columns. +  */   public AsciiTable(BorderStyle s, int cols) {   this.s = s; this.cols = cols;   } -  //TODO +  +  /** +  * Appends a row using varargs cells. +  * +  * @param cells one value per column. +  */   public void addRow(String... cells) { rows.add(Arrays.asList(cells)); } -  //TODO +  +  /** +  * Appends a row from an existing list. +  * +  * @param cells one value per column. +  */   public void addRow(List<String> cells) { rows.add(cells); } -  //TODO +  +  /** +  * Inserts a header row at position 0 and marks it with a separator line below it. +  * +  * @param cells one header label per column. +  */   public void addHeader(String... cells) {   rows.add(0, Arrays.asList(cells));   separators.add(0);   } -  //TODO +  +  /** +  * Marks a separator line to be drawn after the last row added so far. +  */   public void addSeparator() { separators.add(rows.size() - 1); }     /**   * Renders the table to a multi-line string.   * Column width is the widest cell in display columns (wide chars = 2), plus 1. +  * +  * @return the fully rendered table as a multi-line string.   */   public String build() {   var sb = new StringBuilder(); @@ -156,11 +185,19 @@ Current scope: all classes   sb.append(hline(s.bl(), s.mb(), s.br(), maxWidth));   return sb.toString();   } -  //TODO +  /** +  * Builds a single horizontal borderline across all columns. +  * +  * @param l left-end character. +  * @param m middle junction character (between columns). +  * @param r right-end character. +  * @param maxWidth width in display columns of each cell (including padding). +  * @return the rendered horizontal line string. +  */   private String hline(String l, String m, String r, int maxWidth) {   var sb = new StringBuilder(l);   for (int i = 0; i < cols; i++) { -  sb.append(s.h().repeat(maxWidth)); +  sb.repeat(Objects.requireNonNull(s.h()), maxWidth);   if (i < cols - 1) sb.append(m);   }   return sb.append(r).toString(); @@ -180,6 +217,11 @@ Current scope: all classes   * Places two pre-rendered text blocks side by side, separated by a gap.   * Left-block lines are padded to a uniform display width so the right block   * always starts at the same column. Uses {@link #displayWidth} for measurement. +  * +  * @param left lines of the left block. +  * @param right lines of the right block. +  * @param gap number of space characters between the two blocks. +  * @return the combined multi-line string.   */   public static String sideBySide(List<String> left, List<String> right, int gap) {   int leftWidth = left.stream().mapToInt(AsciiTable::displayWidth).max().orElse(0); @@ -196,11 +238,13 @@ Current scope: all classes   return sb.toString();   }   -  // ── Wide-character width ──────────────────────────────────────────────────     /**   * Returns the number of terminal columns required to display {@code s}.   * Wide characters (emoji, CJK, full-width) count as 2; all others as 1. +  * +  * @param s the string to measure; ANSI escape sequences are stripped before counting. +  * @return the display width in terminal columns.   */   public static int displayWidth(String s) {   s = s.replaceAll("\033\\[[^m]*m", ""); @@ -220,34 +264,33 @@ Current scope: all classes   */   private static boolean isWide(int cp) {   if (cp < 0x1100) return false; -  if (cp <= 0x115F) return true; // Hangul Jamo +  if (cp <= 0x115F) return true;   if (cp < 0x2E80) { -  // Specific wide symbols below 0x2E80 -  return cp == 0x2B50 // ⭐ STAR -  || cp == 0x2B55; // ⭕ HEAVY LARGE CIRCLE +  return cp == 0x2B50 +  || cp == 0x2B55;   } -  if (cp <= 0x303E) return true; // CJK Radicals, Kangxi, CJK Symbols +  if (cp <= 0x303E) return true;   if (cp < 0x3041) return false; -  if (cp <= 0xA4CF) return true; // Hiragana, Katakana, Bopomofo, CJK Unified +  if (cp <= 0xA4CF) return true;   if (cp < 0xA960) return false; -  if (cp <= 0xA97F) return true; // Hangul Jamo Extended-A +  if (cp <= 0xA97F) return true;   if (cp < 0xAC00) return false; -  if (cp <= 0xD7AF) return true; // Hangul Syllables +  if (cp <= 0xD7AF) return true;   if (cp < 0xF900) return false; -  if (cp <= 0xFAFF) return true; // CJK Compatibility Ideographs +  if (cp <= 0xFAFF) return true;   if (cp < 0xFE10) return false; -  if (cp <= 0xFE1F) return true; // Vertical Forms +  if (cp <= 0xFE1F) return true;   if (cp < 0xFE30) return false; -  if (cp <= 0xFE6F) return true; // CJK Compatibility Forms +  if (cp <= 0xFE6F) return true;   if (cp < 0xFF00) return false; -  if (cp <= 0xFF60) return true; // Fullwidth Latin, punctuation +  if (cp <= 0xFF60) return true;   if (cp < 0xFFE0) return false; -  if (cp <= 0xFFE6) return true; // Fullwidth Signs +  if (cp <= 0xFFE6) return true;   if (cp < 0x1F004) return false; -  if (cp <= 0x1FAFF) return true; // Emoji (mahjong, playing cards, flags, -  // misc symbols, transport, 🍖 U+1F357, ...) +  if (cp <= 0x1FAFF) return true;  if (cp < 0x20000) return false; -  return cp <= 0x3FFFD; // CJK Extension B through G +  return cp <= 0x3FFFD;   }  } @@ -273,7 +316,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-13/sources/source-2.html b/deliverables/Coverage/htmReport/ns-13/sources/source-2.html similarity index 79% rename from deliverables/Coverage/htmlReport/ns-13/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-13/sources/source-2.html index 9acb87b..fc4e9f7 100644 --- a/deliverables/Coverage/htmlReport/ns-13/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-13/sources/source-2.html @@ -52,18 +52,18 @@ Current scope: all classes - 82.4% + 100% - (14/17) + (14/14) - 88.9% + 100% - (24/27) + (22/22) @@ -84,23 +84,14 @@ Current scope: all classes   * <p>Each style stores the characters needed to draw table corners,   * horizontal and vertical lines, and junctions.   */ - public enum BorderStyle { -  -  /** -  * Unicode box-drawing border style. -  */ -  UNICODE("╔","╗","╚","╝","═","║","╠","╣","╦","╩","╬","├","┤","┼"), -  -  /** -  * Plain ASCII border style. -  */ -  ASCII ("+","+","+","+","-","|","+","+","+","+","+","+","+","+"), + @SuppressWarnings("ALL") + public enum BorderStyle {     /**   * Rounded Unicode border style.   */   ROUNDED("╭","╮","╰","╯","─","│","├","┤","┬","┴","┼","├","┤","┼"); -  +  /** Corner (tl/tr/bl/br), line (h/v), outer junction (ml/mr/mt/mb/x), and separator junction (sl/sr/sx) characters. */   private final String tl,tr,bl,br,h,v,ml,mr,mt,mb,x,sl,sr,sx;     BorderStyle(String tl,String tr,String bl,String br, @@ -148,16 +139,6 @@ Current scope: all classes   public String v() { return v; }     /** -  * @return the middle-left junction character. -  */ -  public String ml() { return ml; } -  -  /** -  * @return the middle-right junction character. -  */ -  public String mr() { return mr; } -  -  /**   * @return the top-middle junction character.   */   public String mt() { return mt; } @@ -168,11 +149,6 @@ Current scope: all classes   public String mb() { return mb; }     /** -  * @return the center junction character. -  */ -  public String x() { return x; } -  -  /**   * @return the separator-left junction character.   */   public String sl() { return sl; } @@ -210,7 +186,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-13/sources/source-3.html b/deliverables/Coverage/htmReport/ns-13/sources/source-3.html similarity index 77% rename from deliverables/Coverage/htmlReport/ns-13/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-13/sources/source-3.html index 9e13e82..f8a16b4 100644 --- a/deliverables/Coverage/htmlReport/ns-13/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-13/sources/source-3.html @@ -59,7 +59,7 @@ Current scope: all classes 0% - (0/17) + (0/16) @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/117) + (0/131) @@ -135,14 +135,21 @@ Current scope: all classes   this.username = "";   }   -  // ── Setters ───────────────────────────────────────────────────────────────   -  /** Sets the username of the local player. */ +  /** +  * Sets the username of the local player. +  * +  * @param username the username to assign. +  */   public void setUsername(String username) {   this.username = username;   }   -  /** Updates the model stored in this view. */ +  /** +  * Updates the model stored in this view. +  * +  * @param model the latest mini model to display. +  */   @Override   public void setModel(MiniModel model) {   this.model = model; @@ -152,13 +159,14 @@ Current scope: all classes   * Registers the active JLine {@link LineReader}.   * Once set, all output routes through {@link LineReader#printAbove} so the   * prompt survives background-thread renders. +  * +  * @param lineReader the JLine reader to use for output; also provides the terminal reference.   */   public void setLineReader(LineReader lineReader) {   this.lineReader = lineReader;   this.terminal = lineReader.getTerminal();   }   -  // ── Public render entry points ────────────────────────────────────────────     /**   * Default render: dispatches to the right view based on game stage. @@ -169,21 +177,20 @@ Current scope: all classes   GameStages stage = model.currentState.getGameStage();   if (stage == GameStages.TOTEM_CHOICE) {   display(buildTotemsContent()); +  printLine("\033[2mCommands: totem <pos>\033[0m");   } else if (stage == GameStages.ENDED) { -  display(buildStandingContent() + "\nType 'rematch' to play again or 'quit' to exit"); +  display(buildStandingContent()); +  printLine("Type 'rematch' to play again or 'quit' to exit");   } else {   display(buildBoardContent()); +  printLine("\033[2mCommands: slot <pos> | draw upper/lower tribe/building <pos> | totem <pos> | skip | clear | details buildings/events/characters | quit\033[0m");   }   }     /** Renders the board + menu (top) and all players' hands in a grid (bottom). */   public void renderBoard() {   display(buildBoardContent()); -  } -  -  /** Renders the totem-choice panel. */ -  public void renderTotems() { -  display(buildTotemsContent()); +  printLine("\033[2mCommands: slot <pos> | draw upper/lower tribe/building <pos> | totem <pos> | skip | clear | details buildings/events/characters | quit\033[0m");   }     /** @@ -206,10 +213,10 @@ Current scope: all classes   text += "\nPress any key to continue";   }   } -  printLine(text); +  render(); +  printLine("\033[31m" + text + "\033[0m");   }   -  // ── Content builders (return strings, do not print) ───────────────────────     /**   * Builds the main view: board + menu side by side, followed by all players' @@ -227,6 +234,7 @@ Current scope: all classes   */   private String buildAllHandsContent() {   List<Player> players = new ArrayList<>(model.players.values()); +  players.removeIf(p -> model.disconnectedPlayers.contains(p.getUserName()));   if (players.isEmpty()) return "";     int n = players.size(); @@ -237,11 +245,23 @@ Current scope: all classes   for (int i = 0; i < leftCount; i++) leftSb.append(players.get(i).toString()).append("\n");   for (int i = leftCount; i < n; i++) rightSb.append(players.get(i).toString()).append("\n");   -  if (rightSb.isEmpty()) return leftSb.toString(); +  String handsBlock; +  if (rightSb.isEmpty()) { +  handsBlock = leftSb.toString(); +  } else { +  handsBlock = AsciiTable.sideBySide( +  List.of(leftSb.toString().split("\n", -1)), +  List.of(rightSb.toString().split("\n", -1)), 3); +  }   -  return AsciiTable.sideBySide( -  List.of(leftSb.toString().split("\n", -1)), -  List.of(rightSb.toString().split("\n", -1)), 3); +  if (!model.disconnectedPlayers.isEmpty()) { +  var box = new AsciiTable(BorderStyle.ROUNDED, 1); +  box.addHeader("Disconnected"); +  model.disconnectedPlayers.forEach(box::addRow); +  handsBlock += "\n" + box.build(); +  } +  +  return handsBlock;   }     private String buildTotemsContent() { @@ -254,31 +274,29 @@ Current scope: all classes   String current = model.currentState.getCurrentPlayer() != null   ? model.currentState.getCurrentPlayer().getUserName() + " — "   : ""; -  return current + "TOTEMS AVAILABLE:\n" + table.build() + "\nType: totem <pos>"; +  return current + "TOTEMS AVAILABLE:\n" + table.build();   }     private String buildStandingContent() {   if (model.standingPlayers == null || model.standingPlayers.isEmpty()) return ""; -  StringBuilder sb = new StringBuilder(); -  int size = model.standingPlayers.size(); -  for (int i = 0; i < size / 2; i++) { -  sb.append(AsciiTable.sideBySide( -  List.of(model.standingPlayers.get(i * 2).toString().split("\n")), -  List.of(model.standingPlayers.get(i * 2 + 1).toString().split("\n")), 2)); +  String banner = model.standingPlayers.get(0).getUserName().equals(username) +  ? "WINNER!" : "GAME OVER"; +  List<String> lines = new ArrayList<>(); +  for (int i = 0; i < model.standingPlayers.size(); i++) { +  var p = model.standingPlayers.get(i); +  lines.add((i + 1) + ". " + p.getUserName() +  + " (" + p.getTotem().toString() + ")" +  + " \uD83C\uDF56:" + p.getFoodValue() +  + " \uD83C\uDFC5:" + p.getPrestigeValue());   } -  sb.append("\n"); -  if (size % 2 != 0) { -  sb.append(model.standingPlayers.get(size - 1)).append("\n"); -  } -  if (model.standingPlayers.get(0).getUserName().equals(username)) { -  sb.append("GAME ENDED: !!!YOU WON!!!"); -  } else { -  sb.append("GAME ENDED: !!!YOU LOST!!!"); -  } -  return sb.toString(); +  int contentWidth = lines.stream().mapToInt(AsciiTable::displayWidth).max().orElse(0); +  int pad = Math.max(0, (contentWidth - AsciiTable.displayWidth(banner)) / 2); +  var table = new AsciiTable(BorderStyle.ROUNDED, 1); +  table.addHeader(" ".repeat(pad) + banner); +  lines.forEach(table::addRow); +  return table.build();   }   -  // ── Core display primitive ────────────────────────────────────────────────     /**   * Clears the terminal and displays {@code content}, horizontally centered. @@ -345,7 +363,6 @@ Current scope: all classes   return AsciiTable.displayWidth(line);   }   -  // ── Board / players stamp helpers ─────────────────────────────────────────     /**   * Returns the board state as a multi-line string: turn order, upper cards, @@ -366,20 +383,20 @@ Current scope: all classes     var upperCards = new AsciiTable(BorderStyle.ROUNDED, 2);   var lowerCards = new AsciiTable(BorderStyle.ROUNDED, 2); -  upperCards.addHeader("Char/Events", "Building"); -  lowerCards.addHeader("Char/Events", "Building"); +  upperCards.addHeader("Char/\033[38;5;180mEvents\033[0m", "Building"); +  lowerCards.addHeader("Char/\033[38;5;180mEvents\033[0m", "Building");     int maxU = Math.max(model.upperListTribeCards.size(), model.upperListBuildingCards.size());   for (int i = 0; i < maxU; i++) { -  String t = i < model.upperListTribeCards.size() ? i + model.upperListTribeCards.get(i).toStringBoard() : ""; -  String b = i < model.upperListBuildingCards.size() ? i + model.upperListBuildingCards.get(i).toString() : ""; +  String t = i < model.upperListTribeCards.size() ? i + ":" + model.upperListTribeCards.get(i).toStringBoard() : ""; +  String b = i < model.upperListBuildingCards.size() ? i + ":" + model.upperListBuildingCards.get(i).toStringBoard() : "";   upperCards.addRow(t, b);   }     int maxL = Math.max(model.lowerListTribeCards.size(), model.lowerListBuildingCards.size());   for (int i = 0; i < maxL; i++) { -  String t = i < model.lowerListTribeCards.size() ? i + model.lowerListTribeCards.get(i).toStringBoard() : ""; -  String b = i < model.lowerListBuildingCards.size() ? i + model.lowerListBuildingCards.get(i).toString() : ""; +  String t = i < model.lowerListTribeCards.size() ? i + ":" + model.lowerListTribeCards.get(i).toStringBoard() : ""; +  String b = i < model.lowerListBuildingCards.size() ? i + ":" + model.lowerListBuildingCards.get(i).toStringBoard() : "";   lowerCards.addRow(t, b);   }   @@ -422,7 +439,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-14/index.html b/deliverables/Coverage/htmReport/ns-14/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index.html rename to deliverables/Coverage/htmReport/ns-14/index.html index 10d849d..6f6fd0d 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index.html +++ b/deliverables/Coverage/htmReport/ns-14/index.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_BLOCK.html index 03de07a..95a74b0 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_BLOCK.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_BLOCK_DESC.html index ddffd04..ea62456 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_BLOCK_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_CLASS.html index 2abb24f..440471b 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_CLASS.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_CLASS_DESC.html index 0386fb0..c771ef3 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_CLASS_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_LINE.html index 638f364..e1078f5 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_LINE.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_LINE_DESC.html index 569d0eb..c4a0c95 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_LINE_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_METHOD.html index bfef67e..d724615 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_METHOD.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_METHOD_DESC.html index e4fc43b..7f0261a 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_METHOD_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-14/index_SORT_BY_NAME_DESC.html index 826f103..2e6206c 100644 --- a/deliverables/Coverage/htmlReport/ns-14/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-14/index_SORT_BY_NAME_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.View diff --git a/deliverables/Coverage/htmlReport/ns-14/sources/source-1.html b/deliverables/Coverage/htmReport/ns-14/sources/source-1.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-14/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-14/sources/source-1.html index 7186b34..02bcc2a 100644 --- a/deliverables/Coverage/htmlReport/ns-14/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-14/sources/source-1.html @@ -88,7 +88,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-15/index.html b/deliverables/Coverage/htmReport/ns-15/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index.html rename to deliverables/Coverage/htmReport/ns-15/index.html index 3300bc4..1164fd8 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index.html +++ b/deliverables/Coverage/htmReport/ns-15/index.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_BLOCK.html index c126135..2ef4846 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_BLOCK.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_BLOCK_DESC.html index 188f371..dfcdd40 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_BLOCK_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_CLASS.html index 4d6fc6d..302b29e 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_CLASS.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_CLASS_DESC.html index b189787..b615779 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_CLASS_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_LINE.html index 6bf87c2..7fc0a27 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_LINE.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_LINE_DESC.html index 93882ef..ef66c93 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_LINE_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_METHOD.html index 3c9ccbf..cd72a65 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_METHOD.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_METHOD_DESC.html index 97271af..57f347c 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_METHOD_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-15/index_SORT_BY_NAME_DESC.html index bd673be..3d5401b 100644 --- a/deliverables/Coverage/htmlReport/ns-15/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-15/index_SORT_BY_NAME_DESC.html @@ -62,7 +62,7 @@ it.polimi.ingsw.gc14.Network.RMI.Common diff --git a/deliverables/Coverage/htmlReport/ns-15/sources/source-1.html b/deliverables/Coverage/htmReport/ns-15/sources/source-1.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-15/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-15/sources/source-1.html index 726abff..4ef9e67 100644 --- a/deliverables/Coverage/htmlReport/ns-15/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-15/sources/source-1.html @@ -46,7 +46,6 @@ Current scope: all classes    import java.io.Serializable;  import java.rmi.*; - import java.util.Map;    /**   * Callback interface used by the server to notify an RMI client about @@ -96,7 +95,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-15/sources/source-2.html b/deliverables/Coverage/htmReport/ns-15/sources/source-2.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-15/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-15/sources/source-2.html index 7087aeb..42a085a 100644 --- a/deliverables/Coverage/htmlReport/ns-15/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-15/sources/source-2.html @@ -168,7 +168,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-2/index.html b/deliverables/Coverage/htmReport/ns-2/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index.html rename to deliverables/Coverage/htmReport/ns-2/index.html index db0b2e1..a516c00 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index.html +++ b/deliverables/Coverage/htmReport/ns-2/index.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -158,18 +158,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_BLOCK.html index 2594ac5..a852d30 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_BLOCK.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -158,18 +158,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_BLOCK_DESC.html index 004edfe..88c9a77 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_BLOCK_DESC.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_CLASS.html index f57bad3..ee8e4ca 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_CLASS.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -158,18 +158,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_CLASS_DESC.html index 05ae182..f26e1df 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_CLASS_DESC.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_LINE.html index fceb909..12e99ed 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_LINE.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -158,18 +158,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_LINE_DESC.html index 9862c39..18c874b 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_LINE_DESC.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_METHOD.html index abc861a..1d560a3 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_METHOD.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -158,18 +158,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_METHOD_DESC.html index 9fa2653..ff388f3 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_METHOD_DESC.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-2/index_SORT_BY_NAME_DESC.html index afa2006..1cf769f 100644 --- a/deliverables/Coverage/htmlReport/ns-2/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-2/index_SORT_BY_NAME_DESC.html @@ -61,18 +61,18 @@ it.polimi.ingsw.gc14.Controller - 69.2% + 70% - (18/26) + (21/30) - 65.6% + 66.2% - (42/64) + (47/71) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Controller - 100% + 95.5% - (18/18) + (21/22) - 97.7% + 95.9% - (42/43) + (47/49) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Controller 0% - (0/21) + (0/22) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Controller diff --git a/deliverables/Coverage/htmlReport/ns-2/sources/source-1.html b/deliverables/Coverage/htmReport/ns-2/sources/source-1.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-2/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-2/sources/source-1.html index edf7980..0c96d88 100644 --- a/deliverables/Coverage/htmlReport/ns-2/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-2/sources/source-1.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/21) + (0/22) @@ -89,6 +89,7 @@ Current scope: all classes
  package it.polimi.ingsw.gc14.Controller;
  
+ import it.polimi.ingsw.gc14.ErrorType;
  import it.polimi.ingsw.gc14.Model.MiniModel;
  import it.polimi.ingsw.gc14.Network.IClient;
  import it.polimi.ingsw.gc14.View.IView;
@@ -107,7 +108,7 @@ Current scope:     all classes
      private MiniModel miniModel;
  
      /** View of the client. */
-     private IView view;
+     private final IView view;
  
      /** Network client, either TCP or RMI. */
      private IClient client;
@@ -271,8 +272,10 @@ Current scope:     all classes
       */
      public void totemChoice(int pos) {
          if (miniModel == null || miniModel.availableTotems == null
-                 || pos < 0 || pos >= miniModel.availableTotems.size())
+                 || pos < 0 || pos >= miniModel.availableTotems.size()) {
+             view.showError(ErrorType.WRONG_ACTION, "ERROR: Invalid Totem Choice");
              return;
+         }
          client.totemChoice(myUsername, String.valueOf(miniModel.availableTotems.get(pos)));
      }
  
@@ -308,7 +311,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-2/sources/source-2.html b/deliverables/Coverage/htmReport/ns-2/sources/source-2.html
similarity index 95%
rename from deliverables/Coverage/htmlReport/ns-2/sources/source-2.html
rename to deliverables/Coverage/htmReport/ns-2/sources/source-2.html
index 09f3c48..290ff02 100644
--- a/deliverables/Coverage/htmlReport/ns-2/sources/source-2.html
+++ b/deliverables/Coverage/htmReport/ns-2/sources/source-2.html
@@ -64,18 +64,18 @@ Current scope:     all classes
 
 
   
-    100%
+    95.5%
   
   
-    (18/18)
+    (21/22)
   
 
 
   
-    97.7%
+    95.9%
   
   
-    (42/43)
+    (47/49)
   
 
 
@@ -179,7 +179,13 @@ Current scope:     all classes
       *         {@code false} otherwise.
       */
      public synchronized boolean addPlayer(String username) {
-         return model.addPlayer(new Player(username));
+         if(username.trim().length()>10)
+             return false;
+         Player player = model.getPlayerByUsername(username);
+         if(player!=null)
+             return false;
+         player = new Player(username);
+         return model.addPlayer(player);
      }
  
      /**
@@ -326,7 +332,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index.html b/deliverables/Coverage/htmReport/ns-3/index.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index.html
rename to deliverables/Coverage/htmReport/ns-3/index.html
index dcbaffb..5c432fa 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index.html
+++ b/deliverables/Coverage/htmReport/ns-3/index.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -115,10 +115,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -131,10 +131,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
   
@@ -158,18 +158,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -188,7 +188,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -236,10 +236,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -298,18 +298,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
+    (103/105)
   
 
   
@@ -333,10 +333,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_BLOCK.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_BLOCK.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_BLOCK.html
index 4bf88a0..52453e9 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_BLOCK.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_BLOCK.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -146,7 +146,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -186,10 +186,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -221,18 +221,53 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
+  
+
+  
+  
+    Player
+
+  
+    100%
+  
+  
+    (2/2)
+  
+
+
+  
+    100%
+  
+  
+    (23/23)
+  
+
+
+  
+    84.5%
+  
+  
+    (49/58)
+  
+
+
+  
+    98.1%
+  
+  
+    (103/105)
   
 
   
@@ -264,45 +299,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
-  
-
-  
-  
-    Player
-
-  
-    100%
-  
-  
-    (2/2)
-  
-
-
-  
-    100%
-  
-  
-    (23/23)
-  
-
-
-  
-    96.6%
-  
-  
-    (56/58)
-  
-
-
-  
-    100%
-  
-  
-    (106/106)
+    (26/30)
   
 
   
@@ -318,10 +318,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -334,10 +334,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
   
@@ -356,7 +356,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_BLOCK_DESC.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_BLOCK_DESC.html
index 0ca7428..0deba65 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_BLOCK_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_BLOCK_DESC.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -150,10 +150,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -166,45 +166,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
-  
-
-  
-  
-    Player
-
-  
-    100%
-  
-  
-    (2/2)
-  
-
-
-  
-    100%
-  
-  
-    (23/23)
-  
-
-
-  
-    96.6%
-  
-  
-    (56/58)
-  
-
-
-  
-    100%
-  
-  
-    (106/106)
+    (72/82)
   
 
   
@@ -236,10 +201,45 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
+  
+
+  
+  
+    Player
+
+  
+    100%
+  
+  
+    (2/2)
+  
+
+
+  
+    100%
+  
+  
+    (23/23)
+  
+
+
+  
+    84.5%
+  
+  
+    (49/58)
+  
+
+
+  
+    98.1%
+  
+  
+    (103/105)
   
 
   
@@ -263,18 +263,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -298,10 +298,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -328,7 +328,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -344,7 +344,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_CLASS.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_CLASS.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_CLASS.html
index 1c8df40..d795927 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_CLASS.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_CLASS.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -150,10 +150,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -166,10 +166,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
   
@@ -193,18 +193,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -236,10 +236,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -258,7 +258,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -298,18 +298,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
+    (103/105)
   
 
   
@@ -333,10 +333,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_CLASS_DESC.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_CLASS_DESC.html
index 10cdff3..fff6f38 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_CLASS_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_CLASS_DESC.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -151,10 +151,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -186,18 +186,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
+    (103/105)
   
 
   
@@ -216,7 +216,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -232,7 +232,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -264,10 +264,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -291,18 +291,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -318,10 +318,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -334,10 +334,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
   
@@ -356,7 +356,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_LINE.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_LINE.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_LINE.html
index 2c58426..9e5b967 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_LINE.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_LINE.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -158,10 +158,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -193,18 +193,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -236,10 +236,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -255,10 +255,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -271,45 +271,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
-  
-
-  
-  
-    PlayableCard
-
-  
-    100%
-  
-  
-    (1/1)
-  
-
-
-  
-    100%
-  
-  
-    (6/6)
-  
-
-
-  
-    100%
-  
-  
-    (8/8)
-  
-
-
-  
-    100%
-  
-  
-    (14/14)
+    (72/82)
   
 
   
@@ -333,10 +298,29 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
+  
+
+
+  
+    98.1%
+  
+  
+    (103/105)
+  
+
+  
+  
+    PlayableCard
+
+  
+    100%
+  
+  
+    (1/1)
   
 
 
@@ -344,7 +328,23 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (106/106)
+    (4/4)
+  
+
+
+  
+    100%
+  
+  
+    (8/8)
+  
+
+
+  
+    100%
+  
+  
+    (12/12)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_LINE_DESC.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_LINE_DESC.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_LINE_DESC.html
index 4a0a5b6..6c2ffc8 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_LINE_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_LINE_DESC.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -129,6 +129,41 @@ it.polimi.ingsw.gc14.Model
   
     (6/6)
   
+
+  
+  
+    PlayableCard
+
+  
+    100%
+  
+  
+    (1/1)
+  
+
+
+  
+    100%
+  
+  
+    (4/4)
+  
+
+
+  
+    100%
+  
+  
+    (8/8)
+  
+
+
+  
+    100%
+  
+  
+    (12/12)
+  
 
   
   
@@ -151,53 +186,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
-  
-
-  
-  
-    PlayableCard
-
-  
-    100%
-  
-  
-    (1/1)
-  
-
-
-  
-    100%
-  
-  
-    (6/6)
-  
-
-
-  
-    100%
-  
-  
-    (8/8)
-  
-
-
-  
-    100%
-  
-  
-    (14/14)
+    (103/105)
   
 
   
@@ -213,10 +213,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -229,10 +229,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
   
@@ -264,10 +264,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -291,18 +291,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -326,10 +326,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -356,7 +356,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_METHOD.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_METHOD.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_METHOD.html
index 73573d5..aca7758 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_METHOD.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_METHOD.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -166,10 +166,45 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
+  
+
+  
+  
+    DecksCreator
+
+  
+    100%
+  
+  
+    (3/3)
+  
+
+
+  
+    90%
+  
+  
+    (9/10)
+  
+
+
+  
+    100%
+  
+  
+    (57/57)
+  
+
+
+  
+    87.8%
+  
+  
+    (72/82)
   
 
   
@@ -193,10 +228,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -228,53 +263,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
-  
-
-  
-  
-    DecksCreator
-
-  
-    100%
-  
-  
-    (3/3)
-  
-
-
-  
-    100%
-  
-  
-    (9/9)
-  
-
-
-  
-    100%
-  
-  
-    (57/57)
-  
-
-
-  
-    88.9%
-  
-  
-    (72/81)
+    (285/343)
   
 
   
@@ -293,7 +293,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -333,18 +333,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
+    (103/105)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_METHOD_DESC.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_METHOD_DESC.html
index 6347077..3d6a612 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_METHOD_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_METHOD_DESC.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -151,18 +151,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
+    (103/105)
   
 
   
@@ -181,7 +181,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -197,42 +197,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
-  
-
-  
-  
-    DecksCreator
-
-  
-    100%
-  
-  
-    (3/3)
-  
-
-
-  
-    100%
-  
-  
-    (9/9)
-  
-
-
-  
-    100%
-  
-  
-    (57/57)
-  
-
-
-  
-    88.9%
-  
-  
-    (72/81)
+    (12/12)
   
 
   
@@ -256,18 +221,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -291,10 +256,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -304,6 +269,41 @@ it.polimi.ingsw.gc14.Model
   
     (37/45)
   
+
+  
+  
+    DecksCreator
+
+  
+    100%
+  
+  
+    (3/3)
+  
+
+
+  
+    90%
+  
+  
+    (9/10)
+  
+
+
+  
+    100%
+  
+  
+    (57/57)
+  
+
+
+  
+    87.8%
+  
+  
+    (72/82)
+  
 
   
   
@@ -334,10 +334,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -356,7 +356,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_NAME_DESC.html
similarity index 94%
rename from deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_NAME_DESC.html
rename to deliverables/Coverage/htmReport/ns-3/index_SORT_BY_NAME_DESC.html
index 4d59068..54adeca 100644
--- a/deliverables/Coverage/htmlReport/ns-3/index_SORT_BY_NAME_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-3/index_SORT_BY_NAME_DESC.html
@@ -53,26 +53,26 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    77.6%
+    78.5%
   
   
-    (97/125)
+    (95/121)
   
 
 
   
-    73.5%
+    72.8%
   
   
-    (349/475)
+    (343/471)
   
 
 
   
-    82%
+    82.1%
   
   
-    (547/667)
+    (541/659)
   
 
   
@@ -151,10 +151,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    42.1%
+    53.3%
   
   
-    (8/19)
+    (8/15)
   
 
 
@@ -186,18 +186,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    96.6%
+    84.5%
   
   
-    (56/58)
+    (49/58)
   
 
 
   
-    100%
+    98.1%
   
   
-    (106/106)
+    (103/105)
   
 
   
@@ -216,7 +216,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -232,7 +232,7 @@ it.polimi.ingsw.gc14.Model
     100%
   
   
-    (14/14)
+    (12/12)
   
 
   
@@ -264,10 +264,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
   
@@ -286,7 +286,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Model
     0%
   
   
-    (0/44)
+    (0/36)
   
 
   
@@ -326,18 +326,18 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
   
@@ -353,10 +353,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -369,10 +369,10 @@ it.polimi.ingsw.gc14.Model
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
   
@@ -399,7 +399,7 @@ it.polimi.ingsw.gc14.Model
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-1.html b/deliverables/Coverage/htmReport/ns-3/sources/source-1.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-3/sources/source-1.html
rename to deliverables/Coverage/htmReport/ns-3/sources/source-1.html
index d3dc7e5..fdce4d8 100644
--- a/deliverables/Coverage/htmlReport/ns-3/sources/source-1.html
+++ b/deliverables/Coverage/htmReport/ns-3/sources/source-1.html
@@ -45,10 +45,10 @@ Current scope:     all classes
   DecksCreator
 
   
-    100%
+    87.5%
   
   
-    (7/7)
+    (7/8)
   
 
 
@@ -61,10 +61,10 @@ Current scope:     all classes
 
 
   
-    88.6%
+    87.5%
   
   
-    (70/79)
+    (70/80)
   
 
 
@@ -116,10 +116,10 @@ Current scope:     all classes
   Total
 
   
-    100%
+    90%
   
   
-    (9/9)
+    (9/10)
   
 
 
@@ -132,10 +132,10 @@ Current scope:     all classes
 
 
   
-    88.9%
+    87.8%
   
   
-    (72/81)
+    (72/82)
   
 
 
@@ -167,9 +167,8 @@ Current scope:     all classes
   * Utility class responsible for loading and creating decks of cards and slots for the game.
   * Cards are loaded from JSON resource files and instantiated according to their type and parameters.
   */
- public class DecksCreator {
+ public class DecksCreator {
  
-     private DecksCreator() {}
  
      /**
       * Loads the tribe card deck for the specified era from the corresponding JSON resource file.
@@ -360,7 +359,7 @@ Current scope:     all classes
          int era;
          boolean armed;
          boolean isEvent;
-         List<Object> params; // Object to support mixed boolean and numeric parameters from JSON
+         List<Object> params;
      }
  
      /**
@@ -373,7 +372,7 @@ Current scope:     all classes
          int era;
          int price;
          int prestigeValue;
-         List<Object> params; // Object to support mixed boolean and numeric parameters from JSON
+         List<Object> params;
      }
  }
 
@@ -399,7 +398,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-2.html b/deliverables/Coverage/htmReport/ns-3/sources/source-2.html
similarity index 98%
rename from deliverables/Coverage/htmlReport/ns-3/sources/source-2.html
rename to deliverables/Coverage/htmReport/ns-3/sources/source-2.html
index e3a703b..7d89aa3 100644
--- a/deliverables/Coverage/htmlReport/ns-3/sources/source-2.html
+++ b/deliverables/Coverage/htmReport/ns-3/sources/source-2.html
@@ -64,18 +64,18 @@ Current scope:     all classes
 
 
   
-    68.1%
+    68.4%
   
   
-    (209/307)
+    (210/307)
   
 
 
   
-    83.8%
+    83.1%
   
   
-    (285/340)
+    (285/343)
   
 
 
@@ -155,7 +155,7 @@ Current scope:     all classes
      /**
       * Queue containing the players who still have to choose their totem.
       */
-     private Queue<Player> totemChoiceQueue = new LinkedList<>();
+     private final Queue<Player> totemChoiceQueue = new LinkedList<>();
  
      /**
       * Assigns the selected totem to the specified player during the totem choice phase.
@@ -198,7 +198,7 @@ Current scope:     all classes
                  if(nextPlayer==null)
                  {
                      currentState.gameStageUpdate(GameStages.SLOT_CHOICE);
-                     currentState.playerUpdate(orderLogicCard.pull(),null);
+                     nextPlayerSetup();
                      return true;
                  }
              }
@@ -211,7 +211,7 @@ Current scope:     all classes
       * Map tracking the players who are currently disconnected.
       * Key: player; value: {@code true} if currently disconnected, {@code false} if reconnected.
       */
-     private Map<Player,Boolean> disconnectedPlayers = new HashMap<>();
+     private final Map<Player,Boolean> disconnectedPlayers = new HashMap<>();
  
      /**
       * Returns an unmodifiable view of the disconnected-players map.
@@ -249,17 +249,19 @@ Current scope:     all classes
          if(currentState.getCurrentPlayer().equals(player)) {
              if (currentState.getGameStage() != GameStages.TOTEM_CHOICE) {
                  nextPlayerSetup();
-                 return true;
              }
              else {
+                 totemChoiceQueue.removeIf(x->x.getUserName().equals(player.getUserName()));
+                 player.setTotem(getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size())));
                  if (totemChoiceQueue.isEmpty()) {
                      player.setTotem(getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size())));
-                 } else {
-                     totemChoiceQueue.add(player);
+                     currentState.gameStageUpdate(GameStages.SLOT_CHOICE);
+                     nextPlayerSetup();
+                     return true;
                  }
                  currentState.playerUpdate(totemChoiceQueue.poll(), null);
-                 return true;
              }
+             return true;
          }
  
          return true;
@@ -531,7 +533,6 @@ Current scope:     all classes
          currentState.gameStageUpdate(GameStages.TOTEM_CHOICE);
      }
  
-     //region Controller Methods
  
      /**
       * Attempts to assign the slot at the specified index to the specified player.
@@ -1047,7 +1048,7 @@ Current scope:     all classes
          );
          currentState.gameStageUpdate(GameStages.ENDED);
          playerStanding=new ArrayList<>(playersList);
-         playerStanding.sort((y,x)->x.getPrestigeValue()==y.getPrestigeValue()?Integer.compare(x.getFoodValue(),y.getFoodValue()):Integer.compare(x.getPrestigeValue(),y.getPrestigeValue()));
+         playerStanding.sort((y,x)->x.getPrestigeValue()==y.getPrestigeValue()?Integer.compare(x.getFoodValue(),y.getFoodValue()):Integer.compare(x.getPrestigeValue(),y.getPrestigeValue()));
  
      }
  
@@ -1129,7 +1130,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-3.html b/deliverables/Coverage/htmReport/ns-3/sources/source-3.html
similarity index 87%
rename from deliverables/Coverage/htmlReport/ns-3/sources/source-3.html
rename to deliverables/Coverage/htmReport/ns-3/sources/source-3.html
index 8d790da..bdba5a8 100644
--- a/deliverables/Coverage/htmlReport/ns-3/sources/source-3.html
+++ b/deliverables/Coverage/htmReport/ns-3/sources/source-3.html
@@ -59,7 +59,7 @@ Current scope:     all classes
     0%
   
   
-    (0/21)
+    (0/18)
   
 
 
@@ -75,7 +75,7 @@ Current scope:     all classes
     0%
   
   
-    (0/44)
+    (0/36)
   
 
 
@@ -91,9 +91,7 @@ Current scope:     all classes
  
  import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
  import it.polimi.ingsw.gc14.Model.Cards.TribeCard;
- import it.polimi.ingsw.gc14.Model.GamePackage.Board;
  import it.polimi.ingsw.gc14.Model.GamePackage.CurrentState;
- import it.polimi.ingsw.gc14.Network.EventType;
  import it.polimi.ingsw.gc14.Network.NetworkEvent;
  
  import java.io.Serializable;
@@ -139,7 +137,7 @@ Current scope:     all classes
      /**
       * Map of players indexed by username.
       */
-     public Map<String, Player> players;
+     public final Map<String, Player> players;
  
      /**
       * List of totems still available for selection.
@@ -151,27 +149,6 @@ Current scope:     all classes
       */
      public List<Player> standingPlayers;
  
-     /**
-      * Constructs an empty mini model.
-      */
-     public MiniModel() {
-     }
- 
-     /**
-      * Constructs a mini model with only the card lists populated.
-      *
-      * @param upperListTribeCards  the upper row of tribe cards on the board.
-      * @param lowerListTribeCards  the lower row of tribe cards on the board.
-      * @param upperListBuildingCards the upper row of building cards on the board.
-      * @param lowerListBuildingCards the lower row of building cards on the board.
-      */
-     public MiniModel(ArrayList<TribeCard> upperListTribeCards,ArrayList<TribeCard>lowerListTribeCards,ArrayList<BuildingCard> upperListBuildingCards,ArrayList<BuildingCard>lowerListBuildingCards) {
-         this.upperListTribeCards = upperListTribeCards;
-         this.lowerListTribeCards = lowerListTribeCards;
-         this.upperListBuildingCards = upperListBuildingCards;
-         this.lowerListBuildingCards = lowerListBuildingCards;
-         this.disconnectedPlayers = new ArrayList<>();
-     }
  
      /**
       * Constructs a complete mini model from the current server-side game data.
@@ -267,15 +244,6 @@ Current scope:     all classes
      }
  
      /**
-      * Adds or updates a single player in the mini model.
-      *
-      * @param player the player to store.
-      */
-     public void setPlayer(Player player) {
-         players.put(player.getUserName(), player);
-     }
- 
-     /**
       * Sets the final standing of the players.
       *
       * @param standingPlayers the final ordered list of players.
@@ -407,7 +375,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-4.html b/deliverables/Coverage/htmReport/ns-3/sources/source-4.html
similarity index 93%
rename from deliverables/Coverage/htmlReport/ns-3/sources/source-4.html
rename to deliverables/Coverage/htmReport/ns-3/sources/source-4.html
index 3f426b7..0c69a9a 100644
--- a/deliverables/Coverage/htmlReport/ns-3/sources/source-4.html
+++ b/deliverables/Coverage/htmReport/ns-3/sources/source-4.html
@@ -72,10 +72,10 @@ Current scope:     all classes
 
 
   
-    87.1%
+    86.7%
   
   
-    (27/31)
+    (26/30)
   
 
 
@@ -89,14 +89,10 @@ Current scope:     all classes
 
  package it.polimi.ingsw.gc14.Model;
  
- import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
  import it.polimi.ingsw.gc14.Model.Orders.OrderPlayer;
- import it.polimi.ingsw.gc14.View.TUI.AsciiTable;
- import it.polimi.ingsw.gc14.View.TUI.BorderStyle;
  
  import java.io.Serializable;
  import java.util.*;
- import java.util.stream.Collectors;
  
  /**
   * Abstract base class for all order logic cards.
@@ -109,13 +105,13 @@ Current scope:     all classes
      /**
       * The queue of {@link Player Players} associated with this order logic card.
       */
-     private Queue<Player> players;
+     private final Queue<Player> players;
  
      /**
       * The list of {@link OrderPlayer} entries tracking turn order and played status.
       * Protected so subclasses can read it for display purposes (e.g., {@link #toString()}).
       */
-     protected List<OrderPlayer> playerList;
+     protected final List<OrderPlayer> playerList;
  
      /**
       * Returns an unmodifiable view of the player order list.
@@ -126,8 +122,6 @@ Current scope:     all classes
          return Collections.unmodifiableList(playerList);
      }
  
-     /** Total number of players in this game. */
-     protected final int nPlayers;
  
  
      /**
@@ -135,7 +129,7 @@ Current scope:     all classes
       *
       * <p>The input list is shuffled in place to establish a random initial turn order.
       * This is intentional: the caller's list (typically {@code Game.playersList}) is
-      * reordered so that the game's canonical player sequence reflects the randomised order.
+      * reordered so that the game's canonical player sequence reflects the randomized order.
       *
       * @param players the list of players associated with this order logic card.
       *                <strong>The list is mutated (shuffled) by this constructor.</strong>
@@ -143,7 +137,6 @@ Current scope:     all classes
      public OrderLogicCard(ArrayList<Player> players) {
          Collections.shuffle(players);
          this.players = new LinkedList<>(players);
-         nPlayers = players.size();
          this.playerList = new ArrayList<>(players.stream().map(x -> new OrderPlayer(x, false)).toList());
      }
  
@@ -155,7 +148,7 @@ Current scope:     all classes
       */
      public void push(Player player) {
          effect(player, players.size());
-         if (players.size() == 0) {
+         if (players.isEmpty()) {
              playerList.clear();
          }
          playerList.add(new OrderPlayer(player, false));
@@ -291,7 +284,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-5.html b/deliverables/Coverage/htmReport/ns-3/sources/source-5.html
similarity index 86%
rename from deliverables/Coverage/htmlReport/ns-3/sources/source-5.html
rename to deliverables/Coverage/htmReport/ns-3/sources/source-5.html
index 402a335..41f1387 100644
--- a/deliverables/Coverage/htmlReport/ns-3/sources/source-5.html
+++ b/deliverables/Coverage/htmReport/ns-3/sources/source-5.html
@@ -59,7 +59,7 @@ Current scope:     all classes
     100%
   
   
-    (6/6)
+    (4/4)
   
 
 
@@ -75,7 +75,7 @@ Current scope:     all classes
     100%
   
   
-    (14/14)
+    (12/12)
   
 
 
@@ -100,7 +100,7 @@ Current scope:     all classes
      /**
       * The image identifier of the playable card.
       */
-     private String idIMG;
+     private final String idIMG;
  
      /**
       * Returns the image identifier of this playable card.
@@ -114,7 +114,7 @@ Current scope:     all classes
      /**
       * The era associated with this playable card.
       */
-     private int era;
+     private final int era;
  
      /**
       * Returns the era of this playable card.
@@ -157,23 +157,18 @@ Current scope:     all classes
      }
  
      /**
-      * Returns a string representation of this playable card.
+      * Returns the compact representation shown in the player hand panel.
       *
-      * @return a string representation of this playable card.
+      * @return the player-hand string representation of this card.
       */
-     @Override
-     public String toString() {
-         return "";
-     }
+     public abstract String toStringPlayer();
  
      /**
-      * Returns a compact string representation used when rendering the board in the TUI.
+      * Returns the representation shown on the board (offer track cards).
       *
-      * @return a compact board representation of this card.
+      * @return the board string representation of this card.
       */
-     public String toStringBoard() {
-         return ":";
-     }
+     public abstract String toStringBoard();
  }
 
 
@@ -198,7 +193,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-6.html b/deliverables/Coverage/htmReport/ns-3/sources/source-6.html similarity index 86% rename from deliverables/Coverage/htmlReport/ns-3/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-3/sources/source-6.html index f89fecd..7cb1446 100644 --- a/deliverables/Coverage/htmlReport/ns-3/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-3/sources/source-6.html @@ -53,18 +53,18 @@ Current scope: all classes - 96.6% + 84.5% - (56/58) + (49/58) - 100% + 98.1% - (105/105) + (102/104) @@ -99,18 +99,18 @@ Current scope: all classes - 96.6% + 84.5% - (56/58) + (49/58) - 100% + 98.1% - (106/106) + (103/105) @@ -143,7 +143,7 @@ Current scope: all classes   /**   * The maximum length allowed for the username string.   */ -  private static final int MAX_USERNAME_LENGTH = 32; +  private static final int MAX_USERNAME_LENGTH = 10;     /**   * Identifier for the {@code Player} when displaying the game through the GUI. @@ -151,10 +151,9 @@ Current scope: all classes   */   private Totems totem;   -  // region Getters   /**   * Unique string identifier for players; must not be {@code null} and must not -  * exceed {@link #MAX_VALUE} otherwise an {@link IllegalArgumentException} will be thrown +  * exceed {@link #MAX_USERNAME_LENGTH} otherwise an {@link IllegalArgumentException} will be thrown   * when the {@link #Player(String) constructor} is called.   */   private final String userName; @@ -203,13 +202,41 @@ Current scope: all classes   case GATHERER -> gatherers.size();   };   } -  private ArrayList<BuildingCard> buildingCards; -  private ArrayList<Artist> artists; -  private ArrayList<Builder> builders; -  private ArrayList<Inventor> inventors; -  private ArrayList<Gatherer> gatherers; -  private ArrayList<Shaman> shamans; -  private ArrayList<Hunter> hunters; +  +  /** +  * The current {@link BuildingCard Building Cards} in the player's deck. +  */ +  private final ArrayList<BuildingCard> buildingCards; +  +  /** +  * The current {@link Artist Artist} cards in the player's deck. +  */ +  private final ArrayList<Artist> artists; +  +  /** +  * The current {@link Builder Builder} cards in the player's deck. +  */ +  private final ArrayList<Builder> builders; +  +  /** +  * The current {@link Inventor Inventor} cards in the player's deck. +  */ +  private final ArrayList<Inventor> inventors; +  +  /** +  * The current {@link Gatherer Gatherer} cards in the player's deck. +  */ +  private final ArrayList<Gatherer> gatherers; +  +  /** +  * The current {@link Shaman Shaman} cards in the player's deck. +  */ +  private final ArrayList<Shaman> shamans; +  +  /** +  * The current {@link Hunter Hunter} cards in the player's deck. +  */ +  private final ArrayList<Hunter> hunters;     /** @return this player's building cards. */   public ArrayList<BuildingCard> getBuildingCards() { return buildingCards; } @@ -253,10 +280,6 @@ Current scope: all classes   return prestigeValue;   }   -  // endregion getters -  -  // region Setters -    /**   * Adds {@code value} amount of Food to the Player.   * @param value The amount of Food to be added. Should be non-negative. @@ -310,9 +333,7 @@ Current scope: all classes   this.prestigeValue -= value;   }   -  // endregion setters   -  // region Constructors     /**   * Constructor for the class {@code Player}. Each Player is uniquely identified by the {@link #userName}. @@ -343,11 +364,14 @@ Current scope: all classes   this.prestigeValue = 0;   this.totem = null;   } -  // endregion constructors   -  // region Functions -  -  // TODO +  /** +  * Checks equality between this {@code Player} and another object. +  * Two players are equal if and only if they share the same {@code userName}. +  * +  * @param obj the object to compare with. +  * @return {@code true} if {@code obj} is a {@code Player} with the same username; {@code false} otherwise. +  */   @Override   public boolean equals(Object obj) {   if (this == obj) return true; @@ -379,11 +403,11 @@ Current scope: all classes   */   @Override   public String toString() { -  int last = -1; +  int last;     var table = new AsciiTable(ROUNDED, 1);   -  String totemStr = (this.totem != null) ? " (" + this.totem.toString() + ")" : ""; +  String totemStr = (this.totem != null) ? " (" + this.totem + ")" : "";   table.addHeader(this.getUserName() + totemStr + " | \uD83C\uDF56:" + this.getFoodValue() + " | \uD83C\uDFC5:" + this.getPrestigeValue());   table.addSeparator();   @@ -415,28 +439,28 @@ Current scope: all classes   table.addRow("CHARACTERS");   if(!this.artists.isEmpty()){   table.addRow(this.artists.size() + " Artists: \uD83C\uDFA8:" + this.artists.size()); -  if(last == 1){ +  if(last == 1){   table.addSeparator();   }   }     if(!this.builders.isEmpty()){   table.addRow(this.builders.size() + " Builders: " + "\uD83D\uDD28:" + this.builders.stream().mapToInt(Builder::getReductionValue).sum() + " \uD83C\uDFC5:" + this.builders.stream().mapToInt(Builder::getPrestigeValue).sum()); -  if(last == 2){ +  if(last == 2){   table.addSeparator();   }   }     if(!this.gatherers.isEmpty()){ -  table.addRow(this.gatherers.size() + " Gatherers: -\uD83E\uDD57:" + 3*this.gatherers.size()); -  if(last == 3){ +  table.addRow(this.gatherers.size() + " Gatherers: \uD83C\uDF56:" + 3*this.gatherers.size()); +  if(last == 3){   table.addSeparator();   }   }     if(!this.shamans.isEmpty()){   table.addRow(this.shamans.size() + " Shamans: " + "\uD83C\uDF1F:" + this.shamans.stream().mapToInt(Shaman::getIcon).sum()); -  if(last == 4){ +  if(last == 4){   table.addSeparator();   }   } @@ -451,7 +475,7 @@ Current scope: all classes   .sorted(Map.Entry.comparingByKey())   .map(e -> e.getKey() + ":" + e.getValue())   .collect(Collectors.joining(", "))); -  if(last == 5){ +  if(last == 5){   table.addSeparator();   }   } @@ -463,16 +487,15 @@ Current scope: all classes   }   table.addSeparator();   table.addRow("BUILDING CARDS" + -  (this.buildingCards.stream().mapToInt(BuildingCard::getPrestigeValue).sum() != 0 -  ? " 🏅:" + this.buildingCards.stream().mapToInt(BuildingCard::getPrestigeValue).sum() +  (this.buildingCards.stream().mapToInt(BuildingCard::getPrestigeValue).sum() != 0 +  ? " \uD83C\uDFC5:" + this.buildingCards.stream().mapToInt(BuildingCard::getPrestigeValue).sum()   : "")); -  if(!this.buildingCards.isEmpty()){ -  table.addRow(this.buildingCards.size() + " Buildings: " + this.buildingCards.stream().map(BuildingCard::toStringPlayer).collect(Collectors.joining(", "))); +  if(!this.buildingCards.isEmpty()){ +  table.addRow(this.buildingCards.size() + " Buildings: " + this.buildingCards.stream().map(BuildingCard::toStringPlayer).collect(Collectors.joining(", ")));   }     return table.build();   } -  // endregion functions  }
@@ -497,7 +520,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-7.html b/deliverables/Coverage/htmReport/ns-3/sources/source-7.html similarity index 89% rename from deliverables/Coverage/htmlReport/ns-3/sources/source-7.html rename to deliverables/Coverage/htmReport/ns-3/sources/source-7.html index 56730f2..51dfc34 100644 --- a/deliverables/Coverage/htmlReport/ns-3/sources/source-7.html +++ b/deliverables/Coverage/htmReport/ns-3/sources/source-7.html @@ -64,10 +64,10 @@ Current scope: all classes - 42.1% + 53.3% - (8/19) + (8/15) @@ -96,12 +96,11 @@ Current scope: all classes   * The slot configuration depends on the specified slot identifier.   */  public class Slot implements Serializable { -  // Getters     /**   * The identifier of this slot.   */ -  private char slotId; +  private final char slotId;     /**   * Returns the identifier of this slot. @@ -115,7 +114,7 @@ Current scope: all classes   /**   * The number of upper cards associated with this slot.   */ -  private int nUpper; +  private final int nUpper;   /**   * Returns the number of upper cards associated with this slot.   * @@ -143,7 +142,7 @@ Current scope: all classes   /**   * The number of lower cards associated with this slot.   */ -  private int nLower; +  private final int nLower;     /**   * Returns the number of lower cards associated with this slot. @@ -157,7 +156,7 @@ Current scope: all classes   /**   * The amount of Food associated with this slot.   */ -  private int food; +  private final int food;     /**   * Returns the amount of Food associated with this slot. @@ -167,9 +166,7 @@ Current scope: all classes   public int getFood(){   return food;   } -  // End getters   -  // Constructors     /**   * Creates a slot with the specified identifier. @@ -258,16 +255,21 @@ Current scope: all classes   public String toStringTUI()   {   StringBuilder s = new StringBuilder(" "); -  for(int i=0;i<this.getNUpper();i++) s.append("▲"); -  for(int i=0;i<this.getNLower();i++) s.append("▼"); -  if(getFood()!=0) s.append("+"+getFood()+" \uD83C\uDF56"); +  s.repeat("▲", Math.max(0, this.getNUpper())); +  s.repeat("▼", Math.max(0, this.getNLower())); +  if(getFood()!=0) s.append("+").append(getFood()).append(" \uD83C\uDF56");   s.append(" ");   return s.toString();   }   -  // Functions   -  // TODO +  /** +  * Checks equality between this {@code Slot} and another object. +  * Two slots are equal if and only if they share the same {@code slotId}. +  * +  * @param obj the object to compare with. +  * @return {@code true} if {@code obj} is a {@code Slot} with the same identifier; {@code false} otherwise. +  */   @Override   public boolean equals(Object obj) {   if (this == obj) return true; @@ -275,13 +277,16 @@ Current scope: all classes   return slotId == ((Slot) obj).slotId;   }   -  // TODO +  /** +  * Returns the hash code for this {@code Slot}, derived from {@link #slotId}. +  * +  * @return the hash code of the slot identifier. +  */   @Override   public int hashCode() {   return Character.hashCode(slotId);   }   -  // End functions  } @@ -306,7 +311,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-3/sources/source-8.html b/deliverables/Coverage/htmReport/ns-3/sources/source-8.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-3/sources/source-8.html rename to deliverables/Coverage/htmReport/ns-3/sources/source-8.html index 988217f..43c6ebf 100644 --- a/deliverables/Coverage/htmlReport/ns-3/sources/source-8.html +++ b/deliverables/Coverage/htmReport/ns-3/sources/source-8.html @@ -130,7 +130,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-4/index.html b/deliverables/Coverage/htmReport/ns-4/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index.html rename to deliverables/Coverage/htmReport/ns-4/index.html index 4a21c00..0fe6c50 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index.html +++ b/deliverables/Coverage/htmReport/ns-4/index.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -115,10 +115,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -131,10 +131,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_BLOCK.html index a9a6126..0539625 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_BLOCK.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -127,7 +127,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_BLOCK_DESC.html index d2cedca..0c530e6 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_BLOCK_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -115,10 +115,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -131,10 +131,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_CLASS.html index 9876ce7..9447098 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_CLASS.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -115,10 +115,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -131,10 +131,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_CLASS_DESC.html index aa1f29f..9c30c47 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_CLASS_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -127,7 +127,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_LINE.html index 6377122..e2cf88f 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_LINE.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -115,10 +115,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -131,10 +131,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_LINE_DESC.html index a5be4fb..12dded0 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_LINE_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -127,7 +127,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_METHOD.html index fc06fa0..92448ba 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_METHOD.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -115,10 +115,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -131,10 +131,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_METHOD_DESC.html index e7453e8..b27e0c6 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_METHOD_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -127,7 +127,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-4/index_SORT_BY_NAME_DESC.html index e674113..36d4223 100644 --- a/deliverables/Coverage/htmlReport/ns-4/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-4/index_SORT_BY_NAME_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 95% - (20/20) + (19/20) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 98.1% - (58/58) + (52/53) @@ -127,7 +127,7 @@ it.polimi.ingsw.gc14.Model.Cards 100% - (11/11) + (10/10) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 92.9% - (14/14) + (13/14) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards - 100% + 97.7% - (47/47) + (42/43) @@ -189,7 +189,7 @@ it.polimi.ingsw.gc14.Model.Cards diff --git a/deliverables/Coverage/htmlReport/ns-4/sources/source-1.html b/deliverables/Coverage/htmReport/ns-4/sources/source-1.html similarity index 91% rename from deliverables/Coverage/htmlReport/ns-4/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-4/sources/source-1.html index c0b7424..4ab74a2 100644 --- a/deliverables/Coverage/htmlReport/ns-4/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-4/sources/source-1.html @@ -56,10 +56,10 @@ Current scope: all classes - 100% + 92.9% - (14/14) + (13/14) @@ -72,10 +72,10 @@ Current scope: all classes - 100% + 97.7% - (47/47) + (42/43) @@ -108,7 +108,7 @@ Current scope: all classes   /**   * The price of this building card.   */ -  private int price; +  private final int price;     /**   * Returns the price of this building card. @@ -137,7 +137,7 @@ Current scope: all classes   /**   * The prestige value of this building card.   */ -  private int prestigeValue; +  private final int prestigeValue;     /**   * Returns the prestige value of this building card. @@ -254,15 +254,17 @@ Current scope: all classes   this.effectType = effectTypeFromId(effectId);   this.effectId = effectId;   } -  +  /** +  * Maps a building effect identifier to its corresponding {@link EffectType}. +  * +  * @param effectId the effect identifier to resolve. +  * @return the {@link EffectType} for the given identifier. +  * @throws IllegalArgumentException if {@code effectId} does not correspond to any known effect type. +  */   private static EffectType effectTypeFromId(int effectId) {   switch (effectId) { -  case 2: return EffectType.ON_EVENT; +  case 2, 9, 7, 6, 5: return EffectType.ON_EVENT;   case 3: return EffectType.ON_END_TURN; -  case 5: return EffectType.ON_EVENT; -  case 6: return EffectType.ON_EVENT; -  case 7: return EffectType.ON_EVENT; -  case 9: return EffectType.ON_EVENT;   case 12: return EffectType.ON_ROUND_END;   default: throw new IllegalArgumentException();   } @@ -314,26 +316,16 @@ Current scope: all classes   *   * @param player the player to whom the effect may be applied.   */ -  @Override   public void applyEffect(Player player) {}   -  /** -  * Returns the string representation of this building card. -  * -  * @return the string representation of this building card. -  */   @Override -  public String toString() { -  return ":" + " ID:" + getEffectId() + " \uD83C\uDF56:" + getPrice() + " \uD83C\uDFC5:" + getPrestigeValue(); +  public String toStringBoard() { +  return "ID:" + getEffectId() + " \uD83C\uDF56:" + getPrice() + " \uD83C\uDFC5:" + getPrestigeValue();   }   -  /** -  * Returns a compact player-view string representation of this building card. -  * -  * @return a compact string showing the effect identifier. -  */ +  @Override   public String toStringPlayer() { -  return "ID:" + getEffectId(); +  return "ID:" + getEffectId();   }  } @@ -359,7 +351,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-4/sources/source-2.html b/deliverables/Coverage/htmReport/ns-4/sources/source-2.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-4/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-4/sources/source-2.html index 7d1d206..9e97c33 100644 --- a/deliverables/Coverage/htmlReport/ns-4/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-4/sources/source-2.html @@ -63,7 +63,7 @@ Current scope: all classes 100% - (11/11) + (10/10) @@ -77,7 +77,6 @@ Current scope: all classes
  package it.polimi.ingsw.gc14.Model.Cards;
  
- import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
  import it.polimi.ingsw.gc14.Model.PlayableCard;
  import java.io.Serializable;
  
@@ -92,7 +91,7 @@ Current scope:     all classes
      /**
       * Indicates whether this tribe card is an event card.
       */
-     private boolean isEventCard;
+     private final boolean isEventCard;
  
      /**
       * Returns whether this tribe card is an event card.
@@ -106,7 +105,7 @@ Current scope:     all classes
      /**
       * The minimum number of players required for this tribe card.
       */
-     private int nMin=0;
+     private final int nMin;
  
      /**
       * Returns the minimum number of players required for this tribe card.
@@ -200,7 +199,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index.html b/deliverables/Coverage/htmReport/ns-5/index.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index.html
rename to deliverables/Coverage/htmReport/ns-5/index.html
index 5f52376..e9728ba 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index.html
+++ b/deliverables/Coverage/htmReport/ns-5/index.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_BLOCK.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_BLOCK.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_BLOCK.html
index 92d3a2f..2cd1aa2 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_BLOCK.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_BLOCK.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_BLOCK_DESC.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_BLOCK_DESC.html
index d875eb6..78af53a 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_BLOCK_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_BLOCK_DESC.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_CLASS.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_CLASS.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_CLASS.html
index 62e93f3..c311e33 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_CLASS.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_CLASS.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_CLASS_DESC.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_CLASS_DESC.html
index 7d8219b..134850e 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_CLASS_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_CLASS_DESC.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_LINE.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_LINE.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_LINE.html
index 5476d43..4087dce 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_LINE.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_LINE.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_LINE_DESC.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_LINE_DESC.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_LINE_DESC.html
index c81778d..b7d1bfb 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_LINE_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_LINE_DESC.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_METHOD.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_METHOD.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_METHOD.html
index e682203..2bd2c66 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_METHOD.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_METHOD.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_METHOD_DESC.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_METHOD_DESC.html
index dee6c6b..0b8c6b6 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_METHOD_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_METHOD_DESC.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_NAME_DESC.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_NAME_DESC.html
rename to deliverables/Coverage/htmReport/ns-5/index_SORT_BY_NAME_DESC.html
index ece7c13..cd64471 100644
--- a/deliverables/Coverage/htmlReport/ns-5/index_SORT_BY_NAME_DESC.html
+++ b/deliverables/Coverage/htmReport/ns-5/index_SORT_BY_NAME_DESC.html
@@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/sources/source-1.html b/deliverables/Coverage/htmReport/ns-5/sources/source-1.html
similarity index 97%
rename from deliverables/Coverage/htmlReport/ns-5/sources/source-1.html
rename to deliverables/Coverage/htmReport/ns-5/sources/source-1.html
index 8342b06..85c5e25 100644
--- a/deliverables/Coverage/htmlReport/ns-5/sources/source-1.html
+++ b/deliverables/Coverage/htmReport/ns-5/sources/source-1.html
@@ -135,7 +135,7 @@ Current scope:     all classes
 
 
 
 
diff --git a/deliverables/Coverage/htmlReport/ns-5/sources/source-2.html b/deliverables/Coverage/htmReport/ns-5/sources/source-2.html
similarity index 83%
rename from deliverables/Coverage/htmlReport/ns-5/sources/source-2.html
rename to deliverables/Coverage/htmReport/ns-5/sources/source-2.html
index 6661877..5b6449f 100644
--- a/deliverables/Coverage/htmlReport/ns-5/sources/source-2.html
+++ b/deliverables/Coverage/htmReport/ns-5/sources/source-2.html
@@ -41,8 +41,6 @@ Current scope:     all classes
 
  package it.polimi.ingsw.gc14.Model.Cards.Building;
  
- import it.polimi.ingsw.gc14.Model.Player;
- 
  /**
   * Defines the effect behavior of a building card.
   *
@@ -51,12 +49,6 @@ Current scope:     all classes
   */
  public interface BuildingEffect {
  
-     /**
-      * Applies the building effect to the specified player.
-      *
-      * @param player the player affected by the building effect.
-      */
-     void applyEffect(Player player);
  }
 
 
@@ -81,7 +73,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/index.html b/deliverables/Coverage/htmReport/ns-6/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index.html rename to deliverables/Coverage/htmReport/ns-6/index.html index 8519850..5381a97 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index.html +++ b/deliverables/Coverage/htmReport/ns-6/index.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -150,19 +150,19 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -213,10 +213,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 87.5% - (8/8) + (7/8) @@ -229,10 +229,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.4% - (18/18) + (17/18) @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_BLOCK.html index 30aec78..ed24290 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_BLOCK.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -248,10 +248,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 87.5% - (8/8) + (7/8) @@ -264,10 +264,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.4% - (18/18) + (17/18) @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_BLOCK_DESC.html index a6b0b80..5db6ea1 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_BLOCK_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -185,10 +185,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 87.5% - (8/8) + (7/8) @@ -201,10 +201,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.4% - (18/18) + (17/18) @@ -325,19 +325,19 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_CLASS.html index 2cf71b7..95356d4 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_CLASS.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -150,19 +150,19 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -213,10 +213,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 87.5% - (8/8) + (7/8) @@ -229,10 +229,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.4% - (18/18) + (17/18) @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_CLASS_DESC.html index 4609d66..4e20a9e 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_CLASS_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -220,10 +220,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 87.5% - (8/8) + (7/8) @@ -236,10 +236,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.4% - (18/18) + (17/18) @@ -290,19 +290,19 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_LINE.html index aedb385..d7277e2 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_LINE.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -103,6 +103,69 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects Line, % + + Building1 + + + 100% + + + (1/1) + + + + + 83.3% + + + (5/6) + + + + + + 91.7% + + + (11/12) + + + + + Building11 + + + 100% + + + (1/1) + + + + + 87.5% + + + (7/8) + + + + + 100% + + + (2/2) + + + + + 94.4% + + + (17/18) + + + Building0 @@ -136,34 +199,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (30/30) - - - - Building1 - - - 100% - - - (1/1) - - - - - 100% - - - (6/6) - - - - - - 100% - - - (12/12) - @@ -199,41 +234,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (14/14) - - - - Building11 - - - 100% - - - (1/1) - - - - - 100% - - - (8/8) - - - - - 100% - - - (2/2) - - - - - 100% - - - (18/18) - @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_LINE_DESC.html index 79aa9ea..e1e1b11 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_LINE_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -206,41 +206,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (10/10) - - - - Building11 - - - 100% - - - (1/1) - - - - - 100% - - - (8/8) - - - - - 100% - - - (2/2) - - - - - 100% - - - (18/18) - @@ -276,34 +241,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (14/14) - - - - Building1 - - - 100% - - - (1/1) - - - - - 100% - - - (6/6) - - - - - - 100% - - - (12/12) - @@ -339,6 +276,69 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (30/30) + + + + Building11 + + + 100% + + + (1/1) + + + + + 87.5% + + + (7/8) + + + + + 100% + + + (2/2) + + + + + 94.4% + + + (17/18) + + + + + Building1 + + + 100% + + + (1/1) + + + + + 83.3% + + + (5/6) + + + + + + 91.7% + + + (11/12) + @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_METHOD.html index 1f22342..e3ed1fd 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_METHOD.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -103,6 +103,69 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects Line, % + + Building1 + + + 100% + + + (1/1) + + + + + 83.3% + + + (5/6) + + + + + + 91.7% + + + (11/12) + + + + + Building11 + + + 100% + + + (1/1) + + + + + 87.5% + + + (7/8) + + + + + 100% + + + (2/2) + + + + + 94.4% + + + (17/18) + + + Building0 @@ -136,34 +199,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (30/30) - - - - Building1 - - - 100% - - - (1/1) - - - - - 100% - - - (6/6) - - - - - - 100% - - - (12/12) - @@ -199,41 +234,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (14/14) - - - - Building11 - - - 100% - - - (1/1) - - - - - 100% - - - (8/8) - - - - - 100% - - - (2/2) - - - - - 100% - - - (18/18) - @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_METHOD_DESC.html index 468ad96..08abfa6 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_METHOD_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -206,41 +206,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (10/10) - - - - Building11 - - - 100% - - - (1/1) - - - - - 100% - - - (8/8) - - - - - 100% - - - (2/2) - - - - - 100% - - - (18/18) - @@ -276,34 +241,6 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (14/14) - - - - Building1 - - - 100% - - - (1/1) - - - - - 100% - - - (6/6) - - - - - - 100% - - - (12/12) - @@ -339,6 +276,69 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects (30/30) + + + + Building11 + + + 100% + + + (1/1) + + + + + 87.5% + + + (7/8) + + + + + 100% + + + (2/2) + + + + + 94.4% + + + (17/18) + + + + + Building1 + + + 100% + + + (1/1) + + + + + 83.3% + + + (5/6) + + + + + + 91.7% + + + (11/12) + @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-6/index_SORT_BY_NAME_DESC.html index a0f80ff..a3f8c0f 100644 --- a/deliverables/Coverage/htmlReport/ns-6/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-6/index_SORT_BY_NAME_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.7% - (38/38) + (36/38) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 98.4% - (129/129) + (127/129) @@ -220,10 +220,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 87.5% - (8/8) + (7/8) @@ -236,10 +236,10 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 94.4% - (18/18) + (17/18) @@ -290,19 +290,19 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -364,7 +364,7 @@ it.polimi.ingsw.gc14.Model.Cards.Building.Effects diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-1.html b/deliverables/Coverage/htmReport/ns-6/sources/source-1.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-1.html index dc79fd5..dd696ba 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-1.html @@ -216,7 +216,6 @@ Current scope: all classes   * @param player the player who owns the building.   * @throws IllegalArgumentException if the specified player does not own this card.   */ -  @Override   public void applyEffect(Player player) throws IllegalArgumentException {   if(!player.getBuildingCards().contains(this))   throw new IllegalArgumentException(); @@ -258,7 +257,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-2.html b/deliverables/Coverage/htmReport/ns-6/sources/source-2.html similarity index 88% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-2.html index 3198d2f..ba8ab4f 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-2.html @@ -52,18 +52,18 @@ Current scope: all classes - 100% + 83.3% - (6/6) + (5/6) - 100% + 91.7% - (12/12) + (11/12) @@ -90,7 +90,7 @@ Current scope: all classes   /**   * Character type involved in the building effect.   */ -  private CharacterType icon ; +  private final CharacterType icon ;     /**   * Returns the character type associated with this building effect. @@ -143,21 +143,14 @@ Current scope: all classes   return new Building1(getIdIMG(),getEra(),getPrice(),getPrestigeValue(),getIcon());   }   -  /** -  * Returns a string representation of this building, including the character -  * type associated with its effect. -  * -  * @return a string representation of this building. -  */   @Override -  public String toString() { -  return super.toString() + " (Icon:" + this.icon.toString().substring(0, 3) + ")"; +  public String toStringBoard() { +  return super.toStringBoard() + " (Icon:" + this.icon.toString().substring(0, 3) + ")";   }   -  // TODO   @Override   public String toStringPlayer() { -  return super.toStringPlayer() + " (Icon:" + this.icon.toString().substring(0, 3) + ")"; +  return super.toStringPlayer() + " (Icon:" + this.icon.toString().substring(0, 3) + ")";   }  }
@@ -183,7 +176,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-3.html b/deliverables/Coverage/htmReport/ns-6/sources/source-3.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-3.html index 5301985..d093a3f 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-3.html @@ -153,7 +153,6 @@ Current scope: all classes   * @param player the player to whom the effect is applied.   * @throws IllegalArgumentException if the player does not own this building card.   */ -  @Override   public void applyEffect(Player player) throws IllegalArgumentException {   if(!player.getBuildingCards().contains(this))   throw new IllegalArgumentException(); @@ -191,7 +190,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-4.html b/deliverables/Coverage/htmReport/ns-6/sources/source-4.html similarity index 90% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-4.html index 004ed29..26c4b2e 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-4.html @@ -56,10 +56,10 @@ Current scope: all classes - 100% + 87.5% - (8/8) + (7/8) @@ -72,10 +72,10 @@ Current scope: all classes - 100% + 94.4% - (18/18) + (17/18) @@ -106,7 +106,7 @@ Current scope: all classes   /**   * The character type involved in this building effect.   */ -  private CharacterType characterType; +  private final CharacterType characterType;     /**   * Returns the CharacterType associated with this building card effect. @@ -118,7 +118,7 @@ Current scope: all classes   /**   * The prestige multiplier applied per matching character card at end of game.   */ -  private int prestigeMul; +  private final int prestigeMul;     /**   * Returns the prestige multiplier associated with this building card effect. @@ -182,28 +182,20 @@ Current scope: all classes   * @param player the player to whom the effect is applied.   * @throws IllegalArgumentException if the player does not own this building card.   */ -  @Override   public void applyEffect(Player player) throws IllegalArgumentException {   if(!player.getBuildingCards().contains(this))   throw new IllegalArgumentException();   player.addPrestige(player.getNType(getIcon()) * this.getPrestigeMul());   }   -  /** -  * Returns a string representation of this {@code Building11}, including the -  * character type associated with its effect and its prestige multiplier. -  * -  * @return a string representation of this {@code Building11}. -  */   @Override -  public String toString() { -  return super.toString() + "+" + this.characterType.toString().substring(0, 3) + "×" + this.prestigeMul; +  public String toStringBoard() { +  return super.toStringBoard() + "+" + this.characterType.toString().substring(0, 3) + "×" + this.prestigeMul;   }   -  // TODO   @Override   public String toStringPlayer() { -  return super.toStringPlayer() + " (\uD83C\uDFC5:" + this.characterType.toString().substring(0, 3) + "×" + this.prestigeMul + ")"; +  return super.toStringPlayer() + " (\uD83C\uDFC5:" + this.characterType.toString().substring(0, 3) + "×" + this.prestigeMul + ")";   }  } @@ -229,7 +221,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-5.html b/deliverables/Coverage/htmReport/ns-6/sources/source-5.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-5.html index b8df533..43ef4df 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-5.html @@ -146,7 +146,6 @@ Current scope: all classes   * @param player the player to whom the effect is applied.   * @throws IllegalArgumentException if the player does not own this building card.   */ -  @Override   public void applyEffect(Player player) throws IllegalArgumentException {   if(!player.getBuildingCards().contains(this))   throw new IllegalArgumentException(); @@ -177,7 +176,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-6.html b/deliverables/Coverage/htmReport/ns-6/sources/source-6.html similarity index 99% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-6.html index 139b32a..c2a56b6 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-6.html @@ -219,7 +219,6 @@ Current scope: all classes   * @param player The player who owns the building.   * @throws IllegalArgumentException Thrown if the specified player does not own this card.   */ -  @Override   public void applyEffect(Player player) throws IllegalArgumentException {   if(!player.getBuildingCards().contains(this))   throw new IllegalArgumentException(); @@ -268,7 +267,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-6/sources/source-7.html b/deliverables/Coverage/htmReport/ns-6/sources/source-7.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-6/sources/source-7.html rename to deliverables/Coverage/htmReport/ns-6/sources/source-7.html index d2d775c..027be39 100644 --- a/deliverables/Coverage/htmlReport/ns-6/sources/source-7.html +++ b/deliverables/Coverage/htmReport/ns-6/sources/source-7.html @@ -144,7 +144,6 @@ Current scope: all classes   * @param player The player who owns the building.   * @throws IllegalArgumentException Thrown if the specified player does not own this building.   */ -  @Override   public void applyEffect(Player player) throws IllegalArgumentException {   if(!player.getBuildingCards().contains(this))   throw new IllegalArgumentException(); @@ -177,7 +176,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-7/index.html b/deliverables/Coverage/htmReport/ns-7/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index.html rename to deliverables/Coverage/htmReport/ns-7/index.html index e3bb539..450f9f2 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index.html +++ b/deliverables/Coverage/htmReport/ns-7/index.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -102,7 +102,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -110,7 +110,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -156,7 +156,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -164,7 +164,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_BLOCK.html index 5169b9b..691f27a 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_BLOCK.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -102,7 +102,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -110,7 +110,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -156,7 +156,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -164,7 +164,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_BLOCK_DESC.html index 4a168d0..f2fca0e 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_BLOCK_DESC.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -129,7 +129,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -183,7 +183,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -191,7 +191,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_CLASS.html index aab603b..6b7f266 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_CLASS.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -102,7 +102,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -110,7 +110,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -156,7 +156,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -164,7 +164,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_CLASS_DESC.html index 75d3d34..c057f87 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_CLASS_DESC.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -129,7 +129,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -183,7 +183,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -191,7 +191,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_LINE.html index c4b4344..90844ca 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_LINE.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -102,7 +102,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -110,7 +110,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -156,7 +156,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -164,7 +164,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_LINE_DESC.html index de9ad3d..f11a767 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_LINE_DESC.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -129,7 +129,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -183,7 +183,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -191,7 +191,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_METHOD.html index 6393541..ed00dd7 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_METHOD.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -102,7 +102,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -110,7 +110,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -156,7 +156,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -164,7 +164,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_METHOD_DESC.html index 31a4e82..b1baae0 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_METHOD_DESC.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -129,7 +129,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -183,7 +183,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -191,7 +191,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-7/index_SORT_BY_NAME_DESC.html index b798557..2925ea5 100644 --- a/deliverables/Coverage/htmlReport/ns-7/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-7/index_SORT_BY_NAME_DESC.html @@ -52,7 +52,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (15/15) + (12/12) @@ -60,7 +60,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (29/29) + (26/26) @@ -129,7 +129,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (5/5) + (3/3) @@ -137,7 +137,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (7/7) + (5/5) @@ -183,7 +183,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (6/6) + (5/5) @@ -191,7 +191,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards 100% - (10/10) + (9/9) @@ -218,7 +218,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards diff --git a/deliverables/Coverage/htmlReport/ns-7/sources/source-1.html b/deliverables/Coverage/htmReport/ns-7/sources/source-1.html similarity index 85% rename from deliverables/Coverage/htmlReport/ns-7/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-7/sources/source-1.html index 1f5cb98..783b8c1 100644 --- a/deliverables/Coverage/htmlReport/ns-7/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-7/sources/source-1.html @@ -55,7 +55,7 @@ Current scope: all classes 100% - (6/6) + (5/5) @@ -63,7 +63,7 @@ Current scope: all classes 100% - (10/10) + (9/9) @@ -91,7 +91,7 @@ Current scope: all classes   /**   * The specific type of this character card.   */ -  private CharacterType type; +  private final CharacterType type;     /**   * Returns the type of this character card. @@ -154,22 +154,6 @@ Current scope: all classes   }     /** -  * Returns a string representation of this {@code Character}. This specific variation is used in the {@code Game}'s -  * toString to provide a more detailed version. -  * <p>Includes: -  * <li>{@link it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType Type} -  * </p> -  * @return {@code String} - a string representation of this {@code Character}. -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */ -  @Override -  public String toStringBoard() -  { -  return super.toStringBoard()+" "+getType().toString()+" "; -  } -  -  /**   * Creates and returns a copy of this character card.   *   * @return a clone of this character card. @@ -207,7 +191,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-7/sources/source-2.html b/deliverables/Coverage/htmReport/ns-7/sources/source-2.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-7/sources/source-2.html index ab54bf4..c467ec8 100644 --- a/deliverables/Coverage/htmlReport/ns-7/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-7/sources/source-2.html @@ -135,7 +135,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-7/sources/source-3.html b/deliverables/Coverage/htmReport/ns-7/sources/source-3.html similarity index 75% rename from deliverables/Coverage/htmlReport/ns-7/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-7/sources/source-3.html index c75151e..2a6d738 100644 --- a/deliverables/Coverage/htmlReport/ns-7/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-7/sources/source-3.html @@ -55,7 +55,7 @@ Current scope: all classes 100% - (5/5) + (3/3) @@ -63,7 +63,7 @@ Current scope: all classes 100% - (7/7) + (5/5) @@ -92,7 +92,7 @@ Current scope: all classes   /**   * The specific type of this event card.   */ -  private EventType type; +  private final EventType type;     /**   * Returns the type of this event card. @@ -133,33 +133,6 @@ Current scope: all classes   public abstract TribeCard clone();     /** -  * Returns the string representation of this event card. -  * The returned string includes the string representation of the superclass -  * and the string representation of the event type. -  * -  * @return the string representation of this event card. -  */ -  @Override -  public String toString() { -  return super.toString() + " " + type.toString(); -  } -  -  /** -  * Prints a string representation of this {@code EventCard}. This specific variation is used in the {@code Game}'s -  * toString to print a more detailed version. -  * <p>Includes: -  * <li>{@link #type Type} -  * </p> -  * @return {@code String} - a string representation of this {@code EventCard}. -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */ -  @Override -  public String toStringBoard() { -  return super.toStringBoard() + " " + type.toString(); -  } -  -  /**   * Activates the effect of this event card on the specified list of players.   *   * @param playerList the list of players affected by the event. @@ -190,7 +163,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-7/sources/source-4.html b/deliverables/Coverage/htmReport/ns-7/sources/source-4.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-7/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-7/sources/source-4.html index 7a3c463..d149ab2 100644 --- a/deliverables/Coverage/htmlReport/ns-7/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-7/sources/source-4.html @@ -125,7 +125,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-8/index.html b/deliverables/Coverage/htmReport/ns-8/index.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index.html rename to deliverables/Coverage/htmReport/ns-8/index.html index a5185e2..0be3f7a 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index.html +++ b/deliverables/Coverage/htmReport/ns-8/index.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.1% - (35/35) + (34/35) @@ -178,19 +178,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_BLOCK.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_BLOCK.html index f2a7d34..e896c1b 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_BLOCK.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -143,19 +143,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -199,10 +199,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -215,10 +215,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.1% - (35/35) + (34/35) @@ -253,7 +253,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_BLOCK_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_BLOCK_DESC.html index af20e92..2042ddf 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_BLOCK_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -185,10 +185,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -201,10 +201,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.1% - (35/35) + (34/35) @@ -248,19 +248,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -276,19 +276,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_CLASS.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_CLASS.html index 136cc9a..ca8cf4a 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_CLASS.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -115,19 +115,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -143,10 +143,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -159,10 +159,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.1% - (35/35) + (34/35) @@ -178,19 +178,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_CLASS_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_CLASS_DESC.html index 23d35e6..ae4e647 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_CLASS_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -213,19 +213,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -241,10 +241,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -257,10 +257,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.1% - (35/35) + (34/35) @@ -276,19 +276,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_LINE.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_LINE.html index 0dbc117..374c9d8 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_LINE.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -115,54 +115,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) - - - - - Builder - - - 100% - - - (1/1) - - - - - 100% - - - (10/10) - - - - - 100% - - - (16/16) - - - - - 100% - - - (35/35) + (8/9) @@ -178,19 +143,54 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) + + + 88.9% + + + (8/9) + + + + + Builder 100% - (7/7) + (1/1) + + + + + 90% + + + (9/10) + + + + + 100% + + + (16/16) + + + + + 97.1% + + + (34/35) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_LINE_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_LINE_DESC.html index e726993..5e08127 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_LINE_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -197,35 +197,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) - - - - - Gatherer - - - 100% - - - (1/1) - - - - - 100% - - - (6/6) - - - - - - 100% - - - (7/7) + (16/16) @@ -241,10 +213,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -255,12 +227,40 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters (16/16) + + + 97.1% + + + (34/35) + + + + + Gatherer 100% - (35/35) + (1/1) + + + + + 87.5% + + + (7/8) + + + + + + 88.9% + + + (8/9) @@ -276,19 +276,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_METHOD.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_METHOD.html index 2ecbc5e..5599620 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_METHOD.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -115,54 +115,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) - - - - - Builder - - - 100% - - - (1/1) - - - - - 100% - - - (10/10) - - - - - 100% - - - (16/16) - - - - - 100% - - - (35/35) + (8/9) @@ -178,19 +143,54 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) + + + 88.9% + + + (8/9) + + + + + Builder 100% - (7/7) + (1/1) + + + + + 90% + + + (9/10) + + + + + 100% + + + (16/16) + + + + + 97.1% + + + (34/35) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_METHOD_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_METHOD_DESC.html index 66ebcdc..56f5e48 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_METHOD_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -197,35 +197,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) - - - - - Gatherer - - - 100% - - - (1/1) - - - - - 100% - - - (6/6) - - - - - - 100% - - - (7/7) + (16/16) @@ -241,10 +213,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -255,12 +227,40 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters (16/16) + + + 97.1% + + + (34/35) + + + + + Gatherer 100% - (35/35) + (1/1) + + + + + 87.5% + + + (7/8) + + + + + + 88.9% + + + (8/9) @@ -276,19 +276,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_NAME_DESC.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-8/index_SORT_BY_NAME_DESC.html index 51b908a..67726a3 100644 --- a/deliverables/Coverage/htmlReport/ns-8/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-8/index_SORT_BY_NAME_DESC.html @@ -53,10 +53,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 94.3% - (49/49) + (50/53) @@ -69,10 +69,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.2% - (108/108) + (103/106) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters 100% - (22/22) + (16/16) @@ -213,19 +213,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -241,10 +241,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 90% - (10/10) + (9/10) @@ -257,10 +257,10 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 97.1% - (35/35) + (34/35) @@ -276,19 +276,19 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -315,7 +315,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters diff --git a/deliverables/Coverage/htmlReport/ns-8/sources/source-1.html b/deliverables/Coverage/htmReport/ns-8/sources/source-1.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-8/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-8/sources/source-1.html index 00dc0cc..1a01de5 100644 --- a/deliverables/Coverage/htmlReport/ns-8/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-8/sources/source-1.html @@ -52,18 +52,18 @@ Current scope: all classes - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -152,6 +152,16 @@ Current scope: all classes   player.getBuildingCards().stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));   }   +  @Override +  public String toStringPlayer() { +  return "\uD83C\uDFA8"; +  } +  +  @Override +  public String toStringBoard() { +  return "ARTIST"; +  } +   }
@@ -176,7 +186,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-8/sources/source-2.html b/deliverables/Coverage/htmReport/ns-8/sources/source-2.html similarity index 87% rename from deliverables/Coverage/htmlReport/ns-8/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-8/sources/source-2.html index 150af73..c428395 100644 --- a/deliverables/Coverage/htmlReport/ns-8/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-8/sources/source-2.html @@ -56,10 +56,10 @@ Current scope: all classes - 100% + 90% - (10/10) + (9/10) @@ -72,10 +72,10 @@ Current scope: all classes - 100% + 97.1% - (35/35) + (34/35) @@ -104,12 +104,12 @@ Current scope: all classes   /**   * The reduction value provided by this Builder card.   */ -  private int reductionValue; +  private final int reductionValue;     /**   * The prestige value provided by this Builder card.   */ -  private int prestigeValue; +  private final int prestigeValue;     /**   * Returns the reduction value of this Builder card. @@ -221,29 +221,14 @@ Current scope: all classes   this.prestigeValue = prestigeValue;   }   -  /** -  * Returns the string representation of this Builder card. -  * -  * @return the string representation of this Builder card. -  */   @Override -  public String toString() { -  return super.toStringBoard() + "\uD83D\uDD28:" + String.valueOf(reductionValue) + " \uD83C\uDFC5:" + String.valueOf(prestigeValue); +  public String toStringPlayer() { +  return "\uD83D\uDD28:" + reductionValue + " \uD83C\uDFC5:" + prestigeValue;   }   -  /** -  * Returns a detailed string representation of this {@code Builder} card, -  * including its reduction value and prestige value. -  * -  * @return a detailed string representation of this {@code Builder} card. -  * @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */   @Override -  public String toStringBoard() -  { -  return super.toStringBoard()+"\uD83D\uDD28:" + String.valueOf(reductionValue) + " \uD83C\uDFC5:" + String.valueOf(prestigeValue); +  public String toStringBoard() { +  return "BUILDER \uD83D\uDD28:" + reductionValue + " \uD83C\uDFC5:" + prestigeValue;   }     @@ -292,7 +277,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-8/sources/source-3.html b/deliverables/Coverage/htmReport/ns-8/sources/source-3.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-8/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-8/sources/source-3.html index 898de06..f82c29d 100644 --- a/deliverables/Coverage/htmlReport/ns-8/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-8/sources/source-3.html @@ -52,18 +52,18 @@ Current scope: all classes - 100% + 87.5% - (6/6) + (7/8) - 100% + 88.9% - (7/7) + (8/9) @@ -151,6 +151,16 @@ Current scope: all classes   player.getGatherers().add(this);   player.getBuildingCards().stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));   } +  +  @Override +  public String toStringPlayer() { +  return "\uD83C\uDF56"; +  } +  +  @Override +  public String toStringBoard() { +  return "GATHERER"; +  }  } @@ -175,7 +185,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-8/sources/source-4.html b/deliverables/Coverage/htmReport/ns-8/sources/source-4.html similarity index 81% rename from deliverables/Coverage/htmlReport/ns-8/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-8/sources/source-4.html index 044caf5..86fdac8 100644 --- a/deliverables/Coverage/htmlReport/ns-8/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-8/sources/source-4.html @@ -75,7 +75,7 @@ Current scope: all classes 100% - (22/22) + (16/16) @@ -106,7 +106,7 @@ Current scope: all classes   * {@code Hunter} with an {@code Hunter Icon} is added to the tribe, 1 {@code Food token} is awarded for each Hunter in the tribe   * (with or without an icon).   */ -  private boolean icon; +  private final boolean icon;     /**   * Returns whether this Hunter card has the icon. @@ -167,41 +167,14 @@ Current scope: all classes   this.icon = icon;   }   -  /** -  * Returns the string representation of this Hunter card. -  * -  * @return the string representation of this Hunter card. -  */   @Override -  public String toString() { -  String toPrint = super.toString(); -  if(this.icon){ -  toPrint += "\uD83C\uDF56"; -  } -  return toPrint; +  public String toStringPlayer() { +  return this.icon ? "\uD83C\uDF56" : "";   }   -  /** -  * Returns a detailed string representation of this {@code TribeCard}. -  * This specific variation is used in the {@code Game}'s -  * toString to provide a more detailed version. -  * -  * <p>Potentially includes: -  * <li>{@link #icon Icon} -  * </p> -  * -  * @return {@code String} - a string representation of this {@code TribeCard}. -  * @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */   @Override   public String toStringBoard() { -  String toPrint = super.toStringBoard(); -  if(this.icon){ -  toPrint += "\uD83C\uDF56"; -  } -  return toPrint; +  return "HUNTER" + (this.icon ? " \uD83C\uDF56" : "");   }     /** @@ -256,7 +229,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-8/sources/source-5.html b/deliverables/Coverage/htmReport/ns-8/sources/source-5.html similarity index 86% rename from deliverables/Coverage/htmlReport/ns-8/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-8/sources/source-5.html index 4abb9db..a033668 100644 --- a/deliverables/Coverage/htmlReport/ns-8/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-8/sources/source-5.html @@ -102,7 +102,7 @@ Current scope: all classes   /**   * The {@code Icons}'s ID. There are a total of 10 different Icons.   */ -  private int icon; +  private final int icon;     /**   * Returns the icon value of this Inventor card. @@ -175,33 +175,14 @@ Current scope: all classes   this.icon = icon;   }   -  /** -  * Returns the string representation of this Inventor card. -  * -  * @return the string representation of this Inventor card. -  */   @Override -  public String toString() { -  return super.toString() + "ID:" + String.valueOf(icon); +  public String toStringPlayer() { +  return "ID:" + icon;   }   -  /** -  * Returns a detailed string representation of this {@code TribeCard}. -  * This specific variation is used in the {@code Game}'s toString -  * to provide a more detailed version. -  * -  * <p>Includes: -  * <li>{@link #icon Icons's ID} -  * </p> -  * -  * @return {@code String} - a string representation of this {@code TribeCard}. -  * @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */   @Override   public String toStringBoard() { -  return super.toStringBoard() + "ID:" + String.valueOf(icon); +  return "INVENTOR ID:" + icon;   }     /** @@ -252,7 +233,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-8/sources/source-6.html b/deliverables/Coverage/htmReport/ns-8/sources/source-6.html similarity index 85% rename from deliverables/Coverage/htmlReport/ns-8/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-8/sources/source-6.html index 76a816d..9f531b5 100644 --- a/deliverables/Coverage/htmlReport/ns-8/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-8/sources/source-6.html @@ -95,7 +95,7 @@ Current scope: all classes   * having the minority, on the other hand, results in   * losing Prestige Points.   */ -  private int icon; +  private final int icon;     /**   * Returns the icon value of this Shaman card. @@ -156,30 +156,14 @@ Current scope: all classes   this.icon = icon;   }   -  /** -  * Returns the string representation of this Shaman card. -  * -  * @return the string representation of this Shaman card. -  */   @Override -  public String toString() { -  return super.toString() + "🌟:" + icon; +  public String toStringPlayer() { +  return "\uD83C\uDF1F:" + icon;   }   -  /** -  * Returns a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s -  * toString to provide a more detailed version. -  * <p>Includes: -  * <li>{@link #icon Number of stars} -  * </p> -  * @return {@code String} - a string representation of this {@code TribeCard}. -  * @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */   @Override   public String toStringBoard() { -  return super.toStringBoard() + "🌟:" + icon; +  return "SHAMAN \uD83C\uDF1F:" + icon;   }     /** @@ -228,7 +212,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-9/index.html b/deliverables/Coverage/htmReport/ns-9/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index.html rename to deliverables/Coverage/htmReport/ns-9/index.html index 91e998b..99d0373 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index.html +++ b/deliverables/Coverage/htmReport/ns-9/index.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -148,41 +148,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) - - - 100% - - - (6/6) - - - - - 100% - - - (6/6) - - - - - 100% - - - (18/18) - - - - - ShamanicRitual - - - 100% - - - (1/1) - - 100% @@ -191,6 +156,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) + + + 100% + + + (6/6) + + + + + 100% + + + (19/19) + + + + + ShamanicRitual + + + 100% + + + (1/1) + + + + + 100% + + + (8/8) + + 100% @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (30/30) + (29/29) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_BLOCK.html index d833c20..ff82edb 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_BLOCK.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -148,41 +148,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) - - - 100% - - - (6/6) - - - - - 100% - - - (6/6) - - - - - 100% - - - (18/18) - - - - - ShamanicRitual - - - 100% - - - (1/1) - - 100% @@ -191,6 +156,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) + + + 100% + + + (6/6) + + + + + 100% + + + (19/19) + + + + + ShamanicRitual + + + 100% + + + (1/1) + + + + + 100% + + + (8/8) + + 100% @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (30/30) + (29/29) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_BLOCK_DESC.html index 4de6dd4..1c42b50 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_BLOCK_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -148,6 +148,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) + + + 100% + + + (8/8) + + + + + 100% + + + (24/24) + + + + + 100% + + + (29/29) + + + + + Hunt + + + 100% + + + (1/1) + + 100% @@ -156,33 +191,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) - - - 100% - - - (24/24) - - - - - 100% - - - (30/30) - - - - - Hunt - - - 100% - - - (1/1) - - 100% @@ -196,15 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) - - - - - 100% - - - (18/18) + (19/19) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_CLASS.html index 3677cc4..e38d308 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_CLASS.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -148,41 +148,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) - - - 100% - - - (6/6) - - - - - 100% - - - (6/6) - - - - - 100% - - - (18/18) - - - - - ShamanicRitual - - - 100% - - - (1/1) - - 100% @@ -191,6 +156,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) + + + 100% + + + (6/6) + + + + + 100% + + + (19/19) + + + + + ShamanicRitual + + + 100% + + + (1/1) + + + + + 100% + + + (8/8) + + 100% @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (30/30) + (29/29) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_CLASS_DESC.html index 255e3c8..b242560 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_CLASS_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -148,6 +148,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) + + + 100% + + + (8/8) + + + + + 100% + + + (24/24) + + + + + 100% + + + (29/29) + + + + + Hunt + + + 100% + + + (1/1) + + 100% @@ -156,33 +191,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) - - - 100% - - - (24/24) - - - - - 100% - - - (30/30) - - - - - Hunt - - - 100% - - - (1/1) - - 100% @@ -196,15 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) - - - - - 100% - - - (18/18) + (19/19) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_LINE.html index 654a30e..bacb1f0 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_LINE.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -148,41 +148,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) - - - 100% - - - (6/6) - - - - - 100% - - - (6/6) - - - - - 100% - - - (18/18) - - - - - ShamanicRitual - - - 100% - - - (1/1) - - 100% @@ -191,6 +156,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) + + + 100% + + + (6/6) + + + + + 100% + + + (19/19) + + + + + ShamanicRitual + + + 100% + + + (1/1) + + + + + 100% + + + (8/8) + + 100% @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (30/30) + (29/29) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_LINE_DESC.html index 29f4faa..6e721cd 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_LINE_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -148,6 +148,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) + + + 100% + + + (8/8) + + + + + 100% + + + (24/24) + + + + + 100% + + + (29/29) + + + + + Hunt + + + 100% + + + (1/1) + + 100% @@ -156,33 +191,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) - - - 100% - - - (24/24) - - - - - 100% - - - (30/30) - - - - - Hunt - - - 100% - - - (1/1) - - 100% @@ -196,15 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) - - - - - 100% - - - (18/18) + (19/19) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_METHOD.html index 016eb82..d1568a6 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_METHOD.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -148,41 +148,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) - - - 100% - - - (6/6) - - - - - 100% - - - (6/6) - - - - - 100% - - - (18/18) - - - - - ShamanicRitual - - - 100% - - - (1/1) - - 100% @@ -191,6 +156,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) + + + 100% + + + (6/6) + + + + + 100% + + + (19/19) + + + + + ShamanicRitual + + + 100% + + + (1/1) + + + + + 100% + + + (8/8) + + 100% @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (30/30) + (29/29) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_METHOD_DESC.html index 9f9b6a7..fed1ec2 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_METHOD_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -148,6 +148,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) + + + 100% + + + (8/8) + + + + + 100% + + + (24/24) + + + + + 100% + + + (29/29) + + + + + Hunt + + + 100% + + + (1/1) + + 100% @@ -156,33 +191,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) - - - 100% - - - (24/24) - - - - - 100% - - - (30/30) - - - - - Hunt - - - 100% - - - (1/1) - - 100% @@ -196,15 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) - - - - - 100% - - - (18/18) + (19/19) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-9/index_SORT_BY_NAME_DESC.html index f6a32b9..e1322e7 100644 --- a/deliverables/Coverage/htmlReport/ns-9/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-9/index_SORT_BY_NAME_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (24/24) + (28/28) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (91/91) + (93/93) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) + (7/7) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (22/22) + (23/23) @@ -148,6 +148,41 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (1/1) + + + 100% + + + (8/8) + + + + + 100% + + + (24/24) + + + + + 100% + + + (29/29) + + + + + Hunt + + + 100% + + + (1/1) + + 100% @@ -156,33 +191,6 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events (7/7) - - - 100% - - - (24/24) - - - - - 100% - - - (30/30) - - - - - Hunt - - - 100% - - - (1/1) - - 100% @@ -196,15 +204,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (6/6) - - - - - 100% - - - (18/18) + (19/19) @@ -223,7 +223,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (5/5) + (6/6) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events 100% - (21/21) + (22/22) @@ -266,7 +266,7 @@ it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events diff --git a/deliverables/Coverage/htmlReport/ns-9/sources/source-1.html b/deliverables/Coverage/htmReport/ns-9/sources/source-1.html similarity index 93% rename from deliverables/Coverage/htmlReport/ns-9/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-9/sources/source-1.html index d60c76f..6e3beb4 100644 --- a/deliverables/Coverage/htmlReport/ns-9/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-9/sources/source-1.html @@ -59,7 +59,7 @@ Current scope: all classes 100% - (5/5) + (6/6) @@ -75,7 +75,7 @@ Current scope: all classes 100% - (21/21) + (22/22) @@ -90,10 +90,7 @@ Current scope: all classes  package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events;    import it.polimi.ingsw.gc14.Model.Cards.BuildingCard; - import it.polimi.ingsw.gc14.Model.Cards.TribeCard; - import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;  import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType; - import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Artist;  import it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventType;  import it.polimi.ingsw.gc14.Model.Cards.TribeCards.EventCard;  import it.polimi.ingsw.gc14.Model.Player; @@ -110,17 +107,17 @@ Current scope: all classes   * The minimum number of Artist cards required to avoid the prestige penalty.   * Also, the bottom number on the card.   */ -  private int nLower; +  private final int nLower;     /**   * The amount of Prestige removed if the player has fewer Artist cards than {@code nLower}.   */ -  private int nPrestigeRem; // NPrestigeLower +  private final int nPrestigeRem;     /**   * The Prestige multiplier applied if the player has at least {@code nLower} Artist cards.   */ -  private int nPrestigeMul; // NPrestigeUpper +  private final int nPrestigeMul;     /**   * Creates a CavePaintings event card with the specified era and effect parameters. @@ -214,8 +211,13 @@ Current scope: all classes   * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board   */   @Override +  public String toStringPlayer() { +  return "CAVE_PAINTINGS"; +  } +  +  @Override   public String toStringBoard() { -  return super.toStringBoard()+" 0-"+(nLower-1)+":"+nPrestigeRem+" "+nLower+"+:"+nPrestigeMul; +  return "\033[38;5;180mCAVE_PAINTINGS 0-" + (nLower-1) + ":" + nPrestigeRem + " " + nLower + "+:" + nPrestigeMul + "\033[0m";   }  } @@ -241,7 +243,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-9/sources/source-2.html b/deliverables/Coverage/htmReport/ns-9/sources/source-2.html similarity index 87% rename from deliverables/Coverage/htmlReport/ns-9/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-9/sources/source-2.html index 3289093..8b78b46 100644 --- a/deliverables/Coverage/htmlReport/ns-9/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-9/sources/source-2.html @@ -59,7 +59,7 @@ Current scope: all classes 100% - (6/6) + (7/7) @@ -75,7 +75,7 @@ Current scope: all classes 100% - (18/18) + (19/19) @@ -106,8 +106,11 @@ Current scope: all classes   private static final int BASE_FOOD_PER_HUNTER = 1;     /** Prestige Points multiplier used during the event. */ -  private int prestigeMultiplier; +  private final int prestigeMultiplier;   +  /**Gets Prestige Points multiplier used during the event. +  * @return int {@code PrestigeMultiplier} +  */   int getPrestigeMultiplier() { return prestigeMultiplier; }     /** @@ -173,20 +176,14 @@ Current scope: all classes   return new Hunt(getIdIMG(),getEra(), prestigeMultiplier);   }   -  /** -  * Prints a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s -  * toString to print a more detailed version. -  * <p>includes: -  * <li>{@link #prestigeMultiplier} -  * </p> -  * @return {@code String} - a string representation of this {@code TribeCard}. -  * @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard -  * @see it.polimi.ingsw.gc14.Model.Game Game -  * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board -  */ +  @Override +  public String toStringPlayer() { +  return "HUNT"; +  } +    @Override   public String toStringBoard() { -  return super.toStringBoard()+" 1\uD83C\uDF56+"+prestigeMultiplier+"\uD83C\uDFC5"+"×\uD83C\uDFF9"; +  return "\033[38;5;180mHUNT 1\uD83C\uDF56+" + prestigeMultiplier + "\uD83C\uDFC5×\uD83C\uDFF9" + "\033[0m";   }    } @@ -213,7 +210,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-9/sources/source-3.html b/deliverables/Coverage/htmReport/ns-9/sources/source-3.html similarity index 88% rename from deliverables/Coverage/htmlReport/ns-9/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-9/sources/source-3.html index c44431f..d095238 100644 --- a/deliverables/Coverage/htmlReport/ns-9/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-9/sources/source-3.html @@ -59,7 +59,7 @@ Current scope: all classes 100% - (7/7) + (8/8) @@ -75,7 +75,7 @@ Current scope: all classes 100% - (30/30) + (29/29) @@ -96,7 +96,6 @@ Current scope: all classes  import java.util.HashMap;  import java.util.List;  import java.util.Map; - import java.util.stream.Collectors;    /**   * When activated, rewards the player with the most shaman icons and penalizes the one with the fewest. @@ -108,15 +107,23 @@ Current scope: all classes   private static final int BUILDING5_BONUS_ICONS = 3;     /** Prestige points awarded to the player with the most shaman icons. */ -  private int prestigeToAdd; +  private final int prestigeToAdd;   -  // TODO +  /** +  * Returns the prestige points awarded to the player with the most shaman icons. +  * +  * @return prestige points to award. +  */   int getPrestigeToAdd() { return prestigeToAdd; }     /** Prestige points removed from the player with the fewest shaman icons. */ -  private int prestigeToRemove; +  private final int prestigeToRemove;   -  // TODO +  /** +  * Returns the prestige points removed from the player with the fewest shaman icons. +  * +  * @return prestige points to remove. +  */   int getPrestigeToRemove() { return prestigeToRemove; }     /** @@ -164,8 +171,8 @@ Current scope: all classes   @Override   public void activateEvent (ArrayList <Player> playerList){   Map<Player, Integer> playerMap = new HashMap<>(); -  int tmpIcons = 0; -  int tmpCount = 0; +  int tmpIcons; +  int tmpCount;     for (Player player : playerList) {   tmpIcons = player.getShamans().stream().mapToInt(sh -> sh.getIcon()).sum(); @@ -179,8 +186,8 @@ Current scope: all classes   int maxIcon = playerMap.values().stream().mapToInt(Integer::intValue).max().orElse(0);   int minIcon = playerMap.values().stream().mapToInt(Integer::intValue).min().orElse(0);   -  List<Player> maxIconsPlayer = playerMap.entrySet().stream().filter(e -> e.getValue() == maxIcon).map(Map.Entry::getKey).collect(Collectors.toList()); -  List<Player> minIconsPlayer = playerMap.entrySet().stream().filter(e -> e.getValue() == minIcon).map(Map.Entry::getKey).collect(Collectors.toList()); +  List<Player> maxIconsPlayer = playerMap.entrySet().stream().filter(e -> e.getValue() == maxIcon).map(Map.Entry::getKey).toList(); +  List<Player> minIconsPlayer = playerMap.entrySet().stream().filter(e -> e.getValue() == minIcon).map(Map.Entry::getKey).toList();       for (Player player : maxIconsPlayer) { @@ -192,7 +199,7 @@ Current scope: all classes   }     for (Player player : minIconsPlayer) { -  if (!(player.getBuildingCards().stream().anyMatch(b -> b.getEffectId() == 2))) { +  if (player.getBuildingCards().stream().noneMatch(b -> b.getEffectId() == 2)) {   player.removePrestige(prestigeToRemove);   }   } @@ -222,8 +229,13 @@ Current scope: all classes   * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board   */   @Override +  public String toStringPlayer() { +  return "SHAMANIC_RITUAL"; +  } +  +  @Override   public String toStringBoard() { -  return super.toStringBoard()+" \uD83C\uDF1F>:"+prestigeToAdd+" \uD83C\uDF1F<:"+prestigeToRemove; +  return "\033[38;5;180mSHAMANIC_RITUAL \uD83C\uDF1F>:" + prestigeToAdd + " \uD83C\uDF1F<:" + prestigeToRemove + "\033[0m";   }    } @@ -250,7 +262,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-9/sources/source-4.html b/deliverables/Coverage/htmReport/ns-9/sources/source-4.html similarity index 94% rename from deliverables/Coverage/htmlReport/ns-9/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-9/sources/source-4.html index 792017b..0baec0f 100644 --- a/deliverables/Coverage/htmlReport/ns-9/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-9/sources/source-4.html @@ -59,7 +59,7 @@ Current scope: all classes 100% - (6/6) + (7/7) @@ -75,7 +75,7 @@ Current scope: all classes 100% - (22/22) + (23/23) @@ -110,7 +110,7 @@ Current scope: all classes   /**   * The prestige penalty multiplier applied for each unpaid Food unit.   */ -  private int prestigeDebt; +  private final int prestigeDebt;     /**   * Returns the prestige penalty multiplier associated with this Sustenance event. @@ -181,7 +181,7 @@ Current scope: all classes   }   else{   foodDebt -= player.getFoodValue(); -  player.removeFood(player.getFoodValue()); // player.getFoodValue() == 0 +  player.removeFood(player.getFoodValue());   player.removePrestige(foodDebt * prestigeDebt);   }   } @@ -209,8 +209,13 @@ Current scope: all classes   * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board   */   @Override +  public String toStringPlayer() { +  return "SUSTENANCE"; +  } +  +  @Override   public String toStringBoard() { -  return super.toStringBoard()+" -1\uD83C\uDF56/-"+prestigeDebt+"\uD83C\uDFC5"; +  return "\033[38;5;180mSUSTENANCE -1\uD83C\uDF56/-" + prestigeDebt + "\uD83C\uDFC5\033[0m";   }  } @@ -236,7 +241,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-a/index.html b/deliverables/Coverage/htmReport/ns-a/index.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index.html rename to deliverables/Coverage/htmReport/ns-a/index.html index 4116065..a274cc8 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index.html +++ b/deliverables/Coverage/htmReport/ns-a/index.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_BLOCK.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_BLOCK.html index 00cd3e2..b56fe3d 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_BLOCK.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_BLOCK_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_BLOCK_DESC.html index 1f7eda8..14302d0 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_BLOCK_DESC.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_CLASS.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_CLASS.html index 0371489..cbd5c43 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_CLASS.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_CLASS_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_CLASS_DESC.html index d1e5fa0..be0208d 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_CLASS_DESC.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_LINE.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_LINE.html index e81adbf..644dabd 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_LINE.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_LINE_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_LINE_DESC.html index e73b600..96202f0 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_LINE_DESC.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_METHOD.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_METHOD.html index 984d980..82d37a0 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_METHOD.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_METHOD_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_METHOD_DESC.html index 9ce5e92..e3a3269 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_METHOD_DESC.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_NAME_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-a/index_SORT_BY_NAME_DESC.html index 83c5e20..0d150f6 100644 --- a/deliverables/Coverage/htmlReport/ns-a/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-a/index_SORT_BY_NAME_DESC.html @@ -224,7 +224,7 @@ it.polimi.ingsw.gc14.Model.GamePackage diff --git a/deliverables/Coverage/htmlReport/ns-a/sources/source-1.html b/deliverables/Coverage/htmReport/ns-a/sources/source-1.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-a/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-a/sources/source-1.html index 93a5daf..13b3e09 100644 --- a/deliverables/Coverage/htmlReport/ns-a/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-a/sources/source-1.html @@ -109,29 +109,29 @@ Current scope: all classes   * slotList contains the ordered list of slots (tiles). The slots changes based on the number of players.   * Each slot (tile) has special action as drawing from the upper/lower row or taking food.   */ -  private List<Slot> slotList; +  private final List<Slot> slotList;     /** tribeDeck is the deck from where you draw tribe cards as characters and events. */ -  private Queue<TribeCard> tribeDeck; +  private final Queue<TribeCard> tribeDeck;     /**   * The upper row of tribe cards. It contains a total of   * {@code nTotem + 4} tribe cards, which may include both character and event cards.   */ -  private List<TribeCard> upperListTribe; +  private final List<TribeCard> upperListTribe;     /**   * The lower row of the tribe card. During the first round, there will be (num. of players + 1) character cards.   * During the following rounds, lower row will be emptied and populated with upper row's cards.   * When an Event card gets in the lower row, the event effect will be activated at the end of the round.   */ -  private List<TribeCard> lowerListTribe; +  private final List<TribeCard> lowerListTribe;     /** Contains all the building cards of the upper list. When a new era starts, all its building cards are placed here. */ -  private List<BuildingCard> upperListBuilding; +  private final List<BuildingCard> upperListBuilding;     /** Contains all the building cards of the lower list. When a new era starts, the old era's buildings are moved from the upper to the lower list. */ -  private List<BuildingCard> lowerListBuilding; +  private final List<BuildingCard> lowerListBuilding;     /**   * Returns the upper row of tribe cards. @@ -161,10 +161,10 @@ Current scope: all classes   */   public List<BuildingCard> getLowerListBuilding() { return lowerListBuilding; }   -  // TODO +  /** All building card lists grouped by era; index 0 = era 1, index 1 = era 2, etc. */   private final ArrayList<List<BuildingCard>> buildingCardsAllEras;   /** Number of players */ -  private int nTotem; +  private final int nTotem;     /** Current era of the game */   private int era; @@ -310,7 +310,7 @@ Current scope: all classes   * Take the selected card from the upper tribe list of the board.   *   * @param tribeCard is the card to remove. -  * @return true if the card is succesfully removed. +  * @return true if the card is successfully removed.   */   public boolean removeUpperTribeCard(TribeCard tribeCard) {   return upperListTribe.remove(tribeCard); @@ -418,7 +418,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-a/sources/source-2.html b/deliverables/Coverage/htmReport/ns-a/sources/source-2.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-a/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-a/sources/source-2.html index 4629811..6a743f5 100644 --- a/deliverables/Coverage/htmlReport/ns-a/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-a/sources/source-2.html @@ -105,7 +105,6 @@ Current scope: all classes   * remaining upper and lower cards, and the current game stage.   */  public class CurrentState implements Serializable { -  // region Getters     /**   * The current player associated with the game state. @@ -205,9 +204,7 @@ Current scope: all classes   return gameStage;   }   -  // endregion getters   -  // region Setters     /**   * Increments the current era by 1. @@ -245,9 +242,7 @@ Current scope: all classes   public void gameStageUpdate(GameStages stage){   this.gameStage = stage;   } -  // endregion setters   -  // region Constructors     /**   * Creates a new CurrentState object with default initial values. @@ -263,14 +258,12 @@ Current scope: all classes   this.nLower = 0;   this.gameStage = GameStages.WAITING;   } -  // endregion constructors   -  // region Functions     /**   * Updates the current player, slot, and available draws.   * If {@code slot} is {@code null}, both {@link #nUpper} and {@link #nLower} are reset to 0. -  * Otherwise they are set from the slot's values. +  * Otherwise, they are set from the slot's values.   *   * @param player the new current player.   * @param slot the new current slot, or {@code null} when no slot is active. @@ -289,7 +282,12 @@ Current scope: all classes     }   -  // TODO +  /** +  * Returns a formatted ASCII table representation of the current game state. +  * Columns: Player, Round, Era, GameStage. +  * +  * @return a {@code String} containing the ASCII table. +  */   @Override   public String toString(){   var table= new AsciiTable(BorderStyle.ROUNDED,4); @@ -308,7 +306,6 @@ Current scope: all classes   table.addRow(values);   return table.build();   } -  // endregion functions  } @@ -333,7 +330,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-a/sources/source-3.html b/deliverables/Coverage/htmReport/ns-a/sources/source-3.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-a/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-a/sources/source-3.html index e4a11c7..567b64f 100644 --- a/deliverables/Coverage/htmlReport/ns-a/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-a/sources/source-3.html @@ -167,7 +167,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-b/index.html b/deliverables/Coverage/htmReport/ns-b/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index.html rename to deliverables/Coverage/htmReport/ns-b/index.html index 3798fdd..099d71a 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index.html +++ b/deliverables/Coverage/htmReport/ns-b/index.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_BLOCK.html index c180055..bf49b16 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_BLOCK.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -151,18 +151,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_BLOCK_DESC.html index af23b61..36909c6 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_BLOCK_DESC.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -228,18 +228,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_CLASS.html index 1940cad..ee22192 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_CLASS.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_CLASS_DESC.html index 3b5dac0..5c170ec 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_CLASS_DESC.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -256,18 +256,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_LINE.html index c9ea600..b2ae8ba 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_LINE.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_LINE_DESC.html index db918b1..bb75716 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_LINE_DESC.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -256,18 +256,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_METHOD.html index 1cfb39c..5f7dcd7 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_METHOD.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -123,18 +123,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_METHOD_DESC.html index 12222cb..a4c18b7 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_METHOD_DESC.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -256,18 +256,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-b/index_SORT_BY_NAME_DESC.html index 21b4ae6..7e53f9a 100644 --- a/deliverables/Coverage/htmlReport/ns-b/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-b/index_SORT_BY_NAME_DESC.html @@ -61,10 +61,10 @@ it.polimi.ingsw.gc14.Model.Orders - 88.2% + 89.2% - (67/76) + (66/74) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Model.Orders 96.5% - (111/115) + (110/114) @@ -256,18 +256,18 @@ it.polimi.ingsw.gc14.Model.Orders - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -294,7 +294,7 @@ it.polimi.ingsw.gc14.Model.Orders diff --git a/deliverables/Coverage/htmlReport/ns-b/sources/source-1.html b/deliverables/Coverage/htmReport/ns-b/sources/source-1.html similarity index 94% rename from deliverables/Coverage/htmlReport/ns-b/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-b/sources/source-1.html index 1a69f8b..88de3fa 100644 --- a/deliverables/Coverage/htmlReport/ns-b/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-b/sources/source-1.html @@ -64,18 +64,18 @@ Current scope: all classes - 83.3% + 87.5% - (15/18) + (14/16) - 95.8% + 95.7% - (23/24) + (22/23) @@ -95,7 +95,6 @@ Current scope: all classes  import it.polimi.ingsw.gc14.View.TUI.BorderStyle;    import java.util.*; - import java.util.stream.IntStream;    /**   * Represents the order logic card used in a two-player game. @@ -140,10 +139,8 @@ Current scope: all classes   buildingEffect(player);   return;   } -  if(index==1){ -  if(!player.removeFood(1)){ -  player.removePrestige(2); -  } +  if (!player.removeFood(1)) { +  player.removePrestige(2);   }   }   @@ -200,7 +197,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-b/sources/source-2.html b/deliverables/Coverage/htmReport/ns-b/sources/source-2.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-b/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-b/sources/source-2.html index 6854c16..5b8910c 100644 --- a/deliverables/Coverage/htmlReport/ns-b/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-b/sources/source-2.html @@ -208,7 +208,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-b/sources/source-3.html b/deliverables/Coverage/htmReport/ns-b/sources/source-3.html similarity index 99% rename from deliverables/Coverage/htmlReport/ns-b/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-b/sources/source-3.html index 5f1ad3a..1d5f733 100644 --- a/deliverables/Coverage/htmlReport/ns-b/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-b/sources/source-3.html @@ -212,7 +212,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-b/sources/source-4.html b/deliverables/Coverage/htmReport/ns-b/sources/source-4.html similarity index 99% rename from deliverables/Coverage/htmlReport/ns-b/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-b/sources/source-4.html index 1393ca8..11e4f4a 100644 --- a/deliverables/Coverage/htmlReport/ns-b/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-b/sources/source-4.html @@ -214,7 +214,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-b/sources/source-5.html b/deliverables/Coverage/htmReport/ns-b/sources/source-5.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-b/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-b/sources/source-5.html index e281875..8174447 100644 --- a/deliverables/Coverage/htmlReport/ns-b/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-b/sources/source-5.html @@ -170,7 +170,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-c/index.html b/deliverables/Coverage/htmReport/ns-c/index.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index.html rename to deliverables/Coverage/htmReport/ns-c/index.html index 7ac373e..c749ad5 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index.html +++ b/deliverables/Coverage/htmReport/ns-c/index.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_BLOCK.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_BLOCK.html index 97c0b6d..3b2e9c1 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_BLOCK.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_BLOCK_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_BLOCK_DESC.html index e2981ec..59e5960 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_BLOCK_DESC.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_CLASS.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_CLASS.html index f1f8779..ea64449 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_CLASS.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_CLASS_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_CLASS_DESC.html index a00f77f..5dfd367 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_CLASS_DESC.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_LINE.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_LINE.html index 9f25902..b1446bf 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_LINE.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_LINE_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_LINE_DESC.html index 410b4fa..3d72292 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_LINE_DESC.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_METHOD.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_METHOD.html index 8a6bc20..97c2ac8 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_METHOD.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_METHOD_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_METHOD_DESC.html index 7aedd9a..851ace1 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_METHOD_DESC.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_NAME_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-c/index_SORT_BY_NAME_DESC.html index fdfaac3..706156b 100644 --- a/deliverables/Coverage/htmlReport/ns-c/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-c/index_SORT_BY_NAME_DESC.html @@ -252,7 +252,7 @@ it.polimi.ingsw.gc14.Network diff --git a/deliverables/Coverage/htmlReport/ns-c/sources/source-1.html b/deliverables/Coverage/htmReport/ns-c/sources/source-1.html similarity index 91% rename from deliverables/Coverage/htmlReport/ns-c/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-c/sources/source-1.html index a10fec2..1581d0b 100644 --- a/deliverables/Coverage/htmlReport/ns-c/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-c/sources/source-1.html @@ -88,8 +88,9 @@ Current scope: all classes   * broadcaster without knowing which protocols are active underneath.   */  public class CompositeClientBroadcaster { -  +  /** RMI transport used to reach RMI-connected clients. */   private final RMIServer rmiServer; +  /** TCP transport used to reach TCP-connected clients. */   private final TCPServer tcpServer;     /** @@ -107,6 +108,8 @@ Current scope: all classes   * Forwards the event to both the RMI and the TCP server.   * Each server is responsible for filtering error events to the   * requesting player only. +  * +  * @param event the network event to broadcast.   */   public void notifyAll(NetworkEvent event) {   rmiServer.notifyAll(event); @@ -115,6 +118,8 @@ Current scope: all classes     /**   * Forwards the model snapshot to every client on both transports. +  * +  * @param model the mini model snapshot to broadcast.   */   public void notifyAll(MiniModel model) {   rmiServer.notifyAll(model); @@ -144,7 +149,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-c/sources/source-2.html b/deliverables/Coverage/htmReport/ns-c/sources/source-2.html similarity index 95% rename from deliverables/Coverage/htmlReport/ns-c/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-c/sources/source-2.html index 3ae58c3..18d6936 100644 --- a/deliverables/Coverage/htmlReport/ns-c/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-c/sources/source-2.html @@ -142,9 +142,9 @@ Current scope: all classes   * Event used to notify that the game has ended.   */   ENDED_GAME("Ended Game"); -  +  /** Human-readable label for this event type, returned by {@link #toString()}. */   private final String description; -  private EventType(String description) { +  EventType(String description) {   this.description = description;   }   @Override @@ -175,7 +175,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-c/sources/source-3.html b/deliverables/Coverage/htmReport/ns-c/sources/source-3.html similarity index 87% rename from deliverables/Coverage/htmlReport/ns-c/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-c/sources/source-3.html index 9e918ad..bd57a9a 100644 --- a/deliverables/Coverage/htmlReport/ns-c/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-c/sources/source-3.html @@ -100,7 +100,7 @@ Current scope: all classes   * Returns the local IPv4 address that can reach the given server IP.   *   * <p>If the server is localhost, returns {@code "127.0.0.1"}. -  * Otherwise iterates active non-loopback interfaces to find one on the same subnet; +  * Otherwise, iterates active non-loopback interfaces to find one on the same subnet;   * falls back to a UDP connect trick if no matching subnet is found.   *   * @param serverIp the server IP address or hostname. @@ -134,6 +134,14 @@ Current scope: all classes   return socket.getLocalAddress().getHostAddress();   }   } +  /** +  * Returns {@code true} if {@code a} and {@code b} share the same subnet given a CIDR {@code prefix} length. +  * +  * @param a first IPv4 address. +  * @param b second IPv4 address. +  * @param prefix CIDR prefix length (0–32). +  * @return {@code true} if both addresses belong to the same subnet. +  */   private static boolean sameSubnet(InetAddress a, InetAddress b, int prefix) {   if (prefix < 0 || prefix > 32) return false;   int maskBits = prefix == 0 ? 0 : (0xFFFFFFFF << (32 - prefix)); @@ -141,6 +149,12 @@ Current scope: all classes   int addrB = toInt(b.getAddress()) & maskBits;   return addrA == addrB;   } +  /** +  * Converts a 4-byte big-endian IPv4 address array to a signed 32-bit integer. +  * +  * @param bytes the 4-byte address array. +  * @return the corresponding signed integer. +  */   private static int toInt(byte[] bytes) {   return ((bytes[0] & 0xFF) << 24) |   ((bytes[1] & 0xFF) << 16) | @@ -171,7 +185,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-c/sources/source-4.html b/deliverables/Coverage/htmReport/ns-c/sources/source-4.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-c/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-c/sources/source-4.html index c9429ea..4f4305f 100644 --- a/deliverables/Coverage/htmlReport/ns-c/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-c/sources/source-4.html @@ -127,7 +127,7 @@ Current scope: all classes   /**   * Username of the player requesting the event.   */ -  protected String username; +  protected final String username;     /**   * Returns the username of the player requesting the event. @@ -141,7 +141,7 @@ Current scope: all classes   /**   * Type of the network event.   */ -  protected EventType eventType; +  protected final EventType eventType;     /**   * Map associating each occupied slot with the corresponding player. @@ -285,10 +285,8 @@ Current scope: all classes   * Applies this event to the specified client-side mini model.   *   * @param model the mini model on which the event must be applied. -  * @return {@code true} if the event is applied successfully, -  * {@code false} otherwise.   */ -  public abstract boolean apply(MiniModel model); +  public abstract void apply(MiniModel model);  } @@ -313,7 +311,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-c/sources/source-5.html b/deliverables/Coverage/htmReport/ns-c/sources/source-5.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-c/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-c/sources/source-5.html index c9e5cf9..ca272af 100644 --- a/deliverables/Coverage/htmlReport/ns-c/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-c/sources/source-5.html @@ -83,7 +83,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-c/sources/source-6.html b/deliverables/Coverage/htmReport/ns-c/sources/source-6.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-c/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-c/sources/source-6.html index 09809de..3f7c7a1 100644 --- a/deliverables/Coverage/htmlReport/ns-c/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-c/sources/source-6.html @@ -140,7 +140,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/index.html b/deliverables/Coverage/htmReport/ns-d/index.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index.html rename to deliverables/Coverage/htmReport/ns-d/index.html index 6bbfc28..1e87356 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index.html +++ b/deliverables/Coverage/htmReport/ns-d/index.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -365,7 +365,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -400,7 +400,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -435,7 +435,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -489,7 +489,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_BLOCK.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_BLOCK.html index adbafec..607a121 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_BLOCK.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -127,7 +127,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -155,7 +155,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -190,7 +190,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -225,7 +225,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -260,7 +260,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -295,7 +295,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -330,7 +330,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -365,7 +365,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -400,7 +400,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -435,7 +435,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -489,7 +489,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_BLOCK_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_BLOCK_DESC.html index 7da2516..cad0ef3 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_BLOCK_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -274,7 +274,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -309,7 +309,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -344,7 +344,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -379,7 +379,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -414,7 +414,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -449,7 +449,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -477,7 +477,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_CLASS.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_CLASS.html index bf108d4..91be195 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_CLASS.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -365,7 +365,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -400,7 +400,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -435,7 +435,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -489,7 +489,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_CLASS_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_CLASS_DESC.html index fdcd712..a41066f 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_CLASS_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -407,7 +407,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -442,7 +442,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_LINE.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_LINE.html index 03e168b..fd78de2 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_LINE.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -365,7 +365,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -400,7 +400,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -435,7 +435,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -489,7 +489,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_LINE_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_LINE_DESC.html index 165ca22..2272ddb 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_LINE_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -407,7 +407,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -442,7 +442,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_METHOD.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_METHOD.html index 2de3011..3780b05 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_METHOD.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -162,7 +162,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -197,7 +197,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -232,7 +232,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -365,7 +365,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -400,7 +400,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -435,7 +435,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -489,7 +489,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_METHOD_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_METHOD_DESC.html index a89b623..c70cea0 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_METHOD_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -407,7 +407,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -442,7 +442,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_NAME_DESC.html similarity index 97% rename from deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-d/index_SORT_BY_NAME_DESC.html index a4ad6a1..435cfde 100644 --- a/deliverables/Coverage/htmlReport/ns-d/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-d/index_SORT_BY_NAME_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/41) + (0/40) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/175) + (0/162) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/5) + (0/4) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/15) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/13) + (0/12) @@ -204,7 +204,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -239,7 +239,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/15) + (0/14) @@ -267,7 +267,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/12) + (0/11) @@ -302,7 +302,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -337,7 +337,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -372,7 +372,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -407,7 +407,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -442,7 +442,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/17) + (0/16) @@ -470,7 +470,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/19) + (0/18) @@ -505,7 +505,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents 0% - (0/14) + (0/13) @@ -532,7 +532,7 @@ it.polimi.ingsw.gc14.Network.NetworkEvents diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-1.html b/deliverables/Coverage/htmReport/ns-d/sources/source-1.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-1.html index 48dba63..c6d43e2 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-1.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/14) + (0/13) @@ -104,7 +104,7 @@ Current scope: all classes   */  public class AddPlayer extends NetworkEvent {   /** Number of players proposed by this player; used only when creating a new game. */ -  private int proposedNPlayer; +  private final int proposedNPlayer;     /**   * @return the number of proposed players to add to the match @@ -139,19 +139,17 @@ Current scope: all classes   * turn order, game state, and slot map.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;   miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard);   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }  } @@ -178,7 +176,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-2.html b/deliverables/Coverage/htmReport/ns-d/sources/source-2.html similarity index 89% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-2.html index 4f7ebbf..a4b37b8 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-2.html @@ -63,7 +63,7 @@ Current scope: all classes 0% - (0/19) + (0/18) @@ -102,11 +102,14 @@ Current scope: all classes   * always returns {@code false}.   */  public class ApplyNextRound extends NetworkEvent { -  -  private ArrayList<TribeCard> upperListTribeCards; -  private ArrayList<TribeCard> lowerListTribeCards; -  private ArrayList<BuildingCard> upperListBuildingCards; -  private ArrayList<BuildingCard> lowerListBuildingCards; +  /** Tribe cards shown in the upper row of the board for the new round. */ +  private final ArrayList<TribeCard> upperListTribeCards; +  /** Tribe cards shown in the lower row of the board for the new round. */ +  private final ArrayList<TribeCard> lowerListTribeCards; +  /** Building cards shown in the upper row of the board for the new round. */ +  private final ArrayList<BuildingCard> upperListBuildingCards; +  /** Building cards shown in the lower row of the board for the new round. */ +  private final ArrayList<BuildingCard> lowerListBuildingCards;       /** @@ -153,10 +156,9 @@ Current scope: all classes   * slot map, turn order, and game state for the new round.   *   * @param miniModel the client-side model to update. -  * @return {@code true} always (this event cannot produce an error).   */   @Override -  public boolean apply(MiniModel miniModel) { +  public void apply(MiniModel miniModel) {   synchronized (miniModel) {   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setOrderLogicCard(orderLogicCard); @@ -167,7 +169,6 @@ Current scope: all classes   miniModel.setUpperListBuildingCards(upperListBuildingCards);   miniModel.setLowerListBuildingCards(lowerListBuildingCards);   miniModel.setLastEvent(this); -  return true;   }   }  } @@ -194,7 +195,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-3.html b/deliverables/Coverage/htmReport/ns-d/sources/source-3.html similarity index 93% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-3.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-3.html index 754a538..68f567f 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-3.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-3.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/17) + (0/16) @@ -108,7 +108,7 @@ Current scope: all classes   * during totem selection may free a totem for other players.   */  public class DisconnectedPlayer extends NetworkEvent { -  //TODO +  /** Updated list of totems available after the disconnection frees any previously chosen totem. */   private List<Totems> availableTotems;     @@ -144,13 +144,12 @@ Current scope: all classes   * updating player data, turn order, game state, and disconnected player list.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;   miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard);   miniModel.setCurrentState(currentState); @@ -158,7 +157,6 @@ Current scope: all classes   miniModel.setDisconnectedPlayers(disconnectedPlayers);   miniModel.setAvailableTotems(availableTotems);   miniModel.setLastEvent(this); -  return true;   }   }   @@ -187,7 +185,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-4.html b/deliverables/Coverage/htmReport/ns-d/sources/source-4.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-4.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-4.html index 8c4e2a5..6e8cff1 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-4.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-4.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/14) + (0/13) @@ -101,7 +101,7 @@ Current scope: all classes   */  public class DrawLowerBuildingCard extends NetworkEvent{   /** Index of the card to draw */ -  private int pos; +  private final int pos;     /**   * Class constructor. @@ -129,13 +129,12 @@ Current scope: all classes   * from the lower building list and updating players, turn order, game state, and slot map.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;     miniModel.removeLowerBuildingCard(pos);   miniModel.setPlayers(playerList); @@ -143,7 +142,6 @@ Current scope: all classes   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }   @@ -171,7 +169,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-5.html b/deliverables/Coverage/htmReport/ns-d/sources/source-5.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-5.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-5.html index 2bd8f86..f96b31e 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-5.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-5.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/14) + (0/13) @@ -102,7 +102,7 @@ Current scope: all classes  public class DrawLowerTribeCard extends NetworkEvent{     /** Index of the card to draw */ -  private int pos; +  private final int pos;     /**   * Class constructor. @@ -128,13 +128,12 @@ Current scope: all classes   * from the lower tribe list and updating players, turn order, game state, and slot map.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;     miniModel.removeLowerTribeCard(pos);   miniModel.setPlayers(playerList); @@ -142,7 +141,6 @@ Current scope: all classes   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }   @@ -170,7 +168,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-6.html b/deliverables/Coverage/htmReport/ns-d/sources/source-6.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-6.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-6.html index 366f3f2..5285ddc 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-6.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-6.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/14) + (0/13) @@ -102,7 +102,7 @@ Current scope: all classes  public class DrawUpperBuildingCard extends NetworkEvent{     /** Index of the card to draw */ -  private int pos; +  private final int pos;     /**   * Class constructor. @@ -129,13 +129,12 @@ Current scope: all classes   * from the upper building list and updating players, turn order, game state, and slot map.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;     miniModel.removeUpperBuildingCard(pos);   miniModel.setPlayers(playerList); @@ -143,7 +142,6 @@ Current scope: all classes   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }  } @@ -170,7 +168,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-7.html b/deliverables/Coverage/htmReport/ns-d/sources/source-7.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-7.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-7.html index 7897173..07593f0 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-7.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-7.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/14) + (0/13) @@ -102,7 +102,7 @@ Current scope: all classes  public class DrawUpperTribeCard extends NetworkEvent{     /** Index of the card to draw */ -  private int pos; +  private final int pos;     /**   * Class constructor. @@ -128,20 +128,18 @@ Current scope: all classes   * from the upper tribe list and updating players, turn order, game state, and slot map.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;   miniModel.removeUpperTribeCard(pos);   miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard);   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }   @@ -170,7 +168,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-8.html b/deliverables/Coverage/htmReport/ns-d/sources/source-8.html similarity index 94% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-8.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-8.html index 7fba32c..4bf5a54 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-8.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-8.html @@ -63,7 +63,7 @@ Current scope: all classes 0% - (0/12) + (0/11) @@ -129,10 +129,9 @@ Current scope: all classes   * game state and setting the standings list for the leaderboard.   *   * @param miniModel the client-side model to update. -  * @return {@code true} always (this event cannot produce an error).   */   @Override -  public boolean apply(MiniModel miniModel) { +  public void apply(MiniModel miniModel) {   synchronized (miniModel) {   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setOrderLogicCard(orderLogicCard); @@ -140,7 +139,6 @@ Current scope: all classes   miniModel.setPlayers(playerList);   miniModel.setStandingPlayers(playerList);   miniModel.setLastEvent(this); -  return true;   }   }  } @@ -167,7 +165,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-9.html b/deliverables/Coverage/htmReport/ns-d/sources/source-9.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-9.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-9.html index 0682351..5608160 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-9.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-9.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/15) + (0/14) @@ -137,21 +137,18 @@ Current scope: all classes   * turn order, current game state, and slot assignments are updated.   *   * @param miniModel the mini model on which to apply the event. -  * @return {@code true} if the update is applied successfully, -  * {@code false} if the event represents an error.   */   @Override -  public boolean apply(MiniModel miniModel) { +  public void apply(MiniModel miniModel) {   synchronized (miniModel) {   if (isError) -  return false; +  return;   miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard);   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setDisconnectedPlayers(disconnectedPlayers);   miniModel.setLastEvent(this); -  return true;   }   }  } @@ -178,7 +175,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-a.html b/deliverables/Coverage/htmReport/ns-d/sources/source-a.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-a.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-a.html index 656ced9..6c23c99 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-a.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-a.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/12) + (0/11) @@ -123,19 +123,17 @@ Current scope: all classes   * turn order, game state, and slot map after a skip turn action.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;   miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard);   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }   @@ -163,7 +161,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-b.html b/deliverables/Coverage/htmReport/ns-d/sources/source-b.html similarity index 92% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-b.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-b.html index f88454b..139e3f1 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-b.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-b.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/13) + (0/12) @@ -102,7 +102,7 @@ Current scope: all classes  public class SlotChoice extends NetworkEvent {     /** Index of the selected slot. */ -  private int pos; +  private final int pos;     /**   * Class constructor. @@ -129,19 +129,17 @@ Current scope: all classes   * turn order, game state, and slot map after a slot selection.   *   * @param miniModel the client-side model to update. -  * @return {@code false} if the event is marked as an error; {@code true} otherwise.   */   @Override -  public boolean apply(MiniModel miniModel){ +  public void apply(MiniModel miniModel){   synchronized (miniModel) {   if (isError) -  return false; +  return;   miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard);   miniModel.setCurrentState(currentState);   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setLastEvent(this); -  return true;   }   }   @@ -169,7 +167,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-d/sources/source-c.html b/deliverables/Coverage/htmReport/ns-d/sources/source-c.html similarity index 87% rename from deliverables/Coverage/htmlReport/ns-d/sources/source-c.html rename to deliverables/Coverage/htmReport/ns-d/sources/source-c.html index 7d6c931..f82e1de 100644 --- a/deliverables/Coverage/htmlReport/ns-d/sources/source-c.html +++ b/deliverables/Coverage/htmReport/ns-d/sources/source-c.html @@ -59,7 +59,7 @@ Current scope: all classes 0% - (0/5) + (0/4) @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/17) + (0/15) @@ -109,7 +109,7 @@ Current scope: all classes   /**   * Name of the totem selected by the player.   */ -  private String totem; +  private final String totem;     /**   * List of totems still available after the choice has been processed. @@ -117,15 +117,6 @@ Current scope: all classes   private List<Totems> availableTotems;     /** -  * Sets the list of currently available totems. -  * -  * @param availableTotems the totems still available for selection. -  */ -  public void setAvailableTotems(List<Totems> availableTotems) { -  this.availableTotems = availableTotems; -  } -  -  /**   * Constructs a totem choice event for the specified player.   *   * @param username the username of the player making the choice. @@ -162,14 +153,12 @@ Current scope: all classes   * totems are updated.   *   * @param miniModel the mini model on which to apply the event. -  * @return {@code true} if the update is applied successfully, -  * {@code false} if the event represents an error.   */   @Override -  public boolean apply(MiniModel miniModel) { +  public void apply(MiniModel miniModel) {   synchronized (miniModel) {   if (isError) -  return false; +  return;     miniModel.setPlayers(playerList);   miniModel.setOrderLogicCard(orderLogicCard); @@ -177,7 +166,6 @@ Current scope: all classes   miniModel.setSlotPlayerMap(slotPlayerMap);   miniModel.setAvailableTotems(availableTotems);   miniModel.setLastEvent(this); -  return true;   }   }  } @@ -204,7 +192,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-e/index.html b/deliverables/Coverage/htmReport/ns-e/index.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index.html rename to deliverables/Coverage/htmReport/ns-e/index.html index f347661..807c68f 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index.html +++ b/deliverables/Coverage/htmReport/ns-e/index.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_BLOCK.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_BLOCK.html index dd2b73b..5706a18 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_BLOCK.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_BLOCK_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_BLOCK_DESC.html index a2f1024..663fd26 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_BLOCK_DESC.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_CLASS.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_CLASS.html index 0fc03bf..308dc7c 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_CLASS.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_CLASS_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_CLASS_DESC.html index 90e73e6..84a78e8 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_CLASS_DESC.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_LINE.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_LINE.html index 4e320f9..0a2c662 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_LINE.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_LINE_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_LINE_DESC.html index e9167c7..5c00c08 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_LINE_DESC.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_METHOD.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_METHOD.html index b3a3742..643ce55 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_METHOD.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_METHOD_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_METHOD_DESC.html index 213f4d9..ebfdec4 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_METHOD_DESC.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_NAME_DESC.html similarity index 98% rename from deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-e/index_SORT_BY_NAME_DESC.html index 554edf5..b154f5a 100644 --- a/deliverables/Coverage/htmlReport/ns-e/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-e/index_SORT_BY_NAME_DESC.html @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Client diff --git a/deliverables/Coverage/htmlReport/ns-e/sources/source-1.html b/deliverables/Coverage/htmReport/ns-e/sources/source-1.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-e/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-e/sources/source-1.html index adf67ab..ed671ec 100644 --- a/deliverables/Coverage/htmlReport/ns-e/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-e/sources/source-1.html @@ -93,7 +93,6 @@ Current scope: all classes  import it.polimi.ingsw.gc14.Model.MiniModel;  import it.polimi.ingsw.gc14.Network.NetworkEvent;  import it.polimi.ingsw.gc14.Network.RMI.Common.IClientCallback; - import javafx.application.Platform;    import java.rmi.RemoteException;  import java.rmi.server.UnicastRemoteObject; @@ -122,7 +121,7 @@ Current scope: all classes   /**   * Called by the server when the game is initialized.   * Sets the client game model in the {@link ClientController}. -  * @param model the initialized {@link Game} model +  * @param model the initialized {@link it.polimi.ingsw.gc14.Model.Game Game} model   * @throws RemoteException if any RMI error occurs   */   @Override @@ -173,7 +172,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-e/sources/source-2.html b/deliverables/Coverage/htmReport/ns-e/sources/source-2.html similarity index 93% rename from deliverables/Coverage/htmlReport/ns-e/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-e/sources/source-2.html index c41b845..536a820 100644 --- a/deliverables/Coverage/htmlReport/ns-e/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-e/sources/source-2.html @@ -97,25 +97,32 @@ Current scope: all classes  import it.polimi.ingsw.gc14.ErrorType;  import it.polimi.ingsw.gc14.Network.IClient;  import it.polimi.ingsw.gc14.Network.NetworkConfig; - import it.polimi.ingsw.gc14.Network.NetworkEvents.*;  import it.polimi.ingsw.gc14.Network.RMI.Common.IGameServer;    /**   * Client RMI. Uses the methods exposed by the server RMI.   */  public class RMIClient implements IClient { -  +  /** Hostname or IP address of the RMI server. */   private final String host; +  /** Port of the RMI registry. */   private final int port; +  /** Remote stub obtained from the RMI registry after a successful connection. */   private IGameServer stub; -  private ClientController controller; -  private String myIp; +  /** Client-side controller that receives and applies incoming game events. */ +  private final ClientController controller; +  /** Local IP address advertised to the RMI runtime so callbacks are routed correctly. */ +  private final String myIp; +  /** Username of the currently connected player; set during {@link #connect}. */   private String username; -  +  /** {@code true} while the heartbeat loop is active; set to {@code false} on disconnect. */   private volatile boolean running = false;     /** Scheduler that fires ping() every {@value NetworkConfig#KEEPALIVE_INTERVAL_MS} ms. */   private ScheduledExecutorService pingSender; +  /** +  * Future executor used for timer Running +  */   private ExecutorService executor;     /** @@ -160,7 +167,7 @@ Current scope: all classes   return status;   } catch (Exception e) {   e.printStackTrace(); -  return ErrorType.GENERIC_ERROR; +  return ErrorType.SERVER_UNREACHABLE;   }   }   @@ -174,7 +181,7 @@ Current scope: all classes   * <p>Mirrors the {@code ScheduledExecutorService} in   * {@code TCPClient.heartbeatLoop()} that writes {@code PING} every 3 s.   * On {@link RemoteException} the server is considered gone and -  * {@link #disconnect()} is called — mirrors the behaviour on +  * {@link #disconnect()} is called — mirrors the behavior on   * {@code SocketTimeoutException} / {@code IOException} in the TCP version.   */   private void startHeartbeat() { @@ -374,7 +381,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-f/index.html b/deliverables/Coverage/htmReport/ns-f/index.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index.html rename to deliverables/Coverage/htmReport/ns-f/index.html index e20131f..0c711f2 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index.html +++ b/deliverables/Coverage/htmReport/ns-f/index.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_BLOCK.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_BLOCK.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_BLOCK.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_BLOCK.html index 339280b..c266da7 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_BLOCK.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_BLOCK.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_BLOCK_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_BLOCK_DESC.html index 8a3907e..4cf68ec 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_BLOCK_DESC.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_BLOCK_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_CLASS.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_CLASS.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_CLASS.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_CLASS.html index 0ff2db5..50737e7 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_CLASS.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_CLASS.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_CLASS_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_CLASS_DESC.html index 16491e2..940c895 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_CLASS_DESC.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_CLASS_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_LINE.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_LINE.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_LINE.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_LINE.html index 200a359..7ca34b3 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_LINE.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_LINE.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_LINE_DESC.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_LINE_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_LINE_DESC.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_LINE_DESC.html index 792f6ef..2ee1194 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_LINE_DESC.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_LINE_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_METHOD.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_METHOD.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_METHOD.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_METHOD.html index a716116..f9abfa1 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_METHOD.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_METHOD.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -153,7 +153,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -161,7 +161,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_METHOD_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_METHOD_DESC.html index 097f812..5105e2b 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_METHOD_DESC.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_METHOD_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_NAME_DESC.html b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_NAME_DESC.html similarity index 96% rename from deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_NAME_DESC.html rename to deliverables/Coverage/htmReport/ns-f/index_SORT_BY_NAME_DESC.html index 0210f67..ab3a479 100644 --- a/deliverables/Coverage/htmlReport/ns-f/index_SORT_BY_NAME_DESC.html +++ b/deliverables/Coverage/htmReport/ns-f/index_SORT_BY_NAME_DESC.html @@ -56,7 +56,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/23) + (0/22) @@ -64,7 +64,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/36) + (0/38) @@ -72,7 +72,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/113) + (0/105) @@ -118,7 +118,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/17) + (0/16) @@ -126,7 +126,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/32) + (0/34) @@ -134,7 +134,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/88) + (0/81) @@ -169,7 +169,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server 0% - (0/25) + (0/24) @@ -196,7 +196,7 @@ it.polimi.ingsw.gc14.Network.RMI.Server diff --git a/deliverables/Coverage/htmlReport/ns-f/sources/source-1.html b/deliverables/Coverage/htmReport/ns-f/sources/source-1.html similarity index 89% rename from deliverables/Coverage/htmlReport/ns-f/sources/source-1.html rename to deliverables/Coverage/htmReport/ns-f/sources/source-1.html index e1e13ba..f1cac16 100644 --- a/deliverables/Coverage/htmlReport/ns-f/sources/source-1.html +++ b/deliverables/Coverage/htmReport/ns-f/sources/source-1.html @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/25) + (0/24) @@ -115,16 +115,20 @@ Current scope: all classes   * </ul>   */  public class RMIHeartbeat { -  -  private String username = ""; +  /** Username of the client monitored by this watchdog. */ +  private String username; +  /** Shared map used to mark the player as offline on timeout. */   private final LimitedMap<String, Boolean> playerList; +  /** Registry of active RMI callbacks; the entry for this player is removed on disconnect. */   private final Map<String, IClientCallback> clients; +  /** Shared event queue; a {@link DisconnectedPlayer} event is posted here on timeout. */   private final BlockingQueue<NetworkEvent> actionQueue;     /** Last time a ping was received from this client. */   private volatile long lastPingTime = System.currentTimeMillis(); +  /** {@code true} while the watchdog is running; set to {@code false} on first disconnect. */   private volatile boolean running = true; -  +  /** Single-thread executor that periodically checks whether the silence threshold has been exceeded. */   private final ScheduledExecutorService watchdog =   Executors.newSingleThreadScheduledExecutor(r -> {   Thread t = new Thread(r, "rmi-watchdog-" + username); @@ -187,7 +191,7 @@ Current scope: all classes     clients.remove(username);   actionQueue.add(new DisconnectedPlayer(username)); -  System.out.println("RMI disconnected: " + username); +  System.err.println("(RMI) Disconnected player: " + username);   }  } @@ -213,7 +217,7 @@ Current scope: all classes diff --git a/deliverables/Coverage/htmlReport/ns-f/sources/source-2.html b/deliverables/Coverage/htmReport/ns-f/sources/source-2.html similarity index 91% rename from deliverables/Coverage/htmlReport/ns-f/sources/source-2.html rename to deliverables/Coverage/htmReport/ns-f/sources/source-2.html index fec50ec..4b5c3f3 100644 --- a/deliverables/Coverage/htmlReport/ns-f/sources/source-2.html +++ b/deliverables/Coverage/htmReport/ns-f/sources/source-2.html @@ -59,7 +59,7 @@ Current scope: all classes 0% - (0/17) + (0/16) @@ -67,7 +67,7 @@ Current scope: all classes 0% - (0/32) + (0/34) @@ -75,7 +75,7 @@ Current scope: all classes 0% - (0/88) + (0/81) @@ -110,7 +110,6 @@ Current scope: all classes  import java.util.concurrent.BlockingQueue;  import java.util.concurrent.ConcurrentHashMap;   - import java.rmi.*;  import java.util.stream.Collectors;     @@ -123,9 +122,11 @@ Current scope: all classes   * shared network event queue.   */  public class RMIServer extends UnicastRemoteObject implements IGameServer { +  /** Hostname or IP address exposed by the RMI runtime ({@code java.rmi.server.hostname}). */   private final String host; +  /** Server-side game controller; all model access is synchronized on this object. */   private final GameController controller; -  private Registry registry; +  /** Port on which the RMI registry is bound. */   private final int nPort;     /** username → callback */ @@ -137,8 +138,9 @@ Current scope: all classes   * HeartbeatHandler in the TCP stack.   */   private final Map<String, RMIHeartbeat> watchdogs = new ConcurrentHashMap<>(); -  +  /** Shared queue to which player actions are added for sequential processing. */   private final BlockingQueue<NetworkEvent> actionQueue; +  /** Shared map tracking each player's connection status ({@code true} = online). */   private final LimitedMap<String, Boolean> playerList;     @@ -184,10 +186,10 @@ Current scope: all classes     synchronized (controller) {   -  if (playerList.isEmpty() && controller.getModel()==null) { +  if (playerList.isEmpty() &&(controller.getModel()==null || controller.getModel().getCurrentState().getGameStage().equals(GameStages.WAITING))) {   controller.setModel(new Game(preferredInt));   playerList.setLimit(preferredInt); -  System.out.println("Game Created With :"+preferredInt+" Players"); +  System.out.println("Game Created With: "+preferredInt+" Players");   }   if(controller.getModel().getCurrentState().getGameStage()!= GameStages.WAITING ) {   if (controller.getModel().getPlayers().stream().noneMatch(p -> p.getUserName().equals(username))|| controller.getModel().getCurrentState().getGameStage()==GameStages.ENDED) { @@ -198,11 +200,12 @@ Current scope: all classes   if (controller.addPlayer(username)) {   clients.put(username, callback);   playerList.put(username, true); -  startWatchdog(username);   System.out.println("Accepted player: " + username); +  startWatchdog(username); +  System.out.println("Heartbeat connected for: " + username);   return null;   } else { -  return ErrorType.USERNAME_ALREADY_USED; +  return ErrorType.INVALID_USERNAME;   }   }   @@ -210,8 +213,9 @@ Current scope: all classes   if(!playerList.containsKey(username)){   clients.put(username, callback);   playerList.put(username, true); -  startWatchdog(username);   System.out.println("(After crash)Reconnected player: " + username); +  startWatchdog(username); +  System.out.println("Heartbeat connected for: " + username);   return null;   }   else { @@ -221,6 +225,7 @@ Current scope: all classes   clients.put(username, callback);   System.out.println("Reconnected player: " + username);   startWatchdog(username); +  System.out.println("Heartbeat connected for: " + username);   Game game = controller.getModel();   callback.onGameInit(new MiniModel(   game.getSlotMap(), game.getOrderLogicCard(), game.getCurrentState(), @@ -386,43 +391,15 @@ Current scope: all classes   * <p>The method configures the server hostname, creates the RMI registry   * on the specified port, and registers this server instance under the   * {@code RMIGameServer} name. -  * -  * @return {@code true} if the server starts successfully, -  * {@code false} otherwise.   */ -  public boolean start() { +  public void start() {   try {   System.setProperty("java.rmi.server.hostname", host); -  registry = LocateRegistry.createRegistry(nPort); +  Registry registry = LocateRegistry.createRegistry(nPort);   registry.rebind("RMIGameServer", this);   System.out.println("RMI Server started on port: " + nPort); -  return true;   } catch (RemoteException e) {   e.printStackTrace(); -  return false; -  } -  } -  -  /** -  * Stops the RMI server and removes its binding from the registry. -  * -  * <p>The remote server object is unexported, the registry entry associated -  * with {@code RMIGameServer} is removed, and the server shutdown is logged. -  * -  * @return {@code true} if the server is stopped successfully, -  * {@code false} otherwise. -  */ -  public boolean stop() { -  try { -  registry.unbind("RMIGameServer"); -  UnicastRemoteObject.unexportObject(this, true); -  watchdogs.values().forEach(RMIHeartbeat::disconnect); -  watchdogs.clear(); -  System.out.println("RMI Server stopped"); -  return true; -  } catch (RemoteException | NotBoundException e) { -  e.printStackTrace(); -  return false;   }   }   @@ -484,7 +461,7 @@ Current scope: all classes