You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

217 lines
15 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <!DOCTYPE HTML>
  2. <html lang="de">
  3. <head>
  4. <!-- Generated by javadoc (17) on Tue Feb 15 08:39:56 CET 2022 -->
  5. <title>Player</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  8. <meta name="dc.created" content="2022-02-15">
  9. <meta name="description" content="declaration: class: Player">
  10. <meta name="generator" content="javadoc/ClassWriterImpl">
  11. <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
  12. <link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
  13. <link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
  14. <script type="text/javascript" src="script.js"></script>
  15. <script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
  16. <script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
  17. </head>
  18. <body class="class-declaration-page">
  19. <script type="text/javascript">var evenRowColor = "even-row-color";
  20. var oddRowColor = "odd-row-color";
  21. var tableTab = "table-tab";
  22. var activeTableTab = "active-table-tab";
  23. var pathtoroot = "./";
  24. loadScripts(document, 'script');</script>
  25. <noscript>
  26. <div>JavaScript is disabled on your browser.</div>
  27. </noscript>
  28. <div class="flex-box">
  29. <header role="banner" class="flex-header">
  30. <nav role="navigation">
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="top-nav" id="navbar-top">
  33. <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
  34. <ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
  35. <li><a href="package-summary.html">Package</a></li>
  36. <li class="nav-bar-cell1-rev">Class</li>
  37. <li><a href="package-tree.html">Tree</a></li>
  38. <li><a href="index-files/index-1.html">Index</a></li>
  39. <li><a href="help-doc.html#class">Help</a></li>
  40. </ul>
  41. </div>
  42. <div class="sub-nav">
  43. <div>
  44. <ul class="sub-nav-list">
  45. <li>Summary:&nbsp;</li>
  46. <li>Nested&nbsp;|&nbsp;</li>
  47. <li>Field&nbsp;|&nbsp;</li>
  48. <li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
  49. <li><a href="#method-summary">Method</a></li>
  50. </ul>
  51. <ul class="sub-nav-list">
  52. <li>Detail:&nbsp;</li>
  53. <li>Field&nbsp;|&nbsp;</li>
  54. <li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
  55. <li><a href="#method-detail">Method</a></li>
  56. </ul>
  57. </div>
  58. <div class="nav-list-search"><label for="search-input">SEARCH:</label>
  59. <input type="text" id="search-input" value="search" disabled="disabled">
  60. <input type="reset" id="reset-button" value="reset" disabled="disabled">
  61. </div>
  62. </div>
  63. <!-- ========= END OF TOP NAVBAR ========= -->
  64. <span class="skip-nav" id="skip-navbar-top"></span></nav>
  65. </header>
  66. <div class="flex-content">
  67. <main role="main">
  68. <!-- ======== START OF CLASS DATA ======== -->
  69. <div class="header">
  70. <h1 title="Class Player" class="title">Class Player</h1>
  71. </div>
  72. <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
  73. <div class="inheritance">Player</div>
  74. </div>
  75. <section class="class-description" id="class-description">
  76. <hr>
  77. <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Player</span>
  78. <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
  79. </section>
  80. <section class="summary">
  81. <ul class="summary-list">
  82. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  83. <li>
  84. <section class="constructor-summary" id="constructor-summary">
  85. <h2>Constructor Summary</h2>
  86. <div class="caption"><span>Constructors</span></div>
  87. <div class="summary-table two-column-summary">
  88. <div class="table-header col-first">Constructor</div>
  89. <div class="table-header col-last">Description</div>
  90. <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.String,int,int,int)" class="member-name-link">Player</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
  91. int&nbsp;startPos,
  92. int&nbsp;startHome,
  93. int&nbsp;jumpToHome)</code></div>
  94. <div class="col-last even-row-color">&nbsp;</div>
  95. </div>
  96. </section>
  97. </li>
  98. <!-- ========== METHOD SUMMARY =========== -->
  99. <li>
  100. <section class="method-summary" id="method-summary">
  101. <h2>Method Summary</h2>
  102. <div id="method-summary-table">
  103. <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>
  104. <div id="method-summary-table.tabpanel" role="tabpanel">
  105. <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
  106. <div class="table-header col-first">Modifier and Type</div>
  107. <div class="table-header col-second">Method</div>
  108. <div class="table-header col-last">Description</div>
  109. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  110. <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkFigureInBase(java.util.ArrayList)" class="member-name-link">checkFigureInBase</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="Figure.html" title="class in Unnamed Package">Figure</a>&gt;&nbsp;figures)</code></div>
  111. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  112. <div class="block">Checks if the Player has figures in the base (off gameboard)</div>
  113. </div>
  114. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
  115. <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkGameWin(java.util.ArrayList)" class="member-name-link">checkGameWin</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="Figure.html" title="class in Unnamed Package">Figure</a>&gt;&nbsp;figures)</code></div>
  116. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  117. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  118. <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#choose(java.util.ArrayList)" class="member-name-link">choose</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;&nbsp;usableFigures)</code></div>
  119. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  120. <div class="block">Get the user input on witch figure the user wants to move</div>
  121. </div>
  122. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  123. <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#rollDice()" class="member-name-link">rollDice</a>()</code></div>
  124. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="inherited-list">
  129. <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
  130. <code><a href="https://docs.oracle.com/en/java/javase/17/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/17/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/17/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/17/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/17/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/17/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/17/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/17/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/17/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/17/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/17/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>
  131. </section>
  132. </li>
  133. </ul>
  134. </section>
  135. <section class="details">
  136. <ul class="details-list">
  137. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  138. <li>
  139. <section class="constructor-details" id="constructor-detail">
  140. <h2>Constructor Details</h2>
  141. <ul class="member-list">
  142. <li>
  143. <section class="detail" id="&lt;init&gt;(java.lang.String,int,int,int)">
  144. <h3>Player</h3>
  145. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Player</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
  146. int&nbsp;startPos,
  147. int&nbsp;startHome,
  148. int&nbsp;jumpToHome)</span></div>
  149. </section>
  150. </li>
  151. </ul>
  152. </section>
  153. </li>
  154. <!-- ============ METHOD DETAIL ========== -->
  155. <li>
  156. <section class="method-details" id="method-detail">
  157. <h2>Method Details</h2>
  158. <ul class="member-list">
  159. <li>
  160. <section class="detail" id="rollDice()">
  161. <h3>rollDice</h3>
  162. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">rollDice</span>()</div>
  163. <dl class="notes">
  164. <dt>Returns:</dt>
  165. <dd>value of the dice</dd>
  166. </dl>
  167. </section>
  168. </li>
  169. <li>
  170. <section class="detail" id="checkGameWin(java.util.ArrayList)">
  171. <h3>checkGameWin</h3>
  172. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">checkGameWin</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="Figure.html" title="class in Unnamed Package">Figure</a>&gt;&nbsp;figures)</span></div>
  173. <dl class="notes">
  174. <dt>Parameters:</dt>
  175. <dd><code>figures</code> - figures of the current Player</dd>
  176. <dt>Returns:</dt>
  177. <dd>true if Player has won</dd>
  178. </dl>
  179. </section>
  180. </li>
  181. <li>
  182. <section class="detail" id="checkFigureInBase(java.util.ArrayList)">
  183. <h3>checkFigureInBase</h3>
  184. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">checkFigureInBase</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="Figure.html" title="class in Unnamed Package">Figure</a>&gt;&nbsp;figures)</span></div>
  185. <div class="block">Checks if the Player has figures in the base (off gameboard)</div>
  186. <dl class="notes">
  187. <dt>Parameters:</dt>
  188. <dd><code>figures</code> - figures of the current Player</dd>
  189. <dt>Returns:</dt>
  190. <dd>true if there is at least one figure in the base (off gameboard)</dd>
  191. </dl>
  192. </section>
  193. </li>
  194. <li>
  195. <section class="detail" id="choose(java.util.ArrayList)">
  196. <h3>choose</h3>
  197. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">choose</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link">ArrayList</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;&nbsp;usableFigures)</span></div>
  198. <div class="block">Get the user input on witch figure the user wants to move</div>
  199. <dl class="notes">
  200. <dt>Parameters:</dt>
  201. <dd><code>usableFigures</code> - list of usable Figures to choose from</dd>
  202. <dt>Returns:</dt>
  203. <dd>int figid of the figure chosen</dd>
  204. </dl>
  205. </section>
  206. </li>
  207. </ul>
  208. </section>
  209. </li>
  210. </ul>
  211. </section>
  212. <!-- ========= END OF CLASS DATA ========= -->
  213. </main>
  214. </div>
  215. </div>
  216. </body>
  217. </html>