FIx: Fixed Coverage Screenshots And htmlRepot.
This commit is contained in:
@@ -0,0 +1,283 @@
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html id="htmlId">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Coverage Report > Builder</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.TribeCards.Characters</a>
|
||||
</div>
|
||||
|
||||
<h1>Coverage Summary for Class: Builder (it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters)</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">Builder</td>
|
||||
<td class="coverageStat">
|
||||
<span class="percent">
|
||||
100%
|
||||
</span>
|
||||
<span class="absValue">
|
||||
(1/1)
|
||||
</span>
|
||||
</td>
|
||||
<td class="coverageStat">
|
||||
<span class="percent">
|
||||
90%
|
||||
</span>
|
||||
<span class="absValue">
|
||||
(9/10)
|
||||
</span>
|
||||
</td>
|
||||
<td class="coverageStat">
|
||||
<span class="percent">
|
||||
100%
|
||||
</span>
|
||||
<span class="absValue">
|
||||
(16/16)
|
||||
</span>
|
||||
</td>
|
||||
<td class="coverageStat">
|
||||
<span class="percent">
|
||||
97.1%
|
||||
</span>
|
||||
<span class="absValue">
|
||||
(34/35)
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<pre>
|
||||
<code class="sourceCode" id="sourceCode"> package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters;
|
||||
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
||||
import it.polimi.ingsw.gc14.Model.Player;
|
||||
|
||||
/**
|
||||
* Represents a Builder character card.
|
||||
*
|
||||
* <p>A Builder is a specific type of {@link Character} that provides
|
||||
* a reduction value when buying building cards.
|
||||
*/
|
||||
public class Builder extends Character {
|
||||
|
||||
/**
|
||||
* The reduction value provided by this Builder card.
|
||||
*/
|
||||
private final int reductionValue;
|
||||
|
||||
/**
|
||||
* The prestige value provided by this Builder card.
|
||||
*/
|
||||
private final int prestigeValue;
|
||||
|
||||
/**
|
||||
* Returns the reduction value of this Builder card.
|
||||
*
|
||||
* @return the reduction value of this Builder card.
|
||||
*/
|
||||
public int getReductionValue() {
|
||||
<b class="fc"> return reductionValue;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the prestige value of this Builder card.
|
||||
*
|
||||
* @return the prestige value of this Builder card.
|
||||
*/
|
||||
public int getPrestigeValue() {
|
||||
<b class="fc"> return prestigeValue;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Builder character card with the specified era, reduction value,
|
||||
* and prestige value.
|
||||
*
|
||||
* @param Era the era of the Builder card.
|
||||
* @param reductionValue the reduction value of the Builder card.
|
||||
* @param prestigeValue the prestige value of the Builder card.
|
||||
* @throws IllegalArgumentException if {@code reductionValue < 0} or {@code prestigeValue < 0}.
|
||||
*/
|
||||
public Builder(int Era, int reductionValue, int prestigeValue) throws IllegalArgumentException {
|
||||
<b class="fc"> super(Era,CharacterType.BUILDER);</b>
|
||||
<b class="fc"> if(reductionValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.reductionValue = reductionValue;</b>
|
||||
|
||||
<b class="fc"> if(prestigeValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.prestigeValue = prestigeValue;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Builder character card with the specified era, reduction value,
|
||||
* prestige value, and minimum number of players.
|
||||
*
|
||||
* @param Era the era of the Builder card.
|
||||
* @param reductionValue the reduction value of the Builder card.
|
||||
* @param prestigeValue the prestige value of the Builder card.
|
||||
* @param nMin the minimum number of players required for the card.
|
||||
* @throws IllegalArgumentException if {@code reductionValue < 0} or {@code prestigeValue < 0}.
|
||||
*/
|
||||
public Builder(int Era, int reductionValue, int prestigeValue,int nMin) throws IllegalArgumentException {
|
||||
<b class="fc"> super(Era,CharacterType.BUILDER,nMin);</b>
|
||||
<b class="fc"> if(reductionValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.reductionValue = reductionValue;</b>
|
||||
|
||||
<b class="fc"> if(prestigeValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.prestigeValue = prestigeValue;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Builder character card with the specified era, reduction value,
|
||||
* and prestige value.
|
||||
*
|
||||
* @param idIMG the image identifier of the Builder card.
|
||||
* @param Era the era of the Builder card.
|
||||
* @param reductionValue the reduction value of the Builder card.
|
||||
* @param prestigeValue the prestige value of the Builder card.
|
||||
* @throws IllegalArgumentException if {@code reductionValue < 0} or {@code prestigeValue < 0}.
|
||||
*/
|
||||
public Builder(String idIMG,int Era, int reductionValue, int prestigeValue) throws IllegalArgumentException {
|
||||
<b class="fc"> super(idIMG,Era,CharacterType.BUILDER);</b>
|
||||
<b class="fc"> if(reductionValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.reductionValue = reductionValue;</b>
|
||||
|
||||
<b class="fc"> if(prestigeValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.prestigeValue = prestigeValue;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Builder character card with the specified era, reduction value,
|
||||
* prestige value, and minimum number of players.
|
||||
*
|
||||
* @param idIMG the image identifier of the Builder card.
|
||||
* @param Era the era of the Builder card.
|
||||
* @param reductionValue the reduction value of the Builder card.
|
||||
* @param prestigeValue the prestige value of the Builder card.
|
||||
* @param nMin the minimum number of players required for the card.
|
||||
* @throws IllegalArgumentException if {@code reductionValue < 0} or {@code prestigeValue < 0}.
|
||||
*/
|
||||
public Builder(String idIMG,int Era, int reductionValue, int prestigeValue,int nMin) throws IllegalArgumentException {
|
||||
<b class="fc"> super(idIMG,Era,CharacterType.BUILDER,nMin);</b>
|
||||
<b class="fc"> if(reductionValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.reductionValue = reductionValue;</b>
|
||||
|
||||
<b class="fc"> if(prestigeValue < 0) {</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
}
|
||||
<b class="fc"> this.prestigeValue = prestigeValue;</b>
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toStringPlayer() {
|
||||
<b class="nc"> return "\uD83D\uDD28:" + reductionValue + " \uD83C\uDFC5:" + prestigeValue;</b>
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toStringBoard() {
|
||||
<b class="fc"> return "BUILDER \uD83D\uDD28:" + reductionValue + " \uD83C\uDFC5:" + prestigeValue;</b>
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates and returns a copy of this Builder card.
|
||||
*
|
||||
* @return a clone of this Builder card.
|
||||
*/
|
||||
@Override
|
||||
public Character clone() {
|
||||
<b class="fc"> return new Builder(getIdIMG(),getEra(),getReductionValue(), getPrestigeValue(), getNMin());</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts this Builder card into the specified player's Builder collection
|
||||
* and applies any building effects triggered by character set completion.
|
||||
*
|
||||
* @param player the player who receives the card.
|
||||
*/
|
||||
@Override
|
||||
public void insert(Player player) {
|
||||
<b class="fc"> player.getBuilders().add(this);</b>
|
||||
<b class="fc"> player.getBuildingCards().stream().filter(x->x.getEffectId()==0).forEach(x->x.applyEffect(player));</b>
|
||||
}
|
||||
}
|
||||
</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>
|
||||
Reference in New Issue
Block a user