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,196 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > EventCard</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</a>
</div>
<h1>Coverage Summary for Class: EventCard (it.polimi.ingsw.gc14.Model.Cards.TribeCards)</h1>
<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">EventCard</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">
(5/5)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(7/7)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Model.Cards.TribeCards;
&nbsp;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.TribeCard;
&nbsp;import it.polimi.ingsw.gc14.Model.Player;
&nbsp;
&nbsp;import java.util.ArrayList;
&nbsp;
&nbsp;/**
&nbsp; * Abstract base class for all event cards.
&nbsp; * An EventCard is a {@link TribeCard} marked as an event card and associated
&nbsp; * with a specific {@link EventType}.
&nbsp; */
&nbsp;public abstract class EventCard extends TribeCard {
&nbsp;
&nbsp; /**
&nbsp; * The specific type of this event card.
&nbsp; */
&nbsp; private EventType type;
&nbsp;
&nbsp; /**
&nbsp; * Returns the type of this event card.
&nbsp; *
&nbsp; * @return the type of this event card.
&nbsp; */
<b class="fc">&nbsp; public EventType getType() { return type; }</b>
&nbsp;
&nbsp; /**
&nbsp; * Creates an event card with the specified era and event type.
&nbsp; *
&nbsp; * @param era the era of the event card.
&nbsp; * @param type the type of the event card.
&nbsp; */
&nbsp; public EventCard(int era, EventType type) {
<b class="fc">&nbsp; super(era, true);</b>
<b class="fc">&nbsp; this.type = type;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an event card with the specified image id, era and event type.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the event card.
&nbsp; * @param era the era of the event card.
&nbsp; * @param type the type of the event card.
&nbsp; */
&nbsp; public EventCard(String idIMG, int era, EventType type) {
<b class="fc">&nbsp; super(idIMG, era, true);</b>
<b class="fc">&nbsp; this.type = type;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this event card.
&nbsp; *
&nbsp; * @return a clone of this event card.
&nbsp; */
&nbsp; @Override
&nbsp; public abstract TribeCard clone();
&nbsp;
&nbsp; /**
&nbsp; * Returns the string representation of this event card.
&nbsp; * The returned string includes the string representation of the superclass
&nbsp; * and the string representation of the event type.
&nbsp; *
&nbsp; * @return the string representation of this event card.
&nbsp; */
&nbsp; @Override
&nbsp; public String toString() {
<b class="fc">&nbsp; return super.toString() + &quot; &quot; + type.toString();</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Prints a string representation of this {@code EventCard}. This specific variation is used in the {@code Game}&#39;s
&nbsp; * toString to print a more detailed version.
&nbsp; * &lt;p&gt;Includes:
&nbsp; * &lt;li&gt;{@link #type Type}
&nbsp; * &lt;/p&gt;
&nbsp; * @return {@code String} - a string representation of this {@code EventCard}.
&nbsp; * @see it.polimi.ingsw.gc14.Model.Game Game
&nbsp; * @see it.polimi.ingsw.gc14.Model.GamePackage.Board Board
&nbsp; */
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="fc">&nbsp; return super.toStringBoard() + &quot; &quot; + type.toString();</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Activates the effect of this event card on the specified list of players.
&nbsp; *
&nbsp; * @param playerList the list of players affected by the event.
&nbsp; */
&nbsp; public abstract void activateEvent (ArrayList &lt;Player&gt; playerList);
&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>