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,463 @@
<!DOCTYPE HTML>
<html lang="it">
<head>
<!-- Generated by javadoc (25) on Fri Jun 19 23:05:23 CEST 2026 -->
<title>OrderLogicCard</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.Model, class: OrderLogicCard">
<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.Model</a></li>
<li><a href="OrderLogicCard.html" class="current-selection">OrderLogicCard</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="#players" tabindex="0">players</a></li>
<li><a href="#playerList" tabindex="0">playerList</a></li>
</ol>
</li>
<li><a href="#constructor-detail" tabindex="0">Constructor Details</a>
<ol class="toc-list">
<li><a href="#%3Cinit%3E(java.util.ArrayList)" tabindex="0">OrderLogicCard(ArrayList)</a></li>
</ol>
</li>
<li><a href="#method-detail" tabindex="0">Method Details</a>
<ol class="toc-list">
<li><a href="#getPlayerList()" tabindex="0">getPlayerList()</a></li>
<li><a href="#push(it.polimi.ingsw.gc14.Model.Player)" tabindex="0">push(Player)</a></li>
<li><a href="#pushNoEffect(it.polimi.ingsw.gc14.Model.Player)" tabindex="0">pushNoEffect(Player)</a></li>
<li><a href="#pull()" tabindex="0">pull()</a></li>
<li><a href="#getFirst()" tabindex="0">getFirst()</a></li>
<li><a href="#effect(it.polimi.ingsw.gc14.Model.Player,int)" tabindex="0">effect(Player, int)</a></li>
<li><a href="#buildingEffect(it.polimi.ingsw.gc14.Model.Player)" tabindex="0">buildingEffect(Player)</a></li>
<li><a href="#containsInQueue(it.polimi.ingsw.gc14.Model.Player)" tabindex="0">containsInQueue(Player)</a></li>
<li><a href="#removeFromQueue(it.polimi.ingsw.gc14.Model.Player)" tabindex="0">removeFromQueue(Player)</a></li>
<li><a href="#getPosition(java.lang.String)" tabindex="0">getPosition(String)</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 OrderLogicCard" class="title">Class OrderLogicCard</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.Model.OrderLogicCard</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="Orders/Order2.html" title="class in it.polimi.ingsw.gc14.Model.Orders">Order2</a>, <a href="Orders/Order3.html" title="class in it.polimi.ingsw.gc14.Model.Orders">Order3</a>, <a href="Orders/Order4.html" title="class in it.polimi.ingsw.gc14.Model.Orders">Order4</a>, <a href="Orders/Order5.html" title="class in it.polimi.ingsw.gc14.Model.Orders">Order5</a></code></dd>
</dl>
<hr>
<div class="horizontal-scroll">
<div class="type-signature"><span class="modifiers">public abstract class </span><span class="element-name type-name-label">OrderLogicCard</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>
implements <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div>
<div class="block">Abstract base class for all order logic cards.
<p>An order logic card manages the turn order of the players and defines
the behavior used to update the order during the game.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../../../serialized-form.html#it.polimi.ingsw.gc14.Model.OrderLogicCard">Serialized Form</a></li>
</ul>
</dd>
</dl>
</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>protected final <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr>&lt;<a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders">OrderPlayer</a>&gt;</code></div>
<div class="col-second even-row-color"><code><a href="#playerList" class="member-name-link">playerList</a></code></div>
<div class="col-last even-row-color">
<div class="block">The list of <a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders"><code>OrderPlayer</code></a> entries tracking turn order and played status.</div>
</div>
<div class="col-first odd-row-color"><code>private final <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Queue.html" title="class or interface in java.util" class="external-link">Queue</a><wbr>&lt;<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&gt;</code></div>
<div class="col-second odd-row-color"><code><a href="#players" class="member-name-link">players</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The queue of <a href="Player.html" title="class in it.polimi.ingsw.gc14.Model"><code>Players</code></a> associated with this order logic card.</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(java.util.ArrayList)" class="member-name-link">OrderLogicCard</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&gt;&nbsp;players)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates an order logic card with the specified list of players.</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-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract 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>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#buildingEffect(it.polimi.ingsw.gc14.Model.Player)" class="member-name-link">buildingEffect</a><wbr>(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</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 building-related effect to 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="#containsInQueue(it.polimi.ingsw.gc14.Model.Player)" class="member-name-link">containsInQueue</a><wbr>(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns whether the given player is currently present in the turn queue.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#effect(it.polimi.ingsw.gc14.Model.Player,int)" class="member-name-link">effect</a><wbr>(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player,
int&nbsp;index)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Applies the effect associated with the specified player and queue position.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFirst()" class="member-name-link">getFirst</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 first player in the queue without removing it.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr>&lt;<a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders">OrderPlayer</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPlayerList()" class="member-name-link">getPlayerList</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns an unmodifiable view of the player order list.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPosition(java.lang.String)" class="member-name-link">getPosition</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">Returns the position of the player associated with the specified username
within the current order list.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#pull()" class="member-name-link">pull</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes and returns the first player in the queue.</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="#push(it.polimi.ingsw.gc14.Model.Player)" class="member-name-link">push</a><wbr>(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Applies the effect associated with the current queue position of the player
and then adds the player to the end of the queue.</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="#pushNoEffect(it.polimi.ingsw.gc14.Model.Player)" class="member-name-link">pushNoEffect</a><wbr>(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Moves the specified player to the end of the queue without applying effects.</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="#removeFromQueue(it.polimi.ingsw.gc14.Model.Player)" class="member-name-link">removeFromQueue</a><wbr>(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes the given player from both the turn queue and the order list.</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="players">
<h3>players</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">private final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Queue.html" title="class or interface in java.util" class="external-link">Queue</a>&lt;<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&gt;</span>&nbsp;<span class="element-name">players</span></div>
<div class="block">The queue of <a href="Player.html" title="class in it.polimi.ingsw.gc14.Model"><code>Players</code></a> associated with this order logic card.</div>
</div>
</section>
</li>
<li>
<section class="detail" id="playerList">
<h3>playerList</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders">OrderPlayer</a>&gt;</span>&nbsp;<span class="element-name">playerList</span></div>
<div class="block">The list of <a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders"><code>OrderPlayer</code></a> entries tracking turn order and played status.
Protected so subclasses can read it for display purposes (e.g., <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"><code>Object.toString()</code></a>).</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;(java.util.ArrayList)">
<h3>OrderLogicCard</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">OrderLogicCard</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&gt;&nbsp;players)</span></div>
<div class="block">Creates an order logic card with the specified list of players.
<p>The input list is shuffled in place to establish a random initial turn order.
This is intentional: the caller's list (typically <code>Game.playersList</code>) is
reordered so that the game's canonical player sequence reflects the randomized order.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>players</code> - the list of players associated with this order logic card.
<strong>The list is mutated (shuffled) by this constructor.</strong></dd>
</dl>
</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="getPlayerList()">
<h3>getPlayerList</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders">OrderPlayer</a>&gt;</span>&nbsp;<span class="element-name">getPlayerList</span>()</div>
<div class="block">Returns an unmodifiable view of the player order list.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the list of <a href="Orders/OrderPlayer.html" title="class in it.polimi.ingsw.gc14.Model.Orders"><code>OrderPlayer</code></a> entries in turn order.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="push(it.polimi.ingsw.gc14.Model.Player)">
<h3>push</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">push</span><wbr><span class="parameters">(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</span></div>
<div class="block">Applies the effect associated with the current queue position of the player
and then adds the player to the end of the queue.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player to be pushed into the queue.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="pushNoEffect(it.polimi.ingsw.gc14.Model.Player)">
<h3>pushNoEffect</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">pushNoEffect</span><wbr><span class="parameters">(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</span></div>
<div class="block">Moves the specified player to the end of the queue without applying effects.
<p>Any previous occurrence of the player is removed from both the queue
and the order list before the player is added again.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player to be pushed into the queue.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="pull()">
<h3>pull</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a></span>&nbsp;<span class="element-name">pull</span>()</div>
<div class="block">Removes and returns the first player in the queue.
<p>The first order entry that has not yet been marked as played
is marked as played before removing the player from the queue.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the first player in the queue, or <code>null</code> if the queue is empty.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getFirst()">
<h3>getFirst</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a></span>&nbsp;<span class="element-name">getFirst</span>()</div>
<div class="block">Returns the first player in the queue without removing it.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the first player in the queue, or <code>null</code> if the queue is empty.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="effect(it.polimi.ingsw.gc14.Model.Player,int)">
<h3>effect</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">protected abstract</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">effect</span><wbr><span class="parameters">(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player,
int&nbsp;index)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></span></div>
<div class="block">Applies the effect associated with the specified player and queue position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player to whom the effect is applied.</dd>
<dd><code>index</code> - the queue position index associated with the effect.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a></code> - if the specified index is not valid.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="buildingEffect(it.polimi.ingsw.gc14.Model.Player)">
<h3>buildingEffect</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">buildingEffect</span><wbr><span class="parameters">(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</span></div>
<div class="block">Applies the building-related effect to the specified player.
For each building card owned by the player with effect id equal to 3,
the player gains 1 Food.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player to whom the building effect is applied.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="containsInQueue(it.polimi.ingsw.gc14.Model.Player)">
<h3>containsInQueue</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">containsInQueue</span><wbr><span class="parameters">(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</span></div>
<div class="block">Returns whether the given player is currently present in the turn queue.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player to look up.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the player is in the queue; <code>false</code> otherwise.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="removeFromQueue(it.polimi.ingsw.gc14.Model.Player)">
<h3>removeFromQueue</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">removeFromQueue</span><wbr><span class="parameters">(<a href="Player.html" title="class in it.polimi.ingsw.gc14.Model">Player</a>&nbsp;player)</span></div>
<div class="block">Removes the given player from both the turn queue and the order list.
No-op if the player is not present.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>player</code> - the player to remove.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getPosition(java.lang.String)">
<h3>getPosition</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getPosition</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">Returns the position of the player associated with the specified username
within the current order list.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>username</code> - the username of the player whose position is requested.</dd>
<dt>Returns:</dt>
<dd>the player's position, or <code>-1</code> if no player with the specified
username is present in the order list.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="Player.html" title="class in it.polimi.ingsw.gc14.Model"><code>Player</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</body>
</html>