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.

272 lines
18 KiB

3 years ago
  1. <!DOCTYPE HTML>
  2. <html lang="de">
  3. <head>
  4. <!-- Generated by javadoc (17) on Mon Feb 14 22:10:54 CET 2022 -->
  5. <title>Game</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-14">
  9. <meta name="description" content="declaration: class: Game">
  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 Game" class="title">Class Game</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">Game</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">Game</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()" class="member-name-link">Game</a>()</code></div>
  91. <div class="col-last even-row-color">&nbsp;</div>
  92. </div>
  93. </section>
  94. </li>
  95. <!-- ========== METHOD SUMMARY =========== -->
  96. <li>
  97. <section class="method-summary" id="method-summary">
  98. <h2>Method Summary</h2>
  99. <div id="method-summary-table">
  100. <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-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static 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>
  101. <div id="method-summary-table.tabpanel" role="tabpanel">
  102. <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
  103. <div class="table-header col-first">Modifier and Type</div>
  104. <div class="table-header col-second">Method</div>
  105. <div class="table-header col-last">Description</div>
  106. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
  107. <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkDice(int,Player,int)" class="member-name-link">checkDice</a><wbr>(int&nbsp;dice,
  108. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  109. int&nbsp;countRolls)</code></div>
  110. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  111. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  112. <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#checkFieldClear(int,Player,Game)" class="member-name-link">checkFieldClear</a><wbr>(int&nbsp;posToCheck,
  113. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  114. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</code></div>
  115. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  116. <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
  117. <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#figureIsUsable(int,int,Player,Game)" class="member-name-link">figureIsUsable</a><wbr>(int&nbsp;dice,
  118. int&nbsp;figId,
  119. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  120. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</code></div>
  121. <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  122. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><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;</code></div>
  123. <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUsableFigures(int,Player,Game)" class="member-name-link">getUsableFigures</a><wbr>(int&nbsp;dice,
  124. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  125. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</code></div>
  126. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  127. <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
  128. <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#main(java.lang.String%5B%5D)" class="member-name-link">main</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;args)</code></div>
  129. <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
  130. <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
  131. <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setFigure(int,int,Player,Game)" class="member-name-link">setFigure</a><wbr>(int&nbsp;figId,
  132. int&nbsp;dice,
  133. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  134. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</code></div>
  135. <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="inherited-list">
  140. <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>
  141. <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>
  142. </section>
  143. </li>
  144. </ul>
  145. </section>
  146. <section class="details">
  147. <ul class="details-list">
  148. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  149. <li>
  150. <section class="constructor-details" id="constructor-detail">
  151. <h2>Constructor Details</h2>
  152. <ul class="member-list">
  153. <li>
  154. <section class="detail" id="&lt;init&gt;()">
  155. <h3>Game</h3>
  156. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Game</span>()</div>
  157. </section>
  158. </li>
  159. </ul>
  160. </section>
  161. </li>
  162. <!-- ============ METHOD DETAIL ========== -->
  163. <li>
  164. <section class="method-details" id="method-detail">
  165. <h2>Method Details</h2>
  166. <ul class="member-list">
  167. <li>
  168. <section class="detail" id="main(java.lang.String[])">
  169. <h3>main</h3>
  170. <div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">main</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;args)</span>
  171. throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/InterruptedException.html" title="class or interface in java.lang" class="external-link">InterruptedException</a></span></div>
  172. <dl class="notes">
  173. <dt>Throws:</dt>
  174. <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/InterruptedException.html" title="class or interface in java.lang" class="external-link">InterruptedException</a></code></dd>
  175. </dl>
  176. </section>
  177. </li>
  178. <li>
  179. <section class="detail" id="checkDice(int,Player,int)">
  180. <h3>checkDice</h3>
  181. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">checkDice</span><wbr><span class="parameters">(int&nbsp;dice,
  182. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  183. int&nbsp;countRolls)</span></div>
  184. <dl class="notes">
  185. <dt>Parameters:</dt>
  186. <dd><code>dice</code> - Value of dice got from rolldice()</dd>
  187. <dd><code>p</code> - active Player</dd>
  188. <dd><code>countRolls</code> - Counter how often the Player already rolled the dice</dd>
  189. <dt>Returns:</dt>
  190. <dd>true if Player can roll the dice another time</dd>
  191. </dl>
  192. </section>
  193. </li>
  194. <li>
  195. <section class="detail" id="checkFieldClear(int,Player,Game)">
  196. <h3>checkFieldClear</h3>
  197. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">checkFieldClear</span><wbr><span class="parameters">(int&nbsp;posToCheck,
  198. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  199. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</span></div>
  200. <dl class="notes">
  201. <dt>Parameters:</dt>
  202. <dd><code>posToCheck</code> - Target position to check</dd>
  203. <dd><code>p</code> - active Player</dd>
  204. <dd><code>g</code> - game instance</dd>
  205. <dt>Returns:</dt>
  206. <dd>2 - own Player 1 - another Player 0 - Field clear</dd>
  207. </dl>
  208. </section>
  209. </li>
  210. <li>
  211. <section class="detail" id="getUsableFigures(int,Player,Game)">
  212. <h3>getUsableFigures</h3>
  213. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><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;</span>&nbsp;<span class="element-name">getUsableFigures</span><wbr><span class="parameters">(int&nbsp;dice,
  214. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  215. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</span></div>
  216. <dl class="notes">
  217. <dt>Parameters:</dt>
  218. <dd><code>dice</code> - Value of dice got from rolldice()</dd>
  219. <dd><code>p</code> - active Player</dd>
  220. <dd><code>g</code> - game instance</dd>
  221. <dt>Returns:</dt>
  222. <dd>List of int with figIds the Player can choose from</dd>
  223. </dl>
  224. </section>
  225. </li>
  226. <li>
  227. <section class="detail" id="figureIsUsable(int,int,Player,Game)">
  228. <h3>figureIsUsable</h3>
  229. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">figureIsUsable</span><wbr><span class="parameters">(int&nbsp;dice,
  230. int&nbsp;figId,
  231. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  232. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</span></div>
  233. <dl class="notes">
  234. <dt>Parameters:</dt>
  235. <dd><code>dice</code> - Value of dice got from rolldice()</dd>
  236. <dd><code>figId</code> - id of figure to check</dd>
  237. <dd><code>p</code> - active Player</dd>
  238. <dd><code>g</code> - game instance</dd>
  239. <dt>Returns:</dt>
  240. <dd>true if figure is usable</dd>
  241. </dl>
  242. </section>
  243. </li>
  244. <li>
  245. <section class="detail" id="setFigure(int,int,Player,Game)">
  246. <h3>setFigure</h3>
  247. <div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">setFigure</span><wbr><span class="parameters">(int&nbsp;figId,
  248. int&nbsp;dice,
  249. <a href="Player.html" title="class in Unnamed Package">Player</a>&nbsp;p,
  250. <a href="Game.html" title="class in Unnamed Package">Game</a>&nbsp;g)</span></div>
  251. <dl class="notes">
  252. <dt>Parameters:</dt>
  253. <dd><code>figId</code> - id of figure to check</dd>
  254. <dd><code>dice</code> - Value of dice got from rolldice()</dd>
  255. <dd><code>p</code> - active Player</dd>
  256. <dd><code>g</code> - game instance</dd>
  257. <dt>Returns:</dt>
  258. <dd>0 if no figure kicked. 1 if another figure was kicked</dd>
  259. </dl>
  260. </section>
  261. </li>
  262. </ul>
  263. </section>
  264. </li>
  265. </ul>
  266. </section>
  267. <!-- ========= END OF CLASS DATA ========= -->
  268. </main>
  269. </div>
  270. </div>
  271. </body>
  272. </html>