FIx: Fixed Coverage Screenshots And htmlRepot.
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html id="htmlId">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Coverage Report > Building8</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: Building8 (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">Building8</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">
|
||||
(4/4)
|
||||
</span>
|
||||
</td>
|
||||
<td class="coverageStat">
|
||||
<span class="percent">
|
||||
100%
|
||||
</span>
|
||||
<span class="absValue">
|
||||
(11/11)
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<pre>
|
||||
<code class="sourceCode" id="sourceCode"> package it.polimi.ingsw.gc14.Model.Cards.Building.Effects;
|
||||
|
||||
import it.polimi.ingsw.gc14.Model.Cards.Building.EffectType;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Builder;
|
||||
import it.polimi.ingsw.gc14.Model.Player;
|
||||
|
||||
|
||||
/**
|
||||
* At the end of the game, you gain double the Prestige Points indicated on the Builder cards in your tribe.
|
||||
*/
|
||||
public class Building8 extends BuildingCard {
|
||||
|
||||
/**
|
||||
* Constructor of the building
|
||||
* @param era The game era of the building.
|
||||
* @param price The price (in food) of the building.
|
||||
* @param prestigeValue The number of Prestige Points gained from this building at the end of the game.
|
||||
*/
|
||||
public Building8(int era, int price,int prestigeValue) {
|
||||
<b class="fc"> super(era,price,prestigeValue);</b>
|
||||
<b class="fc"> effectType= EffectType.FINAL;</b>
|
||||
<b class="fc"> effectId=8;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor of the building.
|
||||
*
|
||||
* @param idIMG the image identifier of the building.
|
||||
* @param era the game era of the building.
|
||||
* @param price the price in food of the building.
|
||||
* @param prestigeValue the number of Prestige Points gained from this building at the end of the game.
|
||||
*/
|
||||
public Building8(String idIMG,int era, int price,int prestigeValue) {
|
||||
<b class="fc"> super(idIMG,era,price,prestigeValue);</b>
|
||||
<b class="fc"> effectType= EffectType.FINAL;</b>
|
||||
<b class="fc"> effectId=8;</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to clone the building: it creates an exact copy.
|
||||
* @return The new copy of the building.
|
||||
*/
|
||||
@Override
|
||||
public BuildingCard clone() {
|
||||
<b class="fc"> return new Building8(getIdIMG(),getEra(),getPrice(),getPrestigeValue());</b>
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the building effect by granting additional Prestige Points equal to
|
||||
* the Prestige Value of each Builder card owned by the player.
|
||||
*
|
||||
* <p>This effectively doubles the contribution of Builder cards to the final score.
|
||||
*
|
||||
* @param player The player who owns the building.
|
||||
* @throws IllegalArgumentException Thrown if the specified player does not own this building.
|
||||
*/
|
||||
public void applyEffect(Player player) throws IllegalArgumentException {
|
||||
<b class="fc"> if(!player.getBuildingCards().contains(this))</b>
|
||||
<b class="fc"> throw new IllegalArgumentException();</b>
|
||||
<b class="fc"> for (Builder builder : player.getBuilders()) {</b>
|
||||
<b class="fc"> player.addPrestige(builder.getPrestigeValue());</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