184 lines
4.8 KiB
HTML
184 lines
4.8 KiB
HTML
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html id="htmlId">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>Coverage Report > Building13</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: Building13 (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">Building13</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">
|
|
(2/2)
|
|
</span>
|
|
</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
100%
|
|
</span>
|
|
<span class="absValue">
|
|
(10/10)
|
|
</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.Player;
|
|
|
|
/**
|
|
* At the end of the game, this building grants 25 Prestige Points
|
|
* to the player who owns it.
|
|
*/
|
|
public class Building13 extends BuildingCard{
|
|
|
|
/** Prestige points granted at end of game by this building. */
|
|
private static final int PRESTIGE_AWARD = 25;
|
|
|
|
/**
|
|
* Creates a Building13 card with the specified era, price, and prestige value.
|
|
*
|
|
* @param era the era of the building card.
|
|
* @param price the price of the building card.
|
|
* @param prestigeValue the prestige value of the building card.
|
|
*/
|
|
public Building13(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=13;</b>
|
|
}
|
|
|
|
/**
|
|
* Creates a Building13 card with the specified image id, era, price, and prestige value.
|
|
*
|
|
* @param idIMG the image identifier of the building card.
|
|
* @param era the era of the building card.
|
|
* @param price the price of the building card.
|
|
* @param prestigeValue the prestige value of the building card.
|
|
*/
|
|
public Building13(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=13;</b>
|
|
}
|
|
|
|
/**
|
|
* Creates and returns a copy of this Building13 card.
|
|
*
|
|
* @return a clone of this Building13 card.
|
|
*/
|
|
@Override
|
|
public BuildingCard clone() {
|
|
<b class="fc"> return new Building13(getIdIMG(),getEra(),getPrice(),getPrestigeValue());</b>
|
|
}
|
|
|
|
/**
|
|
* Applies the effect of this building card to the specified player,
|
|
* granting 25 Prestige Points.
|
|
*
|
|
* @param player the player to whom the effect is applied.
|
|
* @throws IllegalArgumentException if the player does not own this building card.
|
|
*/
|
|
@Override
|
|
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"> player.addPrestige(PRESTIGE_AWARD);</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-14 21:53</div>
|
|
</div>
|
|
</body>
|
|
</html>
|