Add: Added Coverage Screenshots And htlmReport.

This commit is contained in:
GabrieleRadice
2026-06-19 21:50:38 +02:00
parent 6aca188aa3
commit d78b8bbd93
316 changed files with 86329 additions and 0 deletions
@@ -0,0 +1,235 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Building11</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: Building11 (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">Building11</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">
(8/8)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(2/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(18/18)
</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; * At the end of the game, the player gains Prestige Points based on the number
&nbsp; * of cards of the indicated character type in their tribe.
&nbsp; *
&nbsp; * &lt;p&gt;The gained amount is equal to the number of matching character cards
&nbsp; * multiplied by the building&#39;s prestige multiplier.
&nbsp; */
&nbsp;public class Building11 extends BuildingCard {
&nbsp;
&nbsp; /**
&nbsp; * The character type involved in this building effect.
&nbsp; */
&nbsp; private CharacterType characterType;
&nbsp;
&nbsp; /**
&nbsp; * Returns the CharacterType associated with this building card effect.
&nbsp; *
&nbsp; * @return the CharacterType associated with this building card effect.
&nbsp; */
<b class="fc">&nbsp; public CharacterType getIcon() { return characterType; }</b>
&nbsp;
&nbsp; /**
&nbsp; * The prestige multiplier applied per matching character card at end of game.
&nbsp; */
&nbsp; private int prestigeMul;
&nbsp;
&nbsp; /**
&nbsp; * Returns the prestige multiplier associated with this building card effect.
&nbsp; *
&nbsp; * @return the prestige multiplier associated with this building card effect.
&nbsp; */
<b class="fc">&nbsp; public int getPrestigeMul() {return prestigeMul;}</b>
&nbsp;
&nbsp; /**
&nbsp; * Creates a Building11 card with the specified era, price, prestige value,
&nbsp; * character type icon, and prestige multiplier.
&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; * @param icon the CharacterType associated with the building card effect.
&nbsp; * @param prestigeMul the prestige multiplier of the building card effect.
&nbsp; */
&nbsp; public Building11(int era, int price,int prestigeValue, CharacterType icon, int prestigeMul) {
<b class="fc">&nbsp; super(era,price,prestigeValue);</b>
<b class="fc">&nbsp; effectType = EffectType.FINAL;</b>
<b class="fc">&nbsp; effectId = 11;</b>
<b class="fc">&nbsp; this.characterType = icon;</b>
<b class="fc">&nbsp; this.prestigeMul = prestigeMul;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Building11 card with the specified image id, era, price, prestige value,
&nbsp; * character type icon, and prestige multiplier.
&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; * @param icon the CharacterType associated with the building card effect.
&nbsp; * @param prestigeMul the prestige multiplier of the building card effect.
&nbsp; */
&nbsp; public Building11(String idIMG,int era, int price,int prestigeValue, CharacterType icon, int prestigeMul) {
<b class="fc">&nbsp; super(idIMG,era,price,prestigeValue);</b>
<b class="fc">&nbsp; effectType = EffectType.FINAL;</b>
<b class="fc">&nbsp; effectId = 11;</b>
<b class="fc">&nbsp; this.characterType = icon;</b>
<b class="fc">&nbsp; this.prestigeMul = prestigeMul;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Building11 card.
&nbsp; *
&nbsp; * @return a clone of this Building11 card.
&nbsp; */
&nbsp; @Override
&nbsp; public BuildingCard clone() {
<b class="fc">&nbsp; return new Building11(getIdIMG(),getEra(),getPrice(),getPrestigeValue(), getIcon(), getPrestigeMul());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Applies the effect of this building card to the specified player.
&nbsp; * The effect grants prestige points equal to the number of cards of the
&nbsp; * associated CharacterType owned by the player, multiplied by the prestige multiplier.
&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; @Override
&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; player.addPrestige(player.getNType(getIcon()) * this.getPrestigeMul());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Returns a string representation of this {@code Building11}, including the
&nbsp; * character type associated with its effect and its prestige multiplier.
&nbsp; *
&nbsp; * @return a string representation of this {@code Building11}.
&nbsp; */
&nbsp; @Override
&nbsp; public String toString() {
<b class="fc">&nbsp; return super.toString() + &quot;+&quot; + this.characterType.toString().substring(0, 3) + &quot;×&quot; + this.prestigeMul;</b>
&nbsp; }
&nbsp;
&nbsp; // TODO
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="fc">&nbsp; return super.toStringPlayer() + &quot; (\uD83C\uDFC5:&quot; + this.characterType.toString().substring(0, 3) + &quot;×&quot; + this.prestigeMul + &quot;)&quot;;</b>
&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-14 21:53</div>
</div>
</body>
</html>