FIx: Fixed Coverage Screenshots And htmlRepot.

This commit is contained in:
GabrieleRadice
2026-06-19 22:57:43 +02:00
parent a4dc8b2540
commit 0129efe400
316 changed files with 4566 additions and 4497 deletions
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name sortedAsc
">
<a href="index_SORT_BY_NAME_DESC.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_BLOCK.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat sortedAsc
">
<a href="index_SORT_BY_BLOCK_DESC.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_BLOCK_DESC.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat sortedDesc
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_CLASS.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat sortedAsc
">
<a href="index_SORT_BY_CLASS_DESC.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_CLASS_DESC.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat sortedDesc
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_LINE.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat sortedAsc
">
<a href="index_SORT_BY_LINE_DESC.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_LINE_DESC.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat sortedDesc
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_METHOD.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat sortedAsc
">
<a href="index_SORT_BY_METHOD_DESC.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_METHOD_DESC.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat sortedDesc
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > it.polimi.ingsw.gc14.Network.RMI.Client</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_SORT_BY_NAME_DESC.html">all classes</a>
<span class="separator">|</span>
it.polimi.ingsw.gc14.Network.RMI.Client</div>
<h1>Coverage Summary for Package: it.polimi.ingsw.gc14.Network.RMI.Client</h1>
<table class="coverageStats">
<tr>
<th class="name">Package</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">it.polimi.ingsw.gc14.Network.RMI.Client</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/14)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/68)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<table class="coverageStats">
<tr>
<th class="name sortedDesc
">
<a href="index.html">Class</a> </th>
<th class="coverageStat
">
<a href="index_SORT_BY_CLASS.html">Class, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_METHOD.html">Method, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_BLOCK.html">Branch, %</a>
</th>
<th class="coverageStat
">
<a href="index_SORT_BY_LINE.html">Line, %</a>
</th>
</tr>
<tr>
<td class="name"><a href="sources/source-2.html">RMIClient</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
<tr>
<td class="name"><a href="sources/source-1.html">ClientCallbackImpl</a></td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
</table>
</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>
@@ -0,0 +1,178 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > ClientCallbackImpl</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.Network.RMI.Client</a>
</div>
<h1>Coverage Summary for Class: ClientCallbackImpl (it.polimi.ingsw.gc14.Network.RMI.Client)</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">ClientCallbackImpl</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/2)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/8)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Network.RMI.Client;
&nbsp;
&nbsp;import it.polimi.ingsw.gc14.Controller.ClientController;
&nbsp;import it.polimi.ingsw.gc14.Model.MiniModel;
&nbsp;import it.polimi.ingsw.gc14.Network.NetworkEvent;
&nbsp;import it.polimi.ingsw.gc14.Network.RMI.Common.IClientCallback;
&nbsp;
&nbsp;import java.rmi.RemoteException;
&nbsp;import java.rmi.server.UnicastRemoteObject;
&nbsp;
&nbsp;
&nbsp;/**
&nbsp; * RMI client callback implementation of {@link IClientCallback}.
&nbsp; * Receives notifications from the server and updates the client game model.
&nbsp; */
&nbsp;public class ClientCallbackImpl extends UnicastRemoteObject implements IClientCallback {
&nbsp;
&nbsp; /** The client controller used to apply events and update the model */
&nbsp; private final ClientController clientController;
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Class constructor.
&nbsp; * @param clientController the client controller
&nbsp; * @throws RemoteException if any RMI error occurs
&nbsp; */
<b class="nc">&nbsp; public ClientCallbackImpl(ClientController clientController) throws RemoteException {</b>
<b class="nc">&nbsp; this.clientController = clientController;</b>
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Called by the server when the game is initialized.
&nbsp; * Sets the client game model in the {@link ClientController}.
&nbsp; * @param model the initialized {@link it.polimi.ingsw.gc14.Model.Game Game} model
&nbsp; * @throws RemoteException if any RMI error occurs
&nbsp; */
&nbsp; @Override
&nbsp; public void onGameInit(MiniModel model) throws RemoteException {
<b class="nc">&nbsp; clientController.setModel(model);</b>
<b class="nc">&nbsp; clientController.getView().render();</b>
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Called by the server when an action has been accepted.
&nbsp; * If the event contains an error, it is printed to the console.
&nbsp; * Otherwise, the event is applied to the local model.
&nbsp; * @param event the {@link NetworkEvent} sent by the server
&nbsp; * @throws RemoteException if any RMI error occurs
&nbsp; */
&nbsp; @Override
&nbsp; public void onAction(NetworkEvent event) throws RemoteException {
<b class="nc">&nbsp; if(event.isError()) {</b>
<b class="nc">&nbsp; clientController.getView().showError(event.getErrorType(),event.toString());</b>
&nbsp; } else {
<b class="nc">&nbsp; event.apply(clientController.getMiniModel());</b>
<b class="nc">&nbsp; clientController.getView().render();</b>
&nbsp; }
&nbsp;
&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-19 22:53</div>
</div>
</body>
</html>
@@ -0,0 +1,387 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > RMIClient</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.Network.RMI.Client</a>
</div>
<h1>Coverage Summary for Class: RMIClient (it.polimi.ingsw.gc14.Network.RMI.Client)</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">RMIClient</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/15)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/12)
</span>
</td>
<td class="coverageStat">
<span class="percent">
0%
</span>
<span class="absValue">
(0/60)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Network.RMI.Client;
&nbsp;import java.rmi.RemoteException;
&nbsp;import java.rmi.registry.LocateRegistry;
&nbsp;import java.rmi.registry.Registry;
&nbsp;import java.util.concurrent.*;
&nbsp;
&nbsp;import it.polimi.ingsw.gc14.Controller.ClientController;
&nbsp;import it.polimi.ingsw.gc14.ErrorType;
&nbsp;import it.polimi.ingsw.gc14.Network.IClient;
&nbsp;import it.polimi.ingsw.gc14.Network.NetworkConfig;
&nbsp;import it.polimi.ingsw.gc14.Network.RMI.Common.IGameServer;
&nbsp;
&nbsp;/**
&nbsp; * Client RMI. Uses the methods exposed by the server RMI.
&nbsp; */
&nbsp;public class RMIClient implements IClient {
&nbsp; /** Hostname or IP address of the RMI server. */
&nbsp; private final String host;
&nbsp; /** Port of the RMI registry. */
&nbsp; private final int port;
&nbsp; /** Remote stub obtained from the RMI registry after a successful connection. */
&nbsp; private IGameServer stub;
&nbsp; /** Client-side controller that receives and applies incoming game events. */
&nbsp; private final ClientController controller;
&nbsp; /** Local IP address advertised to the RMI runtime so callbacks are routed correctly. */
&nbsp; private final String myIp;
&nbsp; /** Username of the currently connected player; set during {@link #connect}. */
&nbsp; private String username;
&nbsp; /** {@code true} while the heartbeat loop is active; set to {@code false} on disconnect. */
<b class="nc">&nbsp; private volatile boolean running = false;</b>
&nbsp;
&nbsp; /** Scheduler that fires ping() every {@value NetworkConfig#KEEPALIVE_INTERVAL_MS} ms. */
&nbsp; private ScheduledExecutorService pingSender;
&nbsp; /**
&nbsp; * Future executor used for timer Running
&nbsp; */
&nbsp; private ExecutorService executor;
&nbsp;
&nbsp; /**
&nbsp; * Constructs an RMI client and initializes its connection parameters.
&nbsp; *
&nbsp; * @param controller the client controller associated with this RMI client.
&nbsp; * @param host the hostname or IP address of the RMI server.
&nbsp; * @param port the port used to connect to the RMI registry.
&nbsp; * @param myIp the IP address of the client.
&nbsp; */
<b class="nc">&nbsp; public RMIClient(ClientController controller, String host, int port, String myIp) {</b>
<b class="nc">&nbsp; this.controller = controller;</b>
<b class="nc">&nbsp; this.host = host;</b>
<b class="nc">&nbsp; this.port = port;</b>
<b class="nc">&nbsp; this.myIp = myIp;</b>
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Connects to the RMI server and starts the heartbeat loop.
&nbsp; *
&nbsp; * &lt;p&gt;Mirrors {@code TCPClient.connect()}: after a successful join the
&nbsp; * heartbeat channel is opened (here: a scheduler is started instead of
&nbsp; * opening a second socket).
&nbsp; */
&nbsp; @Override
&nbsp; public ErrorType connect(String username, int proposedNPlayers) {
&nbsp; try {
<b class="nc">&nbsp; System.setProperty(&quot;java.rmi.server.hostname&quot;, this.myIp);</b>
<b class="nc">&nbsp; Registry registry = LocateRegistry.getRegistry(host, port);</b>
<b class="nc">&nbsp; this.stub = (IGameServer) registry.lookup(&quot;RMIGameServer&quot;);</b>
<b class="nc">&nbsp; this.username = username;</b>
&nbsp;
<b class="nc">&nbsp; ClientCallbackImpl callback = new ClientCallbackImpl(controller);</b>
<b class="nc">&nbsp; ErrorType status = stub.joinGame(username, proposedNPlayers, callback);</b>
<b class="nc">&nbsp; if(status==null)</b>
&nbsp; {
<b class="nc">&nbsp; running = true;</b>
<b class="nc">&nbsp; startHeartbeat();</b>
<b class="nc">&nbsp; return null;</b>
&nbsp; }
<b class="nc">&nbsp; return status;</b>
&nbsp; } catch (Exception e) {
<b class="nc">&nbsp; e.printStackTrace();</b>
<b class="nc">&nbsp; return ErrorType.SERVER_UNREACHABLE;</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp; // -------------------------------------------------------------------------
&nbsp; // Heartbeat — mirrors TCPClient.heartbeatLoop()
&nbsp; // -------------------------------------------------------------------------
&nbsp;
&nbsp; /**
&nbsp; * Starts sending periodic pings to the server.
&nbsp; *
&nbsp; * &lt;p&gt;Mirrors the {@code ScheduledExecutorService} in
&nbsp; * {@code TCPClient.heartbeatLoop()} that writes {@code PING} every 3 s.
&nbsp; * On {@link RemoteException} the server is considered gone and
&nbsp; * {@link #disconnect()} is called — mirrors the behavior on
&nbsp; * {@code SocketTimeoutException} / {@code IOException} in the TCP version.
&nbsp; */
&nbsp; private void startHeartbeat() {
<b class="nc">&nbsp; pingSender = Executors.newSingleThreadScheduledExecutor(r -&gt; {</b>
<b class="nc">&nbsp; Thread t = new Thread(r, &quot;rmi-heartbeat&quot;);</b>
<b class="nc">&nbsp; t.setDaemon(true);</b>
<b class="nc">&nbsp; return t;</b>
&nbsp; });
&nbsp;
<b class="nc">&nbsp; executor = Executors.newSingleThreadExecutor();</b>
<b class="nc">&nbsp; pingSender.scheduleAtFixedRate(() -&gt; {</b>
<b class="nc">&nbsp; Future&lt;?&gt; future = executor.submit(() -&gt; {</b>
&nbsp; try {
<b class="nc">&nbsp; stub.ping(username);</b>
&nbsp; } catch (RemoteException e) {
<b class="nc">&nbsp; disconnect();</b>
<b class="nc">&nbsp; controller.getView().showError(ErrorType.SERVER_CRASHED,ErrorType.SERVER_CRASHED.toString());</b>
&nbsp; }
&nbsp; });
&nbsp; try {
<b class="nc">&nbsp; future.get(NetworkConfig.SILENCE_THRESHOLD_MS, TimeUnit.MILLISECONDS);</b>
&nbsp; } catch (TimeoutException e) {
<b class="nc">&nbsp; future.cancel(true);</b>
<b class="nc">&nbsp; controller.getView().showError(ErrorType.SERVER_CRASHED,ErrorType.SERVER_CRASHED.toString());</b>
<b class="nc">&nbsp; disconnect();</b>
&nbsp; } catch (Exception e) {
<b class="nc">&nbsp; disconnect();</b>
<b class="nc">&nbsp; controller.getView().showError(ErrorType.SERVER_CRASHED,ErrorType.SERVER_CRASHED.toString());</b>
&nbsp; }
&nbsp; }, 0, NetworkConfig.KEEPALIVE_INTERVAL_MS, TimeUnit.MILLISECONDS);
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Tears down the connection.
&nbsp; * Mirrors {@code TCPClient.disconnect()}: stops the heartbeat and notifies
&nbsp; * the view.
&nbsp; */
&nbsp; private void disconnect() {
<b class="nc">&nbsp; if (!running) return;</b>
<b class="nc">&nbsp; running = false;</b>
<b class="nc">&nbsp; if (pingSender != null) pingSender.shutdownNow();</b>
<b class="nc">&nbsp; if (executor != null) executor.shutdownNow();</b>
<b class="nc">&nbsp; controller.setModel(null);</b>
<b class="nc">&nbsp; controller.setClient(null);</b>
&nbsp; }
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Requests to draw a tribe card from the upper list.
&nbsp; * Creates a NetworkEvent and sends it through the network client.
&nbsp; * @param playerUsername the name of the player performing the action
&nbsp; * @param pos the index of the card to draw
&nbsp; */
&nbsp; public void drawUpperTribeCard(String playerUsername, int pos) {
&nbsp; try{
<b class="nc">&nbsp; stub.drawUpperTribeCard(playerUsername,pos);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote draw upper tribe card&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Requests to draw a tribe card from the lower list.
&nbsp; * Creates a NetworkEvent and sends it through the network client.
&nbsp; * @param playerUsername the name of the player performing the action
&nbsp; * @param pos the index of the card to draw
&nbsp; */
&nbsp; public void drawLowerTribeCard(String playerUsername,int pos) {
&nbsp; try{
<b class="nc">&nbsp; stub.drawLowerTribeCard(playerUsername,pos);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote draw lower tribe card&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Requests to draw a building card from the upper list.
&nbsp; * Creates a NetworkEvent and sends it through the network client.
&nbsp; * @param playerUsername the name of the player performing the action
&nbsp; * @param pos the index of the card to draw
&nbsp; */
&nbsp; public void drawUpperBuildingCard(String playerUsername,int pos) {
&nbsp; try{
<b class="nc">&nbsp; stub.drawUpperBuildingCard(playerUsername,pos);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote draw upper building card&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Requests to draw a building card from the lower list.
&nbsp; * Creates a NetworkEvent and sends it through the network client.
&nbsp; * @param playerUsername the name of the player performing the action
&nbsp; * @param pos the index of the card to draw
&nbsp; */
&nbsp; public void drawLowerBuildingCard(String playerUsername,int pos) {
&nbsp; try{
<b class="nc">&nbsp; stub.drawLowerBuildingCard(playerUsername,pos);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote draw lower building card&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Requests to skip the turn.
&nbsp; * This action is available only when the player cannot draw any tribe card, but still can buy some buildings.
&nbsp; * @param playerUsername the name of the player performing the action
&nbsp; */
&nbsp; public void skipTurn(String playerUsername) {
&nbsp; try{
<b class="nc">&nbsp; stub.skipTurn(playerUsername);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote skip turn&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Used to perform the slot choice action for the specified player at the specified position.
&nbsp; * @param playerUsername the name of the player performing the action
&nbsp; * @param pos the index of the selected slot
&nbsp; */
&nbsp; public void slotChoice(String playerUsername,int pos) {
&nbsp; try{
<b class="nc">&nbsp; stub.slotChoice(playerUsername,pos);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote slot choice&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp; /**
&nbsp; * Sends a totem choice to the server for the specified player via RMI.
&nbsp; *
&nbsp; * @param playerUsername the username of the player choosing the totem.
&nbsp; * @param totem the name of the chosen totem.
&nbsp; */
&nbsp; public void totemChoice(String playerUsername,String totem) {
&nbsp; try{
<b class="nc">&nbsp; stub.totemChoice(playerUsername,totem);</b>
&nbsp; }
&nbsp; catch (RemoteException e){
<b class="nc">&nbsp; System.out.println(&quot;Error during remote totem choice&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Notifies the server of a voluntary disconnection via RMI, then stops
&nbsp; * the keep-alive scheduler.
&nbsp; */
&nbsp; public void notifyDisconnection() {
<b class="nc">&nbsp; running = false;</b>
<b class="nc">&nbsp; if (pingSender != null) pingSender.shutdownNow();</b>
<b class="nc">&nbsp; if (executor != null) executor.shutdownNow();</b>
&nbsp; try {
<b class="nc">&nbsp; stub.disconnectPlayer(username);</b>
&nbsp; } catch (RemoteException e) {
<b class="nc">&nbsp; System.out.println(&quot;Error during remote disconnection&quot;);</b>
&nbsp; }
&nbsp; }
&nbsp;
&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-19 22:53</div>
</div>
</body>
</html>