FIx: Fixed Coverage Screenshots And htmlRepot.
This commit is contained in:
@@ -0,0 +1,235 @@
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html id="htmlId">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Coverage Report > Hunter</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: Hunter (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">Hunter</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">
|
||||
(9/9)
|
||||
</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">
|
||||
(16/16)
|
||||
</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 Hunter character card.
|
||||
*
|
||||
* <p>A Hunter is a specific type of {@link Character} initialized with
|
||||
* {@link CharacterType#HUNTER}.
|
||||
*/
|
||||
public class Hunter extends Character {
|
||||
|
||||
/**
|
||||
* Describes whether the {@code Hunter Icon} is present or not. Whenever an
|
||||
* {@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 final boolean icon;
|
||||
|
||||
/**
|
||||
* Returns whether this Hunter card has the icon.
|
||||
*
|
||||
* @return {@code true} if this Hunter card has the icon, {@code false} otherwise.
|
||||
*/
|
||||
public boolean getIcon() {
|
||||
<b class="fc"> return icon;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Hunter character card with the specified era and icon value.
|
||||
*
|
||||
* @param Era the era of the Hunter card.
|
||||
* @param icon the icon value of the Hunter card.
|
||||
*/
|
||||
public Hunter(int Era, boolean icon) {
|
||||
<b class="fc"> super(Era, CharacterType.HUNTER);</b>
|
||||
<b class="fc"> this.icon = icon;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Hunter character card with the specified era, icon value,
|
||||
* and minimum number of players.
|
||||
*
|
||||
* @param Era the era of the Hunter card.
|
||||
* @param icon the icon value of the Hunter card.
|
||||
* @param nMin the minimum number of players required for the card.
|
||||
*/
|
||||
public Hunter(int Era, boolean icon, int nMin) {
|
||||
<b class="fc"> super(Era, CharacterType.HUNTER,nMin);</b>
|
||||
<b class="fc"> this.icon = icon;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Hunter character card with the specified image id, era and icon value.
|
||||
*
|
||||
* @param idIMG the image identifier of the Hunter card.
|
||||
* @param Era the era of the Hunter card.
|
||||
* @param icon the icon value of the Hunter card.
|
||||
*/
|
||||
public Hunter(String idIMG,int Era, boolean icon) {
|
||||
<b class="fc"> super(idIMG,Era, CharacterType.HUNTER);</b>
|
||||
<b class="fc"> this.icon = icon;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Hunter character card with the specified image id, era, icon value,
|
||||
* and minimum number of players.
|
||||
*
|
||||
* @param idIMG the image identifier of the Hunter card.
|
||||
* @param Era the era of the Hunter card.
|
||||
* @param icon the icon value of the Hunter card.
|
||||
* @param nMin the minimum number of players required for the card.
|
||||
*/
|
||||
public Hunter(String idIMG,int Era, boolean icon, int nMin) {
|
||||
<b class="fc"> super(idIMG,Era, CharacterType.HUNTER,nMin);</b>
|
||||
<b class="fc"> this.icon = icon;</b>
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toStringPlayer() {
|
||||
<b class="fc"> return this.icon ? "\uD83C\uDF56" : "";</b>
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toStringBoard() {
|
||||
<b class="fc"> return "HUNTER" + (this.icon ? " \uD83C\uDF56" : "");</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a copy of this Hunter card.
|
||||
*
|
||||
* @return a clone of this Hunter card.
|
||||
*/
|
||||
@Override
|
||||
public Character clone() {
|
||||
<b class="fc"> return new Hunter(getIdIMG(),getEra(), getIcon(), getNMin());</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts this Hunter card into the specified player's Hunter collection.
|
||||
*
|
||||
* <p>If this card has the Hunter icon, the player gains 1 food for each
|
||||
* Hunter currently in their tribe. The method also 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.getHunters().add(this);</b>
|
||||
<b class="fc"> if(this.getIcon()){</b>
|
||||
<b class="fc"> player.addFood(player.getHunters().size());</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