FIx: Fixed Coverage Screenshots And htmlRepot.

This commit is contained in:
GabrieleRadice
2026-06-19 22:57:43 +02:00
parent a4dc8b2540
commit 0129efe400
316 changed files with 4566 additions and 4497 deletions
@@ -0,0 +1,196 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Building10</title>
<style type="text/css">
@import "../../css/coverage.css";
@import "../../css/idea.min.css";
</style>
<script type="text/javascript" src="../../js/highlight.min.js"></script>
<script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>
<body>
<div class="content">
<div class="breadCrumbs">
Current scope: <a href="../../index.html">all classes</a>
<span class="separator">|</span>
<a href="../index.html">it.polimi.ingsw.gc14.Model.Cards.Building.Effects</a>
</div>
<h1>Coverage Summary for Class: Building10 (it.polimi.ingsw.gc14.Model.Cards.Building.Effects)</h1>
<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Branch, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">Building10</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(4/4)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(6/6)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(14/14)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Model.Cards.Building.Effects;
&nbsp;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.Building.EffectType;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
&nbsp;import it.polimi.ingsw.gc14.Model.Player;
&nbsp;
&nbsp;
&nbsp;/**
&nbsp; * At the end of the game, the player gains 6 Prestige Points
&nbsp; * for each complete set of character types in their tribe.
&nbsp; *
&nbsp; * &lt;p&gt;A complete set contains one character card of each {@link CharacterType}.
&nbsp; */
&nbsp;public class Building10 extends BuildingCard {
&nbsp;
&nbsp; /** Prestige points granted per complete character set at end of game. */
&nbsp; private static final int PRESTIGE_PER_CHARACTER_SET = 6;
&nbsp;
&nbsp; /**
&nbsp; * Creates a Building10 card with the specified era, price, and prestige value.
&nbsp; *
&nbsp; * @param era the era of the building card.
&nbsp; * @param price the price of the building card.
&nbsp; * @param prestigeValue the prestige value of the building card.
&nbsp; */
&nbsp; public Building10(int era, int price,int prestigeValue) {
<b class="fc">&nbsp; super(era,price,prestigeValue);</b>
<b class="fc">&nbsp; effectType= EffectType.FINAL;</b>
<b class="fc">&nbsp; effectId=10;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Building10 card with the specified image id, era, price, and prestige value.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the building card.
&nbsp; * @param era the era of the building card.
&nbsp; * @param price the price of the building card.
&nbsp; * @param prestigeValue the prestige value of the building card.
&nbsp; */
&nbsp; public Building10(String idIMG,int era, int price,int prestigeValue) {
<b class="fc">&nbsp; super(idIMG,era,price,prestigeValue);</b>
<b class="fc">&nbsp; effectType= EffectType.FINAL;</b>
<b class="fc">&nbsp; effectId=10;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Building10 card.
&nbsp; *
&nbsp; * @return a clone of this Building10 card.
&nbsp; */
&nbsp; @Override
&nbsp; public BuildingCard clone() {
<b class="fc">&nbsp; return new Building10(getIdIMG(),getEra(),getPrice(),getPrestigeValue());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Applies the effect of this building card to the specified player.
&nbsp; *
&nbsp; * &lt;p&gt;The effect grants 6 Prestige Points for each complete set of character
&nbsp; * cards owned by the player, where a complete set contains one card of each
&nbsp; * {@link CharacterType}.
&nbsp; *
&nbsp; * @param player the player to whom the effect is applied.
&nbsp; * @throws IllegalArgumentException if the player does not own this building card.
&nbsp; */
&nbsp; public void applyEffect(Player player) throws IllegalArgumentException {
<b class="fc">&nbsp; if(!player.getBuildingCards().contains(this))</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
<b class="fc">&nbsp; int numSet=player.getNType(CharacterType.INVENTOR);</b>
<b class="fc">&nbsp; for(CharacterType type : CharacterType.values())</b>
&nbsp; {
<b class="fc">&nbsp; if(player.getNType(type)&lt;=numSet)</b>
<b class="fc">&nbsp; numSet=player.getNType(type);</b>
&nbsp; }
&nbsp;
<b class="fc">&nbsp; player.addPrestige(PRESTIGE_PER_CHARACTER_SET * numSet);</b>
&nbsp; }
&nbsp;
&nbsp;}
</code>
</pre>
</div>
<script type="text/javascript">
(function() {
var msie = false, msie9 = false;
/*@cc_on
msie = true;
@if (@_jscript_version >= 9)
msie9 = true;
@end
@*/
if (!msie || msie && msie9) {
hljs.highlightAll()
hljs.initLineNumbersOnLoad();
}
})();
</script>
<div class="footer">
<div style="float:right;">generated on 2026-06-19 22:53</div>
</div>
</body>
</html>