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.

223 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
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:42:59 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">
  117. <div class="block">Checks if a Player has won the game with the current play</div>
  118. </div>
  119. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  120. <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>
  121. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  122. <div class="block">Get the user input on witch figure the user wants to move</div>
  123. </div>
  124. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  125. <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>
  126. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
  127. <div class="block">Rolls the dice - Generates a random Number in the range of 1 - 6</div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. <div class="inherited-list">
  133. <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>
  134. <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>
  135. </section>
  136. </li>
  137. </ul>
  138. </section>
  139. <section class="details">
  140. <ul class="details-list">
  141. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  142. <li>
  143. <section class="constructor-details" id="constructor-detail">
  144. <h2>Constructor Details</h2>
  145. <ul class="member-list">
  146. <li>
  147. <section class="detail" id="&lt;init&gt;(java.lang.String,int,int,int)">
  148. <h3>Player</h3>
  149. <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,
  150. int&nbsp;startPos,
  151. int&nbsp;startHome,
  152. int&nbsp;jumpToHome)</span></div>
  153. </section>
  154. </li>
  155. </ul>
  156. </section>
  157. </li>
  158. <!-- ============ METHOD DETAIL ========== -->
  159. <li>
  160. <section class="method-details" id="method-detail">
  161. <h2>Method Details</h2>
  162. <ul class="member-list">
  163. <li>
  164. <section class="detail" id="rollDice()">
  165. <h3>rollDice</h3>
  166. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">rollDice</span>()</div>
  167. <div class="block">Rolls the dice - Generates a random Number in the range of 1 - 6</div>
  168. <dl class="notes">
  169. <dt>Returns:</dt>
  170. <dd>value of the dice</dd>
  171. </dl>
  172. </section>
  173. </li>
  174. <li>
  175. <section class="detail" id="checkGameWin(java.util.ArrayList)">
  176. <h3>checkGameWin</h3>
  177. <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>
  178. <div class="block">Checks if a Player has won the game with the current play</div>
  179. <dl class="notes">
  180. <dt>Parameters:</dt>
  181. <dd><code>figures</code> - figures of the current Player</dd>
  182. <dt>Returns:</dt>
  183. <dd>true if Player has won</dd>
  184. </dl>
  185. </section>
  186. </li>
  187. <li>
  188. <section class="detail" id="checkFigureInBase(java.util.ArrayList)">
  189. <h3>checkFigureInBase</h3>
  190. <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>
  191. <div class="block">Checks if the Player has figures in the base (off gameboard)</div>
  192. <dl class="notes">
  193. <dt>Parameters:</dt>
  194. <dd><code>figures</code> - figures of the current Player</dd>
  195. <dt>Returns:</dt>
  196. <dd>true if there is at least one figure in the base (off gameboard)</dd>
  197. </dl>
  198. </section>
  199. </li>
  200. <li>
  201. <section class="detail" id="choose(java.util.ArrayList)">
  202. <h3>choose</h3>
  203. <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>
  204. <div class="block">Get the user input on witch figure the user wants to move</div>
  205. <dl class="notes">
  206. <dt>Parameters:</dt>
  207. <dd><code>usableFigures</code> - list of usable Figures to choose from</dd>
  208. <dt>Returns:</dt>
  209. <dd>int figid of the figure chosen</dd>
  210. </dl>
  211. </section>
  212. </li>
  213. </ul>
  214. </section>
  215. </li>
  216. </ul>
  217. </section>
  218. <!-- ========= END OF CLASS DATA ========= -->
  219. </main>
  220. </div>
  221. </div>
  222. </body>
  223. </html>