Added: JAVADOC html in deliverables

This commit is contained in:
rubenpirreram
2026-06-19 23:09:49 +02:00
parent 1b155e7056
commit db65e0a8be
222 changed files with 55370 additions and 25 deletions
@@ -0,0 +1,525 @@
<!DOCTYPE HTML>
<html lang="it">
<head>
<!-- Generated by javadoc (25) on Fri Jun 19 23:05:23 CEST 2026 -->
<title>GameController</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2026-06-19">
<meta name="description" content="declaration: module: it.polimi.ingsw.gc14, package: it.polimi.ingsw.gc14.Controller, class: GameController">
<meta name="generator" content="javadoc/ClassWriter">
<link rel="stylesheet" type="text/css" href="../../../../../../resource-files/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../../../../../../resource-files/stylesheet.css">
<script type="text/javascript" src="../../../../../../script-files/script.js"></script>
<script type="text/javascript" src="../../../../../../script-files/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-files/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">const pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="nav-content">
<div class="nav-menu-button"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button></div>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../module-summary.html">Module</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../search.html">Search</a></li>
<li><a href="../../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
</div>
<div class="sub-nav">
<div class="nav-content">
<ol class="sub-nav-list">
<li><a href="../../../../../module-summary.html">it.polimi.ingsw.gc14</a></li>
<li><a href="package-summary.html">it.polimi.ingsw.gc14.Controller</a></li>
<li><a href="GameController.html" class="current-selection">GameController</a></li>
</ol>
<div class="nav-list-search"><input type="text" id="search-input" disabled placeholder="Search documentation (type /)" aria-label="Search in documentation" autocomplete="off" spellcheck="false"><input type="reset" id="reset-search" disabled value="Reset"></div>
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="main-grid">
<nav role="navigation" class="toc" aria-label="Table of contents">
<div class="toc-header">Contents&nbsp;<input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div>
<ol class="toc-list" tabindex="-1">
<li><a href="#" tabindex="0">Description</a></li>
<li><a href="#field-summary" tabindex="0">Field Summary</a></li>
<li><a href="#constructor-summary" tabindex="0">Constructor Summary</a></li>
<li><a href="#method-summary" tabindex="0">Method Summary</a></li>
<li><a href="#field-detail" tabindex="0">Field Details</a>
<ol class="toc-list">
<li><a href="#model" tabindex="0">model</a></li>
</ol>
</li>
<li><a href="#constructor-detail" tabindex="0">Constructor Details</a>
<ol class="toc-list">
<li><a href="#%3Cinit%3E(it.polimi.ingsw.gc14.Model.Game)" tabindex="0">GameController(Game)</a></li>
<li><a href="#%3Cinit%3E()" tabindex="0">GameController()</a></li>
</ol>
</li>
<li><a href="#method-detail" tabindex="0">Method Details</a>
<ol class="toc-list">
<li><a href="#disconnectedPlayer(java.lang.String)" tabindex="0">disconnectedPlayer(String)</a></li>
<li><a href="#reconnectPlayer(java.lang.String)" tabindex="0">reconnectPlayer(String)</a></li>
<li><a href="#getModel()" tabindex="0">getModel()</a></li>
<li><a href="#setModel(it.polimi.ingsw.gc14.Model.Game)" tabindex="0">setModel(Game)</a></li>
<li><a href="#addPlayer(java.lang.String)" tabindex="0">addPlayer(String)</a></li>
<li><a href="#drawUpperTribeCard(java.lang.String,int)" tabindex="0">drawUpperTribeCard(String, int)</a></li>
<li><a href="#drawLowerTribeCard(java.lang.String,int)" tabindex="0">drawLowerTribeCard(String, int)</a></li>
<li><a href="#drawUpperBuildingCard(java.lang.String,int)" tabindex="0">drawUpperBuildingCard(String, int)</a></li>
<li><a href="#drawLowerBuildingCard(java.lang.String,int)" tabindex="0">drawLowerBuildingCard(String, int)</a></li>
<li><a href="#skipTurn(java.lang.String)" tabindex="0">skipTurn(String)</a></li>
<li><a href="#slotChoice(java.lang.String,int)" tabindex="0">slotChoice(String, int)</a></li>
<li><a href="#totemChoice(java.lang.String,java.lang.String)" tabindex="0">totemChoice(String, String)</a></li>
<li><a href="#endGameForfeit()" tabindex="0">endGameForfeit()</a></li>
</ol>
</li>
</ol>
<button class="hide-sidebar"><span>Hide sidebar&nbsp;</span><img src="../../../../../../resource-files/left.svg" alt="Hide sidebar"></button><button class="show-sidebar"><img src="../../../../../../resource-files/right.svg" alt="Show sidebar"><span>&nbsp;Show sidebar</span></button></nav>
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<h1 title="Class GameController" class="title">Class GameController</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">it.polimi.ingsw.gc14.Controller.GameController</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="horizontal-scroll">
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">GameController</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Controller responsible for managing interactions with the <a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model"><code>Game</code></a> model.
<p>It provides methods to update the game state by delegating player-related
actions and game actions to the underlying model.</div>
</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private <a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a></code></div>
<div class="col-second even-row-color"><code><a href="#model" class="member-name-link">model</a></code></div>
<div class="col-last even-row-color">
<div class="block">The game model managed by this controller.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">GameController</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a GameController without an associated game model.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(it.polimi.ingsw.gc14.Model.Game)" class="member-name-link">GameController</a><wbr>(<a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a>&nbsp;model)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates a GameController associated with the specified game model.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addPlayer(java.lang.String)" class="member-name-link">addPlayer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;username)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Attempts to add a new player with the specified username to the game model.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#disconnectedPlayer(java.lang.String)" class="member-name-link">disconnectedPlayer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;username)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Marks the player associated with the specified username as disconnected.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drawLowerBuildingCard(java.lang.String,int)" class="member-name-link">drawLowerBuildingCard</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Attempts to draw a lower building card for the specified player
from the specified position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drawLowerTribeCard(java.lang.String,int)" class="member-name-link">drawLowerTribeCard</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Attempts to draw a lower tribe card for the specified player
from the specified position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drawUpperBuildingCard(java.lang.String,int)" class="member-name-link">drawUpperBuildingCard</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Attempts to draw an upper building card for the specified player
from the specified position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drawUpperTribeCard(java.lang.String,int)" class="member-name-link">drawUpperTribeCard</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Attempts to draw an upper tribe card for the specified player
from the specified position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#endGameForfeit()" class="member-name-link">endGameForfeit</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Ends the game due to forfeit: all remaining players are absent,
so the game is terminated and final scores are computed.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getModel()" class="member-name-link">getModel</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the game model managed by this controller.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reconnectPlayer(java.lang.String)" class="member-name-link">reconnectPlayer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;username)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Marks the player associated with the specified username as reconnected.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setModel(it.polimi.ingsw.gc14.Model.Game)" class="member-name-link">setModel</a><wbr>(<a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a>&nbsp;model)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Updates the game model managed by this controller.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#skipTurn(java.lang.String)" class="member-name-link">skipTurn</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Skips the card drawing action for the specified player.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#slotChoice(java.lang.String,int)" class="member-name-link">slotChoice</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Attempts to perform the slot choice action for the specified player
at the specified position.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#totemChoice(java.lang.String,java.lang.String)" class="member-name-link">totemChoice</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;totem)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Applies the totem choice made by the player associated with the specified username.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#method-summary" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="model">
<h3>model</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="return-type"><a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a></span>&nbsp;<span class="element-name">model</span></div>
<div class="block">The game model managed by this controller.</div>
</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(it.polimi.ingsw.gc14.Model.Game)">
<h3>GameController</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GameController</span><wbr><span class="parameters">(<a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a>&nbsp;model)</span></div>
<div class="block">Creates a GameController associated with the specified game model.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>model</code> - the game model managed by this controller.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>GameController</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">GameController</span>()</div>
<div class="block">Creates a GameController without an associated game model.</div>
</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="disconnectedPlayer(java.lang.String)">
<h3>disconnectedPlayer</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">disconnectedPlayer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;username)</span></div>
<div class="block">Marks the player associated with the specified username as disconnected.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>username</code> - the username of the player who disconnected.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the disconnection is handled successfully,
<code>false</code> if no player with the specified username exists
or if the operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="reconnectPlayer(java.lang.String)">
<h3>reconnectPlayer</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">reconnectPlayer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;username)</span></div>
<div class="block">Marks the player associated with the specified username as reconnected.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>username</code> - the username of the player who reconnected.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the reconnection is handled successfully,
<code>false</code> if no player with the specified username exists
or if the operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getModel()">
<h3>getModel</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a></span>&nbsp;<span class="element-name">getModel</span>()</div>
<div class="block">Returns the game model managed by this controller.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the game model managed by this controller.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="setModel(it.polimi.ingsw.gc14.Model.Game)">
<h3>setModel</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setModel</span><wbr><span class="parameters">(<a href="../Model/Game.html" title="class in it.polimi.ingsw.gc14.Model">Game</a>&nbsp;model)</span></div>
<div class="block">Updates the game model managed by this controller.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>model</code> - the new game model managed by this controller.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="addPlayer(java.lang.String)">
<h3>addPlayer</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">addPlayer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;username)</span></div>
<div class="block">Attempts to add a new player with the specified username to the game model.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>username</code> - the username of the player to add.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the player is successfully added,
<code>false</code> otherwise.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="drawUpperTribeCard(java.lang.String,int)">
<h3>drawUpperTribeCard</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">drawUpperTribeCard</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</span></div>
<div class="block">Attempts to draw an upper tribe card for the specified player
from the specified position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player performing the action.</dd>
<dd><code>pos</code> - the position of the upper tribe card to draw.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the action succeeds,
<code>false</code> if the player does not exist or if the draw operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="drawLowerTribeCard(java.lang.String,int)">
<h3>drawLowerTribeCard</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">drawLowerTribeCard</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</span></div>
<div class="block">Attempts to draw a lower tribe card for the specified player
from the specified position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player performing the action.</dd>
<dd><code>pos</code> - the position of the lower tribe card to draw.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the action succeeds,
<code>false</code> if the player does not exist or if the draw operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="drawUpperBuildingCard(java.lang.String,int)">
<h3>drawUpperBuildingCard</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">drawUpperBuildingCard</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</span></div>
<div class="block">Attempts to draw an upper building card for the specified player
from the specified position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player performing the action.</dd>
<dd><code>pos</code> - the position of the upper building card to draw.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the action succeeds,
<code>false</code> if the player does not exist or if the draw operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="drawLowerBuildingCard(java.lang.String,int)">
<h3>drawLowerBuildingCard</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">drawLowerBuildingCard</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</span></div>
<div class="block">Attempts to draw a lower building card for the specified player
from the specified position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player performing the action.</dd>
<dd><code>pos</code> - the position of the lower building card to draw.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the action succeeds,
<code>false</code> if the player does not exist or if the draw operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="skipTurn(java.lang.String)">
<h3>skipTurn</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">skipTurn</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername)</span></div>
<div class="block">Skips the card drawing action for the specified player.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player performing the action.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the skip action is valid and successfully performed,
<code>false</code> if the player does not exist or if the action is not valid.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="slotChoice(java.lang.String,int)">
<h3>slotChoice</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">slotChoice</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
int&nbsp;pos)</span></div>
<div class="block">Attempts to perform the slot choice action for the specified player
at the specified position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player performing the action.</dd>
<dd><code>pos</code> - the position of the chosen slot.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the action succeeds,
<code>false</code> if the player does not exist or if the slot choice operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="totemChoice(java.lang.String,java.lang.String)">
<h3>totemChoice</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">totemChoice</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;playerUsername,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;totem)</span></div>
<div class="block">Applies the totem choice made by the player associated with the specified username.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>playerUsername</code> - the username of the player making the choice.</dd>
<dd><code>totem</code> - the name of the selected totem.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the choice is handled successfully,
<code>false</code> if no player with the specified username exists
or if the choice operation fails.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="endGameForfeit()">
<h3>endGameForfeit</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">endGameForfeit</span>()</div>
<div class="block">Ends the game due to forfeit: all remaining players are absent,
so the game is terminated and final scores are computed.</div>
</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</body>
</html>