Livraison
BIN
livraison/dist/BattleShip.jar
vendored
Normal file
208
livraison/doc/allclasses-index.html
Normal file
@ -0,0 +1,208 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>All Classes</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="class index">
|
||||
<meta name="generator" content="javadoc/AllClassesIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="all-classes-index-page">
|
||||
<script type="text/javascript">var data = {"i0":2,"i1":2,"i2":2,"i3":4,"i4":2,"i5":2,"i6":2,"i7":2,"i8":1,"i9":2,"i10":2,"i11":2,"i12":2,"i13":2,"i14":1,"i15":2,"i16":2,"i17":2,"i18":2};
|
||||
var tabs = {65535:["t0","All Classes"],1:["t1","Interface Summary"],2:["t2","Class Summary"],4:["t3","Enum Summary"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="All&nbsp;Classes" class="title">All Classes</h1>
|
||||
</div>
|
||||
<div class="type-summary" id="all-classes-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="all-classes-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Classes</button><button role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table-tab" onclick="show(1);">Interface Summary</button><button role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Class Summary</button><button role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Enum Summary</button></div>
|
||||
<div id="all-classes-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Abstract player class see <a href="battleship/model/player/Player.html" title="interface in battleship.model.player"><code>Player</code></a> to know more about this code organisation</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Abstract view class</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><a href="battleship/model/player/Computer.html" title="class in battleship.model.player">Computer</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Computer super class, all player object which use an algorithm to calculate coordinates to use should extend from
|
||||
this object.</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></td>
|
||||
<th class="col-last" scope="row"> </th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><a href="battleship/model/Game.html" title="class in battleship.model">Game</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Main game class</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><a href="battleship/model/player/Human.html" title="class in battleship.model.player">Human</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">This object do nothing itself, it just an interface to know the type of player (Human or not),
|
||||
each view interact with the player with its methods</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><a href="battleship/Main.html" title="class in battleship">Main</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Main class
|
||||
Given arguments are importants, please give attention to <a href="battleship/Main.html#parseArgs(java.lang.String%5B%5D)"><code>Main.parseArgs(String[])</code></a> about this</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a><<a href="battleship/utils/Pair.html" title="type parameter in Pair">U</a>,​<a href="battleship/utils/Pair.html" title="type parameter in Pair">K</a>></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">tuple containing 2 generic type elements</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Player interface, used as an API.</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i9">
|
||||
<td class="col-first"><a href="battleship/model/player/Random.html" title="class in battleship.model.player">Random</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">place its ship and choose moves randomly</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i10">
|
||||
<td class="col-first"><a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">player's ship class</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i11">
|
||||
<td class="col-first"><a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Terminal view, instanced if argument 2 equals to "nogui"</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i12">
|
||||
<td class="col-first"><a href="battleship/control/TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></td>
|
||||
<th class="col-last" scope="row"> </th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i13">
|
||||
<td class="col-first"><a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a><<a href="battleship/utils/Triplet.html" title="type parameter in Triplet">U</a>,​<a href="battleship/utils/Triplet.html" title="type parameter in Triplet">K</a>,​<a href="battleship/utils/Triplet.html" title="type parameter in Triplet">V</a>></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">tuple containing 3 generic type elements</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i14">
|
||||
<td class="col-first"><a href="battleship/view/View.html" title="interface in battleship.view">View</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">View interface, used as an API</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i15">
|
||||
<td class="col-first"><a href="battleship/view/Window.html" title="class in battleship.view">Window</a></td>
|
||||
<th class="col-last" scope="row">
|
||||
<div class="block">Window view, instanced if argument 2 equals to "nogui"</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i16">
|
||||
<td class="col-first"><a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></td>
|
||||
<th class="col-last" scope="row"> </th>
|
||||
</tr>
|
||||
<tr class="row-color" id="i17">
|
||||
<td class="col-first"><a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></td>
|
||||
<th class="col-last" scope="row"> </th>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i18">
|
||||
<td class="col-first"><a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></td>
|
||||
<th class="col-last" scope="row"> </th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
129
livraison/doc/allpackages-index.html
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>All Packages</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="package index">
|
||||
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="all-packages-index-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="All&nbsp;Packages" class="title">All Packages</h1>
|
||||
</div>
|
||||
<div class="packages-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Package Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Package</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="battleship/package-summary.html">battleship</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains Main Class</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="battleship/control/package-summary.html">battleship.control</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains keyboard and mouse listeners</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="battleship/model/package-summary.html">battleship.model</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains all main Game classes</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="battleship/model/player/package-summary.html">battleship.model.player</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains all players classes instances and theirs super classes and interface</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="battleship/utils/package-summary.html">battleship.utils</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Utility classes</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="battleship/view/package-summary.html">battleship.view</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains terminal and windows view classes and theirs super class and interface</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
304
livraison/doc/battleship/Main.html
Normal file
@ -0,0 +1,304 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Main</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship, class: Main">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":9,"i1":9};
|
||||
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship</a></div>
|
||||
<h1 title="Class Main" class="title">Class Main</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.Main</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Main</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Main class
|
||||
Given arguments are importants, please give attention to <a href="#parseArgs(java.lang.String%5B%5D)"><code>parseArgs(String[])</code></a> about this</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="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>static <a href="model/Game.html" title="class in battleship.model">Game</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#game">game</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>static <a href="view/View.html" title="interface in battleship.view">View</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#view">view</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">Main</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table-tab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>static void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#main(java.lang.String%5B%5D)">main</a></span>​(java.lang.String[] args)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>private static void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#parseArgs(java.lang.String%5B%5D)">parseArgs</a></span>​(java.lang.String[] args)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Read and parse launch arguments.<br>
|
||||
launch arguments need to follow this syntax:<br></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="view">
|
||||
<h3>view</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="view/View.html" title="interface in battleship.view">View</a></span> <span class="member-name">view</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="game">
|
||||
<h3>game</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="model/Game.html" title="class in battleship.model">Game</a></span> <span class="member-name">game</span></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="<init>()">
|
||||
<h3>Main</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Main</span>()</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="main(java.lang.String[])">
|
||||
<h3>main</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="member-name">main</span>​(<span class="parameters">java.lang.String[] args)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="parseArgs(java.lang.String[])">
|
||||
<h3>parseArgs</h3>
|
||||
<div class="member-signature"><span class="modifiers">private static</span> <span class="return-type">void</span> <span class="member-name">parseArgs</span>​(<span class="parameters">java.lang.String[] args)</span>
|
||||
throws <span class="exceptions">java.lang.NoSuchMethodException,
|
||||
java.lang.IllegalAccessException,
|
||||
java.lang.reflect.InvocationTargetException,
|
||||
java.lang.InstantiationException</span></div>
|
||||
<div class="block"><p>Read and parse launch arguments.<br>
|
||||
launch arguments need to follow this syntax:<br></p>
|
||||
<p><strong><code><player1_instance> <player2_instance> [nogui]</code></strong></p>
|
||||
<p><strong><arg></strong> -> mandatory parameter<br>
|
||||
<strong>[arg]</strong> -> optional parameter<br>
|
||||
player_instance values are: <strong>"Human"</strong> or <strong>"Random"</strong><br>
|
||||
nogui to launch the game in terminal or nothing to launch in graphical interface</p></div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>args</code> - launch arguments</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.NoSuchMethodException</code> - reflect exception</dd>
|
||||
<dd><code>java.lang.IllegalAccessException</code> - reflect exception</dd>
|
||||
<dd><code>java.lang.reflect.InvocationTargetException</code> - reflect exception</dd>
|
||||
<dd><code>java.lang.InstantiationException</code> - reflect exception</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
257
livraison/doc/battleship/control/TerminalKeyboardListener.html
Normal file
@ -0,0 +1,257 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>TerminalKeyboardListener</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.control, class: TerminalKeyboardListener">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.control</a></div>
|
||||
<h1 title="Class TerminalKeyboardListener" class="title">Class TerminalKeyboardListener</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.control.TerminalKeyboardListener</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">TerminalKeyboardListener</span>
|
||||
extends java.lang.Object</pre>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private java.util.Scanner</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#scanner">scanner</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(java.util.Scanner)">TerminalKeyboardListener</a></span>​(java.util.Scanner scanner)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardInput()">keyboardInput</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="scanner">
|
||||
<h3>scanner</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">java.util.Scanner</span> <span class="member-name">scanner</span></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="<init>(java.util.Scanner)">
|
||||
<h3>TerminalKeyboardListener</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">TerminalKeyboardListener</span>​(<span class="parameters">java.util.Scanner scanner)</span></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="keyboardInput()">
|
||||
<h3>keyboardInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">keyboardInput</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
318
livraison/doc/battleship/control/WindowKeyboardListener.html
Normal file
@ -0,0 +1,318 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>WindowKeyboardListener</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.control, class: WindowKeyboardListener">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.control</a></div>
|
||||
<h1 title="Class WindowKeyboardListener" class="title">Class WindowKeyboardListener</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.control.WindowKeyboardListener</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code>java.awt.event.KeyListener</code>, <code>java.util.EventListener</code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">WindowKeyboardListener</span>
|
||||
extends java.lang.Object
|
||||
implements java.awt.event.KeyListener</pre>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>char</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyTyped">keyTyped</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyTypedArrow">keyTypedArrow</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#requestInput">requestInput</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">WindowKeyboardListener</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyPressed(java.awt.event.KeyEvent)">keyPressed</a></span>​(java.awt.event.KeyEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyReleased(java.awt.event.KeyEvent)">keyReleased</a></span>​(java.awt.event.KeyEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyTyped(java.awt.event.KeyEvent)">keyTyped</a></span>​(java.awt.event.KeyEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="requestInput">
|
||||
<h3>requestInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">requestInput</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyTyped">
|
||||
<h3>keyTyped</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">char</span> <span class="member-name">keyTyped</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyTypedArrow">
|
||||
<h3>keyTypedArrow</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">keyTypedArrow</span></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="<init>()">
|
||||
<h3>WindowKeyboardListener</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">WindowKeyboardListener</span>()</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="keyTyped(java.awt.event.KeyEvent)">
|
||||
<h3>keyTyped</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">keyTyped</span>​(<span class="parameters">java.awt.event.KeyEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>keyTyped</code> in interface <code>java.awt.event.KeyListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyPressed(java.awt.event.KeyEvent)">
|
||||
<h3>keyPressed</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">keyPressed</span>​(<span class="parameters">java.awt.event.KeyEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>keyPressed</code> in interface <code>java.awt.event.KeyListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyReleased(java.awt.event.KeyEvent)">
|
||||
<h3>keyReleased</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">keyReleased</span>​(<span class="parameters">java.awt.event.KeyEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>keyReleased</code> in interface <code>java.awt.event.KeyListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
359
livraison/doc/battleship/control/WindowMouseListener.html
Normal file
@ -0,0 +1,359 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>WindowMouseListener</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.control, class: WindowMouseListener">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.control</a></div>
|
||||
<h1 title="Class WindowMouseListener" class="title">Class WindowMouseListener</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.control.WindowMouseListener</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code>java.awt.event.MouseListener</code>, <code>java.util.EventListener</code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">WindowMouseListener</span>
|
||||
extends java.lang.Object
|
||||
implements java.awt.event.MouseListener</pre>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#lastInput">lastInput</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#playerIdLastInput">playerIdLastInput</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#requestInput">requestInput</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private <a href="../view/Window.html" title="class in battleship.view">Window</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#window">window</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.view.Window)">WindowMouseListener</a></span>​(<a href="../view/Window.html" title="class in battleship.view">Window</a> view)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseClicked(java.awt.event.MouseEvent)">mouseClicked</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseEntered(java.awt.event.MouseEvent)">mouseEntered</a></span>​(java.awt.event.MouseEvent ignored)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseExited(java.awt.event.MouseEvent)">mouseExited</a></span>​(java.awt.event.MouseEvent ignored)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mousePressed(java.awt.event.MouseEvent)">mousePressed</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseReleased(java.awt.event.MouseEvent)">mouseReleased</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="window">
|
||||
<h3>window</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="../view/Window.html" title="class in battleship.view">Window</a></span> <span class="member-name">window</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="requestInput">
|
||||
<h3>requestInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">requestInput</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="lastInput">
|
||||
<h3>lastInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">lastInput</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="playerIdLastInput">
|
||||
<h3>playerIdLastInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">playerIdLastInput</span></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="<init>(battleship.view.Window)">
|
||||
<h3>WindowMouseListener</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">WindowMouseListener</span>​(<span class="parameters"><a href="../view/Window.html" title="class in battleship.view">Window</a> view)</span></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="mouseClicked(java.awt.event.MouseEvent)">
|
||||
<h3>mouseClicked</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseClicked</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseClicked</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mousePressed(java.awt.event.MouseEvent)">
|
||||
<h3>mousePressed</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mousePressed</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mousePressed</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseReleased(java.awt.event.MouseEvent)">
|
||||
<h3>mouseReleased</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseReleased</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseReleased</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseEntered(java.awt.event.MouseEvent)">
|
||||
<h3>mouseEntered</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseEntered</span>​(<span class="parameters">java.awt.event.MouseEvent ignored)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseEntered</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseExited(java.awt.event.MouseEvent)">
|
||||
<h3>mouseExited</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseExited</span>​(<span class="parameters">java.awt.event.MouseEvent ignored)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseExited</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
114
livraison/doc/battleship/control/package-summary.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.control</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.control">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package battleship.control</h1>
|
||||
</div>
|
||||
<section class="package-description" id="package.description">
|
||||
<div class="block">Contains keyboard and mouse listeners</div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Class Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
96
livraison/doc/battleship/control/package-tree.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.control Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="tree: package: battleship.control">
|
||||
<meta name="generator" content="javadoc/PackageTreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package battleship.control</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../overview-tree.html">All Packages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.control.<a href="TerminalKeyboardListener.html" title="class in battleship.control"><span class="type-name-link">TerminalKeyboardListener</span></a></li>
|
||||
<li class="circle">battleship.control.<a href="WindowKeyboardListener.html" title="class in battleship.control"><span class="type-name-link">WindowKeyboardListener</span></a> (implements java.awt.event.KeyListener)</li>
|
||||
<li class="circle">battleship.control.<a href="WindowMouseListener.html" title="class in battleship.control"><span class="type-name-link">WindowMouseListener</span></a> (implements java.awt.event.MouseListener)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
448
livraison/doc/battleship/model/Direction.html
Normal file
@ -0,0 +1,448 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Direction</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model, enum: Direction">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9};
|
||||
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||||
<li><a href="#enum.constant.summary">Enum Constants</a> | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#enum.constant.detail">Enum Constants</a> | </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model</a></div>
|
||||
<h1 title="Enum Direction" class="title">Enum Direction</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">java.lang.Enum<<a href="Direction.html" title="enum in battleship.model">Direction</a>>
|
||||
<div class="inheritance">battleship.model.Direction</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code>java.io.Serializable</code>, <code>java.lang.Comparable<<a href="Direction.html" title="enum in battleship.model">Direction</a>></code>, <code>java.lang.constant.Constable</code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public enum <span class="type-name-label">Direction</span>
|
||||
extends java.lang.Enum<<a href="Direction.html" title="enum in battleship.model">Direction</a>></pre>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="nested-class-summary" id="nested.class.summary">
|
||||
<h2>Nested Class Summary</h2>
|
||||
<div class="inherited-list">
|
||||
<h2 id="nested.classes.inherited.from.class.java.lang.Enum">Nested classes/interfaces inherited from class java.lang.Enum</h2>
|
||||
<code>java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="constants-summary" id="enum.constant.summary">
|
||||
<h2>Enum Constant Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Enum Constants</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Enum Constant</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><code><span class="member-name-link"><a href="#DEFAULT">DEFAULT</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><code><span class="member-name-link"><a href="#DOWN">DOWN</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><code><span class="member-name-link"><a href="#LEFT">LEFT</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><code><span class="member-name-link"><a href="#RIGHT">RIGHT</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><code><span class="member-name-link"><a href="#UP">UP</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#arrow">arrow</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private <a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#direction">direction</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyword">keyword</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier</th>
|
||||
<th class="col-second" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private </code></td>
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.utils.Pair,java.lang.String,int)">Direction</a></span>​(<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> ukPair,
|
||||
java.lang.String keyword,
|
||||
int arrow)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table-tab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getArrow()">getArrow</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getDirection()">getDirection</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getKeyword()">getKeyword</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>static <a href="Direction.html" title="enum in battleship.model">Direction</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#valueOf(java.lang.String)">valueOf</a></span>​(java.lang.String name)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Returns the enum constant of this type with the specified name.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>static <a href="Direction.html" title="enum in battleship.model">Direction</a>[]</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#values()">values</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Returns an array containing the constants of this enum type, in
|
||||
the order they are declared.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Enum">Methods inherited from class java.lang.Enum</h3>
|
||||
<code>clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>getClass, notify, notifyAll, wait, wait, wait</code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ============ ENUM CONSTANT DETAIL =========== -->
|
||||
<li>
|
||||
<section class="constant-details" id="enum.constant.detail">
|
||||
<h2>Enum Constant Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="RIGHT">
|
||||
<h3>RIGHT</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">RIGHT</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="LEFT">
|
||||
<h3>LEFT</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">LEFT</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="UP">
|
||||
<h3>UP</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">UP</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="DOWN">
|
||||
<h3>DOWN</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">DOWN</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="DEFAULT">
|
||||
<h3>DEFAULT</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">DEFAULT</span></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ============ FIELD DETAIL =========== -->
|
||||
<li>
|
||||
<section class="field-details" id="field.detail">
|
||||
<h2>Field Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="direction">
|
||||
<h3>direction</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">direction</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyword">
|
||||
<h3>keyword</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">java.lang.String</span> <span class="member-name">keyword</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="arrow">
|
||||
<h3>arrow</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">int</span> <span class="member-name">arrow</span></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="<init>(battleship.utils.Pair,java.lang.String,int)">
|
||||
<h3>Direction</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="member-name">Direction</span>​(<span class="parameters"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> ukPair,
|
||||
java.lang.String keyword,
|
||||
int arrow)</span></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="values()">
|
||||
<h3>values</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a>[]</span> <span class="member-name">values</span>()</div>
|
||||
<div class="block">Returns an array containing the constants of this enum type, in
|
||||
the order they are declared.</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>an array containing the constants of this enum type, in the order they are declared</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="valueOf(java.lang.String)">
|
||||
<h3>valueOf</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">valueOf</span>​(<span class="parameters">java.lang.String name)</span></div>
|
||||
<div class="block">Returns the enum constant of this type with the specified name.
|
||||
The string must match <i>exactly</i> an identifier used to declare an
|
||||
enum constant in this type. (Extraneous whitespace characters are
|
||||
not permitted.)</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>name</code> - the name of the enum constant to be returned.</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>the enum constant with the specified name</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no constant with the specified name</dd>
|
||||
<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getDirection()">
|
||||
<h3>getDirection</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">getDirection</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getKeyword()">
|
||||
<h3>getKeyword</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">getKeyword</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getArrow()">
|
||||
<h3>getArrow</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">getArrow</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||||
<li><a href="#enum.constant.summary">Enum Constants</a> | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#enum.constant.detail">Enum Constants</a> | </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
367
livraison/doc/battleship/model/Game.html
Normal file
@ -0,0 +1,367 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Game</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model, class: Game">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model</a></div>
|
||||
<h1 title="Class Game" class="title">Class Game</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.model.Game</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Game</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Main game class</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="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code><a href="player/Player.html" title="interface in battleship.model.player">Player</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#currentPlayer">currentPlayer</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code><a href="player/Player.html" title="interface in battleship.model.player">Player</a>[]</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#players">players</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.model.player.Player%5B%5D)">Game</a></span>​(<a href="player/Player.html" title="interface in battleship.model.player">Player</a>[] players)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#changeCurrentPlayer()">changeCurrentPlayer</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#checkDrownedShips()">checkDrownedShips</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Update ship to know if they're drowned</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code><a href="player/Player.html" title="interface in battleship.model.player">Player</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getCurrentPlayer()">getCurrentPlayer</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code><a href="player/Player.html" title="interface in battleship.model.player">Player</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getOtherPlayer()">getOtherPlayer</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code><a href="player/Player.html" title="interface in battleship.model.player">Player</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getOtherPlayer(battleship.model.player.Player)">getOtherPlayer</a></span>​(<a href="player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code><a href="player/Player.html" title="interface in battleship.model.player">Player</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getWinner()">getWinner</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#move(battleship.utils.Pair)">move</a></span>​(<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> move)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Play the selected move from current player in grid</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#Play(battleship.view.View)">Play</a></span>​(<a href="../view/View.html" title="interface in battleship.view">View</a> view)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">game loop</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="member-signature"><span class="modifiers">public final</span> <span class="return-type"><a href="player/Player.html" title="interface in battleship.model.player">Player</a>[]</span> <span class="member-name">players</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="currentPlayer">
|
||||
<h3>currentPlayer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="player/Player.html" title="interface in battleship.model.player">Player</a></span> <span class="member-name">currentPlayer</span></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="<init>(battleship.model.player.Player[])">
|
||||
<h3>Game</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Game</span>​(<span class="parameters"><a href="player/Player.html" title="interface in battleship.model.player">Player</a>[] players)</span></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="getCurrentPlayer()">
|
||||
<h3>getCurrentPlayer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="player/Player.html" title="interface in battleship.model.player">Player</a></span> <span class="member-name">getCurrentPlayer</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getOtherPlayer()">
|
||||
<h3>getOtherPlayer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="player/Player.html" title="interface in battleship.model.player">Player</a></span> <span class="member-name">getOtherPlayer</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getOtherPlayer(battleship.model.player.Player)">
|
||||
<h3>getOtherPlayer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="player/Player.html" title="interface in battleship.model.player">Player</a></span> <span class="member-name">getOtherPlayer</span>​(<span class="parameters"><a href="player/Player.html" title="interface in battleship.model.player">Player</a> player)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="changeCurrentPlayer()">
|
||||
<h3>changeCurrentPlayer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">changeCurrentPlayer</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="checkDrownedShips()">
|
||||
<h3>checkDrownedShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">checkDrownedShips</span>()</div>
|
||||
<div class="block">Update ship to know if they're drowned</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getWinner()">
|
||||
<h3>getWinner</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="player/Player.html" title="interface in battleship.model.player">Player</a></span> <span class="member-name">getWinner</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>player 1 if player 2' ships are drowned, or player 2 if player1' ships are drowned, null otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="move(battleship.utils.Pair)">
|
||||
<h3>move</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">move</span>​(<span class="parameters"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> move)</span></div>
|
||||
<div class="block">Play the selected move from current player in grid</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>move</code> - selected player move</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="Play(battleship.view.View)">
|
||||
<h3>Play</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">Play</span>​(<span class="parameters"><a href="../view/View.html" title="interface in battleship.view">View</a> view)</span></div>
|
||||
<div class="block">game loop</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>view</code> - can be <a href="../view/Terminal.html" title="class in battleship.view"><code>Terminal</code></a> or <a href="../view/Window.html" title="class in battleship.view"><code>Window</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
445
livraison/doc/battleship/model/Ship.html
Normal file
@ -0,0 +1,445 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Ship</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model, class: Ship">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model</a></div>
|
||||
<h1 title="Class Ship" class="title">Class Ship</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.model.Ship</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Ship</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">player's ship class</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="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#coords">coords</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">base coordinates of the ship</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private <a href="Direction.html" title="enum in battleship.model">Direction</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#direction">direction</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>(package private) <a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>[]</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#fullCoords">fullCoords</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ship full coordinates calculate thank to base coordinates, direction and size</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#isDrown">isDrown</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">if true the ship is destroyed</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#size">size</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ship size</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.utils.Pair,int,battleship.model.Direction)">Ship</a></span>​(<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> coords,
|
||||
int size,
|
||||
<a href="Direction.html" title="enum in battleship.model">Direction</a> direction)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getCoords()">getCoords</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code><a href="Direction.html" title="enum in battleship.model">Direction</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getDirection()">getDirection</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>[]</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getFullCoords()">getFullCoords</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getSize()">getSize</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#isDrown()">isDrown</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#recalculateFullCoords()">recalculateFullCoords</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">recalculate all coords based on this base coords, direction and size</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setCoords(battleship.utils.Pair)">setCoords</a></span>​(<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> c)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setDirection(battleship.model.Direction)">setDirection</a></span>​(<a href="Direction.html" title="enum in battleship.model">Direction</a> d)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setDrown()">setDrown</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">set <a href="#isDrown"><code>isDrown</code></a> to true</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i9">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#toString()">toString</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i10">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#updateIsDrown(battleship.model.player.Player)">updateIsDrown</a></span>​(<a href="player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">update value <a href="#isDrown"><code>isDrown</code></a> to true if <code>player</code> hit all of ship boxes</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</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="coords">
|
||||
<h3>coords</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">coords</span></div>
|
||||
<div class="block">base coordinates of the ship</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="size">
|
||||
<h3>size</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">int</span> <span class="member-name">size</span></div>
|
||||
<div class="block">ship size</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="fullCoords">
|
||||
<h3>fullCoords</h3>
|
||||
<div class="member-signature"><span class="modifiers">final</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>[]</span> <span class="member-name">fullCoords</span></div>
|
||||
<div class="block">ship full coordinates calculate thank to base coordinates, direction and size</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="direction">
|
||||
<h3>direction</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">direction</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="isDrown">
|
||||
<h3>isDrown</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="member-name">isDrown</span></div>
|
||||
<div class="block">if true the ship is destroyed</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="<init>(battleship.utils.Pair,int,battleship.model.Direction)">
|
||||
<h3>Ship</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Ship</span>​(<span class="parameters"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> coords,
|
||||
int size,
|
||||
<a href="Direction.html" title="enum in battleship.model">Direction</a> direction)</span></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="setDirection(battleship.model.Direction)">
|
||||
<h3>setDirection</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setDirection</span>​(<span class="parameters"><a href="Direction.html" title="enum in battleship.model">Direction</a> d)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setCoords(battleship.utils.Pair)">
|
||||
<h3>setCoords</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setCoords</span>​(<span class="parameters"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> c)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setDrown()">
|
||||
<h3>setDrown</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setDrown</span>()</div>
|
||||
<div class="block">set <a href="#isDrown"><code>isDrown</code></a> to true</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="isDrown()">
|
||||
<h3>isDrown</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">isDrown</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getSize()">
|
||||
<h3>getSize</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">getSize</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getDirection()">
|
||||
<h3>getDirection</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">getDirection</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getCoords()">
|
||||
<h3>getCoords</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">getCoords</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="recalculateFullCoords()">
|
||||
<h3>recalculateFullCoords</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">recalculateFullCoords</span>()</div>
|
||||
<div class="block">recalculate all coords based on this base coords, direction and size</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getFullCoords()">
|
||||
<h3>getFullCoords</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>[]</span> <span class="member-name">getFullCoords</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="toString()">
|
||||
<h3>toString</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">toString</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="updateIsDrown(battleship.model.player.Player)">
|
||||
<h3>updateIsDrown</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">updateIsDrown</span>​(<span class="parameters"><a href="player/Player.html" title="interface in battleship.model.player">Player</a> player)</span></div>
|
||||
<div class="block">update value <a href="#isDrown"><code>isDrown</code></a> to true if <code>player</code> hit all of ship boxes</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - the opponent of this ship owner</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
133
livraison/doc/battleship/model/package-summary.html
Normal file
@ -0,0 +1,133 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.model</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package battleship.model</h1>
|
||||
</div>
|
||||
<section class="package-description" id="package.description">
|
||||
<div class="block">Contains all main Game classes</div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Class Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Game.html" title="class in battleship.model">Game</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Main game class</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="Ship.html" title="class in battleship.model">Ship</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">player's ship class</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Enum Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Enum</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Direction.html" title="enum in battleship.model">Direction</a></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
109
livraison/doc/battleship/model/package-tree.html
Normal file
@ -0,0 +1,109 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.model Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="tree: package: battleship.model">
|
||||
<meta name="generator" content="javadoc/PackageTreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package battleship.model</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../overview-tree.html">All Packages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.model.<a href="Game.html" title="class in battleship.model"><span class="type-name-link">Game</span></a></li>
|
||||
<li class="circle">battleship.model.<a href="Ship.html" title="class in battleship.model"><span class="type-name-link">Ship</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Enum Hierarchy">Enum Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">java.lang.Enum<E> (implements java.lang.Comparable<T>, java.lang.constant.Constable, java.io.Serializable)
|
||||
<ul>
|
||||
<li class="circle">battleship.model.<a href="Direction.html" title="enum in battleship.model"><span class="type-name-link">Direction</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
465
livraison/doc/battleship/model/player/AbstractPlayer.html
Normal file
@ -0,0 +1,465 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>AbstractPlayer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model.player, class: AbstractPlayer">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model.player</a></div>
|
||||
<h1 title="Class AbstractPlayer" class="title">Class AbstractPlayer</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.model.player.AbstractPlayer</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
<dl class="notes">
|
||||
<dt>Direct Known Subclasses:</dt>
|
||||
<dd><code><a href="Computer.html" title="class in battleship.model.player">Computer</a></code>, <code><a href="Human.html" title="class in battleship.model.player">Human</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public abstract class <span class="type-name-label">AbstractPlayer</span>
|
||||
extends java.lang.Object
|
||||
implements <a href="Player.html" title="interface in battleship.model.player">Player</a></pre>
|
||||
<div class="block">Abstract player class see <a href="Player.html" title="interface in battleship.model.player"><code>Player</code></a> to know more about this code organisation</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Player.html" title="interface in battleship.model.player"><code>Player</code></a>,
|
||||
<a href="Human.html" title="class in battleship.model.player"><code>Human</code></a>,
|
||||
<a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a>,
|
||||
<a href="Random.html" title="class in battleship.model.player"><code>Random</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#id">id</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>(package private) java.util.ArrayList<<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#moves">moves</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">reference every shot on the opponent board, left and middle side of the Triplet reference the coordinates and the
|
||||
right side if this move hit or not an opponent ship</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>(package private) java.util.ArrayList<<a href="../Ship.html" title="class in battleship.model">Ship</a>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#ships">ships</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.Player">Fields inherited from interface battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a></h3>
|
||||
<code><a href="Player.html#shipSize">shipSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">AbstractPlayer</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#addMove(battleship.utils.Triplet)">addMove</a></span>​(<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean> move)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">add <code>move</code> to the <a href="#moves"><code>moves</code></a> list</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#areValid(int,int)">areValid</a></span>​(int x,
|
||||
int y)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">check if coordinates from <a href="../../view/View.html#chooseMove(battleship.model.player.Player)"><code>View.chooseMove(Player)</code></a>are in valids position</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getId()">getId</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>java.util.ArrayList<<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getMoves()">getMoves</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>java.util.ArrayList<<a href="../Ship.html" title="class in battleship.model">Ship</a>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getShips()">getShips</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setId(int)">setId</a></span>​(int i)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setShips(battleship.model.Ship)">setShips</a></span>​(<a href="../Ship.html" title="class in battleship.model">Ship</a> ship)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">check if ship position and direction are valides and does not overlap on other vessels
|
||||
add the ship to player <a href="#ships"><code>ships</code></a> list and return <code>true</code> if valid
|
||||
<code>false</code> otherwise</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#toString()">toString</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><code>java.util.ArrayList<<a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#validMoves()">validMoves</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">give a list of the player possible moves, used in <a href="Player.html#chooseMove()"><code>Player.chooseMove()</code></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.model.player.Player">Methods inherited from interface battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a></h3>
|
||||
<code><a href="Player.html#chooseMove()">chooseMove</a>, <a href="Player.html#placeShips()">placeShips</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="ships">
|
||||
<h3>ships</h3>
|
||||
<div class="member-signature"><span class="modifiers">final</span> <span class="return-type">java.util.ArrayList<<a href="../Ship.html" title="class in battleship.model">Ship</a>></span> <span class="member-name">ships</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="moves">
|
||||
<h3>moves</h3>
|
||||
<div class="member-signature"><span class="modifiers">final</span> <span class="return-type">java.util.ArrayList<<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean>></span> <span class="member-name">moves</span></div>
|
||||
<div class="block">reference every shot on the opponent board, left and middle side of the Triplet reference the coordinates and the
|
||||
right side if this move hit or not an opponent ship</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="id">
|
||||
<h3>id</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">id</span></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="<init>()">
|
||||
<h3>AbstractPlayer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">AbstractPlayer</span>()</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="setShips(battleship.model.Ship)">
|
||||
<h3>setShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">setShips</span>​(<span class="parameters"><a href="../Ship.html" title="class in battleship.model">Ship</a> ship)</span></div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#setShips(battleship.model.Ship)">Player</a></code></span></div>
|
||||
<div class="block">check if ship position and direction are valides and does not overlap on other vessels
|
||||
add the ship to player <a href="#ships"><code>ships</code></a> list and return <code>true</code> if valid
|
||||
<code>false</code> otherwise</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#setShips(battleship.model.Ship)">setShips</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>ship</code> - the ship instance we check</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>true</code> if ship data are valids, <code>false</code> otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="addMove(battleship.utils.Triplet)">
|
||||
<h3>addMove</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">addMove</span>​(<span class="parameters"><a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean> move)</span></div>
|
||||
<div class="block">add <code>move</code> to the <a href="#moves"><code>moves</code></a> list</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#addMove(battleship.utils.Triplet)">addMove</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>move</code> - the move chosen by the player</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="validMoves()">
|
||||
<h3>validMoves</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.util.ArrayList<<a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>></span> <span class="member-name">validMoves</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#validMoves()">Player</a></code></span></div>
|
||||
<div class="block">give a list of the player possible moves, used in <a href="Player.html#chooseMove()"><code>Player.chooseMove()</code></a></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#validMoves()">validMoves</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>a list of playable move</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="areValid(int,int)">
|
||||
<h3>areValid</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">areValid</span>​(<span class="parameters">int x,
|
||||
int y)</span></div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#areValid(int,int)">Player</a></code></span></div>
|
||||
<div class="block">check if coordinates from <a href="../../view/View.html#chooseMove(battleship.model.player.Player)"><code>View.chooseMove(Player)</code></a>are in valids position</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#areValid(int,int)">areValid</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>x</code> - the x-axis of the coordinates</dd>
|
||||
<dd><code>y</code> - the y-axis of the coordinates</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>true</code> if valid, <code>false</code> otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setId(int)">
|
||||
<h3>setId</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setId</span>​(<span class="parameters">int i)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#setId(int)">setId</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getId()">
|
||||
<h3>getId</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">getId</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#getId()">getId</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="toString()">
|
||||
<h3>toString</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">toString</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getShips()">
|
||||
<h3>getShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.util.ArrayList<<a href="../Ship.html" title="class in battleship.model">Ship</a>></span> <span class="member-name">getShips</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#getShips()">getShips</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getMoves()">
|
||||
<h3>getMoves</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.util.ArrayList<<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean>></span> <span class="member-name">getMoves</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="Player.html#getMoves()">getMoves</a></code> in interface <code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
249
livraison/doc/battleship/model/player/Computer.html
Normal file
@ -0,0 +1,249 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Computer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model.player, class: Computer">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model.player</a></div>
|
||||
<h1 title="Class Computer" class="title">Class Computer</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance"><a href="AbstractPlayer.html" title="class in battleship.model.player">battleship.model.player.AbstractPlayer</a>
|
||||
<div class="inheritance">battleship.model.player.Computer</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
<dl class="notes">
|
||||
<dt>Direct Known Subclasses:</dt>
|
||||
<dd><code><a href="Random.html" title="class in battleship.model.player">Random</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public abstract class <span class="type-name-label">Computer</span>
|
||||
extends <a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></pre>
|
||||
<div class="block"><p>Computer super class, all player object which use an algorithm to calculate coordinates to use should extend from
|
||||
this object.</p>
|
||||
<p>Random is the only algorithm include here but another algorithm can be easily implemented</p></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="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.AbstractPlayer">Fields inherited from class battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></h3>
|
||||
<code><a href="AbstractPlayer.html#id">id</a>, <a href="AbstractPlayer.html#moves">moves</a>, <a href="AbstractPlayer.html#ships">ships</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.Player">Fields inherited from interface battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a></h3>
|
||||
<code><a href="Player.html#shipSize">shipSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">Computer</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#placeShipRandomly()">placeShipRandomly</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.model.player.AbstractPlayer">Methods inherited from class battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></h3>
|
||||
<code><a href="AbstractPlayer.html#addMove(battleship.utils.Triplet)">addMove</a>, <a href="AbstractPlayer.html#areValid(int,int)">areValid</a>, <a href="AbstractPlayer.html#getId()">getId</a>, <a href="AbstractPlayer.html#getMoves()">getMoves</a>, <a href="AbstractPlayer.html#getShips()">getShips</a>, <a href="AbstractPlayer.html#setId(int)">setId</a>, <a href="AbstractPlayer.html#setShips(battleship.model.Ship)">setShips</a>, <a href="AbstractPlayer.html#toString()">toString</a>, <a href="AbstractPlayer.html#validMoves()">validMoves</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.model.player.Player">Methods inherited from interface battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a></h3>
|
||||
<code><a href="Player.html#chooseMove()">chooseMove</a>, <a href="Player.html#placeShips()">placeShips</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor.detail">
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>()">
|
||||
<h3>Computer</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Computer</span>()</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="placeShipRandomly()">
|
||||
<h3>placeShipRandomly</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">placeShipRandomly</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
266
livraison/doc/battleship/model/player/Human.html
Normal file
@ -0,0 +1,266 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Human</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model.player, class: Human">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model.player</a></div>
|
||||
<h1 title="Class Human" class="title">Class Human</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance"><a href="AbstractPlayer.html" title="class in battleship.model.player">battleship.model.player.AbstractPlayer</a>
|
||||
<div class="inheritance">battleship.model.player.Human</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Human</span>
|
||||
extends <a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></pre>
|
||||
<div class="block">This object do nothing itself, it just an interface to know the type of player (Human or not),
|
||||
each view interact with the player with its methods</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="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.AbstractPlayer">Fields inherited from class battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></h3>
|
||||
<code><a href="AbstractPlayer.html#id">id</a>, <a href="AbstractPlayer.html#moves">moves</a>, <a href="AbstractPlayer.html#ships">ships</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.Player">Fields inherited from interface battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a></h3>
|
||||
<code><a href="Player.html#shipSize">shipSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">Human</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove()">chooseMove</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used by computer only</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#placeShips()">placeShips</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used by <a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.model.player.AbstractPlayer">Methods inherited from class battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></h3>
|
||||
<code><a href="AbstractPlayer.html#addMove(battleship.utils.Triplet)">addMove</a>, <a href="AbstractPlayer.html#areValid(int,int)">areValid</a>, <a href="AbstractPlayer.html#getId()">getId</a>, <a href="AbstractPlayer.html#getMoves()">getMoves</a>, <a href="AbstractPlayer.html#getShips()">getShips</a>, <a href="AbstractPlayer.html#setId(int)">setId</a>, <a href="AbstractPlayer.html#setShips(battleship.model.Ship)">setShips</a>, <a href="AbstractPlayer.html#toString()">toString</a>, <a href="AbstractPlayer.html#validMoves()">validMoves</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor.detail">
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>()">
|
||||
<h3>Human</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Human</span>()</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="chooseMove()">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#chooseMove()">Player</a></code></span></div>
|
||||
<div class="block">Used by computer only</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>coords in its opponent grid to play a move</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Random.html#chooseMove()"><code>Random.chooseMove()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="placeShips()">
|
||||
<h3>placeShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">placeShips</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#placeShips()">Player</a></code></span></div>
|
||||
<div class="block">Used by <a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
379
livraison/doc/battleship/model/player/Player.html
Normal file
@ -0,0 +1,379 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Player</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model.player, interface: Player">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model.player</a></div>
|
||||
<h1 title="Interface Player" class="title">Interface Player</h1>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Known Implementing Classes:</dt>
|
||||
<dd><code><a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></code>, <code><a href="Computer.html" title="class in battleship.model.player">Computer</a></code>, <code><a href="Human.html" title="class in battleship.model.player">Human</a></code>, <code><a href="Random.html" title="class in battleship.model.player">Random</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public interface <span class="type-name-label">Player</span></pre>
|
||||
<div class="block"><p>Player interface, used as an API.</p>
|
||||
<p>This model (interface -> abstract class(es) -> concrete classes) prevent hard code.</p>
|
||||
<p>This is the only object which interact with other object<br>
|
||||
Allows an outside person from the project to easily change the code or to add a view easily without modifying
|
||||
existing classes</p></div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="AbstractPlayer.html" title="class in battleship.model.player"><code>AbstractPlayer</code></a>,
|
||||
<a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a>,
|
||||
<a href="Human.html" title="class in battleship.model.player"><code>Human</code></a>,
|
||||
<a href="Random.html" title="class in battleship.model.player"><code>Random</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>static int[]</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#shipSize">shipSize</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#addMove(battleship.utils.Triplet)">addMove</a></span>​(<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean> move)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Adds coordinates of the <code>move</code> in the <a href="AbstractPlayer.html#moves"><code>AbstractPlayer.moves</code></a> list</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#areValid(int,int)">areValid</a></span>​(int x,
|
||||
int y)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">check if coordinates from <a href="../../view/View.html#chooseMove(battleship.model.player.Player)"><code>View.chooseMove(Player)</code></a>are in valids position</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code><a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove()">chooseMove</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used by computer only</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getId()">getId</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>java.util.ArrayList<<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getMoves()">getMoves</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>java.util.ArrayList<<a href="../Ship.html" title="class in battleship.model">Ship</a>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getShips()">getShips</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#placeShips()">placeShips</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used by <a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setId(int)">setId</a></span>​(int i)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setShips(battleship.model.Ship)">setShips</a></span>​(<a href="../Ship.html" title="class in battleship.model">Ship</a> ship)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">check if ship position and direction are valides and does not overlap on other vessels
|
||||
add the ship to player <a href="AbstractPlayer.html#ships"><code>AbstractPlayer.ships</code></a> list and return <code>true</code> if valid
|
||||
<code>false</code> otherwise</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i9">
|
||||
<td class="col-first"><code>java.util.ArrayList<<a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#validMoves()">validMoves</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">give a list of the player possible moves, used in <a href="#chooseMove()"><code>chooseMove()</code></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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="shipSize">
|
||||
<h3>shipSize</h3>
|
||||
<div class="member-signature"><span class="modifiers">static final</span> <span class="return-type">int[]</span> <span class="member-name">shipSize</span></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="chooseMove()">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="return-type"><a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>()</div>
|
||||
<div class="block">Used by computer only</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>coords in its opponent grid to play a move</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Random.html#chooseMove()"><code>Random.chooseMove()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setShips(battleship.model.Ship)">
|
||||
<h3>setShips</h3>
|
||||
<div class="member-signature"><span class="return-type">boolean</span> <span class="member-name">setShips</span>​(<span class="parameters"><a href="../Ship.html" title="class in battleship.model">Ship</a> ship)</span></div>
|
||||
<div class="block">check if ship position and direction are valides and does not overlap on other vessels
|
||||
add the ship to player <a href="AbstractPlayer.html#ships"><code>AbstractPlayer.ships</code></a> list and return <code>true</code> if valid
|
||||
<code>false</code> otherwise</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>ship</code> - the ship instance we check</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>true</code> if ship data are valids, <code>false</code> otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getId()">
|
||||
<h3>getId</h3>
|
||||
<div class="member-signature"><span class="return-type">int</span> <span class="member-name">getId</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="addMove(battleship.utils.Triplet)">
|
||||
<h3>addMove</h3>
|
||||
<div class="member-signature"><span class="return-type">void</span> <span class="member-name">addMove</span>​(<span class="parameters"><a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean> move)</span></div>
|
||||
<div class="block">Adds coordinates of the <code>move</code> in the <a href="AbstractPlayer.html#moves"><code>AbstractPlayer.moves</code></a> list</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>move</code> - the move chosen by the player</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setId(int)">
|
||||
<h3>setId</h3>
|
||||
<div class="member-signature"><span class="return-type">void</span> <span class="member-name">setId</span>​(<span class="parameters">int i)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="validMoves()">
|
||||
<h3>validMoves</h3>
|
||||
<div class="member-signature"><span class="return-type">java.util.ArrayList<<a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer>></span> <span class="member-name">validMoves</span>()</div>
|
||||
<div class="block">give a list of the player possible moves, used in <a href="#chooseMove()"><code>chooseMove()</code></a></div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>a list of playable move</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="placeShips()">
|
||||
<h3>placeShips</h3>
|
||||
<div class="member-signature"><span class="return-type">void</span> <span class="member-name">placeShips</span>()</div>
|
||||
<div class="block">Used by <a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="areValid(int,int)">
|
||||
<h3>areValid</h3>
|
||||
<div class="member-signature"><span class="return-type">boolean</span> <span class="member-name">areValid</span>​(<span class="parameters">int x,
|
||||
int y)</span></div>
|
||||
<div class="block">check if coordinates from <a href="../../view/View.html#chooseMove(battleship.model.player.Player)"><code>View.chooseMove(Player)</code></a>are in valids position</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>x</code> - the x-axis of the coordinates</dd>
|
||||
<dd><code>y</code> - the y-axis of the coordinates</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>true</code> if valid, <code>false</code> otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getShips()">
|
||||
<h3>getShips</h3>
|
||||
<div class="member-signature"><span class="return-type">java.util.ArrayList<<a href="../Ship.html" title="class in battleship.model">Ship</a>></span> <span class="member-name">getShips</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getMoves()">
|
||||
<h3>getMoves</h3>
|
||||
<div class="member-signature"><span class="return-type">java.util.ArrayList<<a href="../../utils/Triplet.html" title="class in battleship.utils">Triplet</a><java.lang.Integer,​java.lang.Integer,​java.lang.Boolean>></span> <span class="member-name">getMoves</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
270
livraison/doc/battleship/model/player/Random.html
Normal file
@ -0,0 +1,270 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Random</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model.player, class: Random">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.model.player</a></div>
|
||||
<h1 title="Class Random" class="title">Class Random</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance"><a href="AbstractPlayer.html" title="class in battleship.model.player">battleship.model.player.AbstractPlayer</a>
|
||||
<div class="inheritance"><a href="Computer.html" title="class in battleship.model.player">battleship.model.player.Computer</a>
|
||||
<div class="inheritance">battleship.model.player.Random</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="Player.html" title="interface in battleship.model.player">Player</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Random</span>
|
||||
extends <a href="Computer.html" title="class in battleship.model.player">Computer</a></pre>
|
||||
<div class="block">place its ship and choose moves randomly</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="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.AbstractPlayer">Fields inherited from class battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></h3>
|
||||
<code><a href="AbstractPlayer.html#id">id</a>, <a href="AbstractPlayer.html#moves">moves</a>, <a href="AbstractPlayer.html#ships">ships</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.model.player.Player">Fields inherited from interface battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a></h3>
|
||||
<code><a href="Player.html#shipSize">shipSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">Random</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove()">chooseMove</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used by computer only</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#placeShips()">placeShips</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used by <a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.model.player.Computer">Methods inherited from class battleship.model.player.<a href="Computer.html" title="class in battleship.model.player">Computer</a></h3>
|
||||
<code><a href="Computer.html#placeShipRandomly()">placeShipRandomly</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.model.player.AbstractPlayer">Methods inherited from class battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></h3>
|
||||
<code><a href="AbstractPlayer.html#addMove(battleship.utils.Triplet)">addMove</a>, <a href="AbstractPlayer.html#areValid(int,int)">areValid</a>, <a href="AbstractPlayer.html#getId()">getId</a>, <a href="AbstractPlayer.html#getMoves()">getMoves</a>, <a href="AbstractPlayer.html#getShips()">getShips</a>, <a href="AbstractPlayer.html#setId(int)">setId</a>, <a href="AbstractPlayer.html#setShips(battleship.model.Ship)">setShips</a>, <a href="AbstractPlayer.html#toString()">toString</a>, <a href="AbstractPlayer.html#validMoves()">validMoves</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor.detail">
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>()">
|
||||
<h3>Random</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Random</span>()</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="chooseMove()">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#chooseMove()">Player</a></code></span></div>
|
||||
<div class="block">Used by computer only</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>coords in its opponent grid to play a move</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#chooseMove()"><code>chooseMove()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="placeShips()">
|
||||
<h3>placeShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">placeShips</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a href="Player.html#placeShips()">Player</a></code></span></div>
|
||||
<div class="block">Used by <a href="Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
149
livraison/doc/battleship/model/player/package-summary.html
Normal file
@ -0,0 +1,149 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.model.player</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.model.player">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package battleship.model.player</h1>
|
||||
</div>
|
||||
<section class="package-description" id="package.description">
|
||||
<div class="block">Contains all players classes instances and theirs super classes and interface</div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Interface Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Interface</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Player.html" title="interface in battleship.model.player">Player</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Player interface, used as an API.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Class Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Abstract player class see <a href="Player.html" title="interface in battleship.model.player"><code>Player</code></a> to know more about this code organisation</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="Computer.html" title="class in battleship.model.player">Computer</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Computer super class, all player object which use an algorithm to calculate coordinates to use should extend from
|
||||
this object.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Human.html" title="class in battleship.model.player">Human</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">This object do nothing itself, it just an interface to know the type of player (Human or not),
|
||||
each view interact with the player with its methods</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="Random.html" title="class in battleship.model.player">Random</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">place its ship and choose moves randomly</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
109
livraison/doc/battleship/model/player/package-tree.html
Normal file
@ -0,0 +1,109 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.model.player Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="tree: package: battleship.model.player">
|
||||
<meta name="generator" content="javadoc/PackageTreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package battleship.model.player</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../../overview-tree.html">All Packages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="AbstractPlayer.html" title="class in battleship.model.player"><span class="type-name-link">AbstractPlayer</span></a> (implements battleship.model.player.<a href="Player.html" title="interface in battleship.model.player">Player</a>)
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="Computer.html" title="class in battleship.model.player"><span class="type-name-link">Computer</span></a>
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="Random.html" title="class in battleship.model.player"><span class="type-name-link">Random</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">battleship.model.player.<a href="Human.html" title="class in battleship.model.player"><span class="type-name-link">Human</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="Player.html" title="interface in battleship.model.player"><span class="type-name-link">Player</span></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
109
livraison/doc/battleship/package-summary.html
Normal file
@ -0,0 +1,109 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package battleship</h1>
|
||||
</div>
|
||||
<section class="package-description" id="package.description">
|
||||
<div class="block">Contains Main Class</div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Class Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Main.html" title="class in battleship">Main</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Main class
|
||||
Given arguments are importants, please give attention to <a href="Main.html#parseArgs(java.lang.String%5B%5D)"><code>Main.parseArgs(String[])</code></a> about this</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
94
livraison/doc/battleship/package-tree.html
Normal file
@ -0,0 +1,94 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="tree: package: battleship">
|
||||
<meta name="generator" content="javadoc/PackageTreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package battleship</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../overview-tree.html">All Packages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.<a href="Main.html" title="class in battleship"><span class="type-name-link">Main</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
332
livraison/doc/battleship/utils/Pair.html
Normal file
@ -0,0 +1,332 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Pair</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.utils, class: Pair">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.utils</a></div>
|
||||
<h1 title="Class Pair" class="title">Class Pair<U,​K></h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.utils.Pair<U,​K></div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>Type Parameters:</dt>
|
||||
<dd><code>U</code> - left</dd>
|
||||
<dd><code>K</code> - right</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Pair<U,​K></span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">tuple containing 2 generic type elements</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="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="Pair.html" title="type parameter in Pair">U</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#left">left</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private <a href="Pair.html" title="type parameter in Pair">K</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#right">right</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(U,K)">Pair</a></span>​(<a href="Pair.html" title="type parameter in Pair">U</a> left,
|
||||
<a href="Pair.html" title="type parameter in Pair">K</a> right)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#equals(java.lang.Object)">equals</a></span>​(java.lang.Object obj)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code><a href="Pair.html" title="type parameter in Pair">U</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getLeft()">getLeft</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code><a href="Pair.html" title="type parameter in Pair">K</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getRight()">getRight</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#hashCode()">hashCode</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#toString()">toString</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</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="left">
|
||||
<h3>left</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Pair.html" title="type parameter in Pair">U</a></span> <span class="member-name">left</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="right">
|
||||
<h3>right</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Pair.html" title="type parameter in Pair">K</a></span> <span class="member-name">right</span></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="<init>(U,K)">
|
||||
<h3 id="<init>(java.lang.Object,java.lang.Object)">Pair</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Pair</span>​(<span class="parameters"><a href="Pair.html" title="type parameter in Pair">U</a> left,
|
||||
<a href="Pair.html" title="type parameter in Pair">K</a> right)</span></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="getLeft()">
|
||||
<h3>getLeft</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Pair.html" title="type parameter in Pair">U</a></span> <span class="member-name">getLeft</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getRight()">
|
||||
<h3>getRight</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Pair.html" title="type parameter in Pair">K</a></span> <span class="member-name">getRight</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="equals(java.lang.Object)">
|
||||
<h3>equals</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">equals</span>​(<span class="parameters">java.lang.Object obj)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="hashCode()">
|
||||
<h3>hashCode</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">hashCode</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="toString()">
|
||||
<h3>toString</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">toString</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
369
livraison/doc/battleship/utils/Triplet.html
Normal file
@ -0,0 +1,369 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Triplet</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.utils, class: Triplet">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.utils</a></div>
|
||||
<h1 title="Class Triplet" class="title">Class Triplet<U,​K,​V></h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.utils.Triplet<U,​K,​V></div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>Type Parameters:</dt>
|
||||
<dd><code>U</code> - left</dd>
|
||||
<dd><code>K</code> - middle</dd>
|
||||
<dd><code>V</code> - right</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Triplet<U,​K,​V></span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">tuple containing 3 generic type elements</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="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="Triplet.html" title="type parameter in Triplet">U</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#left">left</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private <a href="Triplet.html" title="type parameter in Triplet">K</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#middle">middle</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="Triplet.html" title="type parameter in Triplet">V</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#right">right</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.utils.Pair,V)">Triplet</a></span>​(<a href="Pair.html" title="class in battleship.utils">Pair</a><<a href="Triplet.html" title="type parameter in Triplet">U</a>,​<a href="Triplet.html" title="type parameter in Triplet">K</a>> pair,
|
||||
<a href="Triplet.html" title="type parameter in Triplet">V</a> right)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(U,K,V)">Triplet</a></span>​(<a href="Triplet.html" title="type parameter in Triplet">U</a> left,
|
||||
<a href="Triplet.html" title="type parameter in Triplet">K</a> middle,
|
||||
<a href="Triplet.html" title="type parameter in Triplet">V</a> right)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#equals(java.lang.Object)">equals</a></span>​(java.lang.Object obj)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code><a href="Triplet.html" title="type parameter in Triplet">U</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getLeft()">getLeft</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code><a href="Triplet.html" title="type parameter in Triplet">K</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getMiddle()">getMiddle</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code><a href="Triplet.html" title="type parameter in Triplet">V</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getRight()">getRight</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#hashCode()">hashCode</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#toString()">toString</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</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="left">
|
||||
<h3>left</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Triplet.html" title="type parameter in Triplet">U</a></span> <span class="member-name">left</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="middle">
|
||||
<h3>middle</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Triplet.html" title="type parameter in Triplet">K</a></span> <span class="member-name">middle</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="right">
|
||||
<h3>right</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Triplet.html" title="type parameter in Triplet">V</a></span> <span class="member-name">right</span></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="<init>(U,K,V)">
|
||||
<h3 id="<init>(java.lang.Object,java.lang.Object,java.lang.Object)">Triplet</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Triplet</span>​(<span class="parameters"><a href="Triplet.html" title="type parameter in Triplet">U</a> left,
|
||||
<a href="Triplet.html" title="type parameter in Triplet">K</a> middle,
|
||||
<a href="Triplet.html" title="type parameter in Triplet">V</a> right)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="<init>(battleship.utils.Pair,V)">
|
||||
<h3 id="<init>(battleship.utils.Pair,java.lang.Object)">Triplet</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Triplet</span>​(<span class="parameters"><a href="Pair.html" title="class in battleship.utils">Pair</a><<a href="Triplet.html" title="type parameter in Triplet">U</a>,​<a href="Triplet.html" title="type parameter in Triplet">K</a>> pair,
|
||||
<a href="Triplet.html" title="type parameter in Triplet">V</a> right)</span></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="getLeft()">
|
||||
<h3>getLeft</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Triplet.html" title="type parameter in Triplet">U</a></span> <span class="member-name">getLeft</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getMiddle()">
|
||||
<h3>getMiddle</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Triplet.html" title="type parameter in Triplet">K</a></span> <span class="member-name">getMiddle</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getRight()">
|
||||
<h3>getRight</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Triplet.html" title="type parameter in Triplet">V</a></span> <span class="member-name">getRight</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="equals(java.lang.Object)">
|
||||
<h3>equals</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="member-name">equals</span>​(<span class="parameters">java.lang.Object obj)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="hashCode()">
|
||||
<h3>hashCode</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="member-name">hashCode</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="toString()">
|
||||
<h3>toString</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">toString</span>()</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
114
livraison/doc/battleship/utils/package-summary.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.utils</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.utils">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package battleship.utils</h1>
|
||||
</div>
|
||||
<section class="package-description" id="package.description">
|
||||
<div class="block">Utility classes</div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Class Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Pair.html" title="class in battleship.utils">Pair</a><U,​K></th>
|
||||
<td class="col-last">
|
||||
<div class="block">tuple containing 2 generic type elements</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="Triplet.html" title="class in battleship.utils">Triplet</a><U,​K,​V></th>
|
||||
<td class="col-last">
|
||||
<div class="block">tuple containing 3 generic type elements</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
95
livraison/doc/battleship/utils/package-tree.html
Normal file
@ -0,0 +1,95 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.utils Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="tree: package: battleship.utils">
|
||||
<meta name="generator" content="javadoc/PackageTreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package battleship.utils</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../overview-tree.html">All Packages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.utils.<a href="Pair.html" title="class in battleship.utils"><span class="type-name-link">Pair</span></a><U,​K></li>
|
||||
<li class="circle">battleship.utils.<a href="Triplet.html" title="class in battleship.utils"><span class="type-name-link">Triplet</span></a><U,​K,​V></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
524
livraison/doc/battleship/view/AbstractView.html
Normal file
@ -0,0 +1,524 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>AbstractView</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view, class: AbstractView">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":6,"i3":10,"i4":10,"i5":10,"i6":6,"i7":6,"i8":10,"i9":6,"i10":10,"i11":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.view</a></div>
|
||||
<h1 title="Class AbstractView" class="title">Class AbstractView</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.view.AbstractView</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
</dl>
|
||||
<dl class="notes">
|
||||
<dt>Direct Known Subclasses:</dt>
|
||||
<dd><code><a href="Terminal.html" title="class in battleship.view">Terminal</a></code>, <code><a href="Window.html" title="class in battleship.view">Window</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public abstract class <span class="type-name-label">AbstractView</span>
|
||||
extends java.lang.Object
|
||||
implements <a href="View.html" title="interface in battleship.view">View</a></pre>
|
||||
<div class="block">Abstract view class</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="View.html" title="interface in battleship.view"><code>View</code></a>,
|
||||
<a href="Window.html" title="class in battleship.view"><code>Window</code></a>,
|
||||
<a href="Terminal.html" title="class in battleship.view"><code>Terminal</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>protected <a href="../model/Game.html" title="class in battleship.model">Game</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#game">game</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.view.View">Fields inherited from interface battleship.view.<a href="View.html" title="interface in battleship.view">View</a></h3>
|
||||
<code><a href="View.html#shipsSize">shipsSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.model.Game)">AbstractView</a></span>​(<a href="../model/Game.html" title="class in battleship.model">Game</a> game)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove(battleship.model.player.Player)">chooseMove</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">used by <a href="../model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a> player to play a move in the grid depending of its algorithm</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>protected <a href="../model/Direction.html" title="enum in battleship.model">Direction</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getDirectionFromChar()">getDirectionFromChar</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask player for keyboard input and parse it into one of <a href="../model/Direction.html" title="enum in battleship.model"><code>Direction</code></a> value</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>protected abstract java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getKeyInput()">getKeyInput</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>private int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#isPositionDrowned(battleship.model.player.Player,battleship.model.Ship,battleship.utils.Pair)">isPositionDrowned</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> other,
|
||||
<a href="../model/Ship.html" title="class in battleship.model">Ship</a> ship,
|
||||
<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> pair)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>private int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#isPositionDrowned(battleship.model.player.Player,battleship.utils.Pair)">isPositionDrowned</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> other,
|
||||
<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> pair)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>private boolean</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#isShipPosition(battleship.model.Ship,battleship.utils.Pair)">isShipPosition</a></span>​(<a href="../model/Ship.html" title="class in battleship.model">Ship</a> ship,
|
||||
<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> boardsCoords)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>protected abstract java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardInput()">keyboardInput</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>protected abstract <a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseInput(battleship.model.player.Player)">mouseInput</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask <code>player</code> for mouse input</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setShips(battleship.model.player.Player)">setShips</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">used if <code>player</code> instance of <a href="../model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i9">
|
||||
<td class="col-first"><code>protected abstract void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setUpperText(java.lang.String)">setUpperText</a></span>​(java.lang.String s)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Display a text above the grid on <a href="Window.html" title="class in battleship.view"><code>Window</code></a>, simply print text on <a href="Terminal.html" title="class in battleship.view"><code>Terminal</code></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i10">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#toString()">toString</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Used during debugging, used in terminal to display grids too</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i11">
|
||||
<td class="col-first"><code>java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#toString(boolean)">toString</a></span>​(boolean debug)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.view.View">Methods inherited from interface battleship.view.<a href="View.html" title="interface in battleship.view">View</a></h3>
|
||||
<code><a href="View.html#displayBoard()">displayBoard</a>, <a href="View.html#displayWinner(battleship.model.player.Player)">displayWinner</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="game">
|
||||
<h3>game</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type"><a href="../model/Game.html" title="class in battleship.model">Game</a></span> <span class="member-name">game</span></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="<init>(battleship.model.Game)">
|
||||
<h3>AbstractView</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">AbstractView</span>​(<span class="parameters"><a href="../model/Game.html" title="class in battleship.model">Game</a> game)</span></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="toString()">
|
||||
<h3>toString</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">toString</span>()</div>
|
||||
<div class="block">Used during debugging, used in terminal to display grids too</div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>all player grids</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="toString(boolean)">
|
||||
<h3>toString</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">java.lang.String</span> <span class="member-name">toString</span>​(<span class="parameters">boolean debug)</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="isShipPosition(battleship.model.Ship,battleship.utils.Pair)">
|
||||
<h3>isShipPosition</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="member-name">isShipPosition</span>​(<span class="parameters"><a href="../model/Ship.html" title="class in battleship.model">Ship</a> ship,
|
||||
<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> boardsCoords)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>true</code> if <a href="../model/Ship.html#getFullCoords()"><code>Ship.getFullCoords()</code></a> contains <code>boardsCoords</code>, <code>false</code> otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getDirectionFromChar()">
|
||||
<h3>getDirectionFromChar</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../model/Direction.html" title="enum in battleship.model">Direction</a></span> <span class="member-name">getDirectionFromChar</span>()
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask player for keyboard input and parse it into one of <a href="../model/Direction.html" title="enum in battleship.model"><code>Direction</code></a> value</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>Direction depending of player input</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - caused by <a href="Window.html#getKeyInput()"><code>Window.getKeyInput()</code></a></dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#getDirectionFromChar()"><code>getDirectionFromChar()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="getKeyInput()">
|
||||
<h3>getKeyInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type">java.lang.String</span> <span class="member-name">getKeyInput</span>()
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>String given by player</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#getKeyInput()"><code>Window.getKeyInput()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setUpperText(java.lang.String)">
|
||||
<h3>setUpperText</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type">void</span> <span class="member-name">setUpperText</span>​(<span class="parameters">java.lang.String s)</span></div>
|
||||
<div class="block">Display a text above the grid on <a href="Window.html" title="class in battleship.view"><code>Window</code></a>, simply print text on <a href="Terminal.html" title="class in battleship.view"><code>Terminal</code></a></div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>s</code> - text to display</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#setUpperText(java.lang.String)"><code>Window.setUpperText(String)</code></a>,
|
||||
<a href="Terminal.html#setUpperText(java.lang.String)"><code>Terminal.setUpperText(String)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setShips(battleship.model.player.Player)">
|
||||
<h3>setShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setShips</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">used if <code>player</code> instance of <a href="../model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="View.html#setShips(battleship.model.player.Player)">setShips</a></code> in interface <code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - player we ask to set position of its ships</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#setShips(battleship.model.player.Player)"><code>Window.setShips(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="isPositionDrowned(battleship.model.player.Player,battleship.model.Ship,battleship.utils.Pair)">
|
||||
<h3>isPositionDrowned</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">int</span> <span class="member-name">isPositionDrowned</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> other,
|
||||
<a href="../model/Ship.html" title="class in battleship.model">Ship</a> ship,
|
||||
<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> pair)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>other</code> - other than the current player</dd>
|
||||
<dd><code>ship</code> - check if this ship at this position has been hit</dd>
|
||||
<dd><code>pair</code> - coords</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>1 if ship fully drowned, 2 if only damaged, 0 if not</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#isPositionDrowned(battleship.model.player.Player,battleship.utils.Pair)"><code>isPositionDrowned(Player, Pair)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="isPositionDrowned(battleship.model.player.Player,battleship.utils.Pair)">
|
||||
<h3>isPositionDrowned</h3>
|
||||
<div class="member-signature"><span class="modifiers">private</span> <span class="return-type">int</span> <span class="member-name">isPositionDrowned</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> other,
|
||||
<a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer> pair)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>other</code> - other than the current player</dd>
|
||||
<dd><code>pair</code> - coords to check</dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>2 if player already played here, 0 otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="chooseMove(battleship.model.player.Player)">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">used by <a href="../model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a> player to play a move in the grid depending of its algorithm</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="View.html#chooseMove(battleship.model.player.Player)">chooseMove</a></code> in interface <code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>a couple (<a href="../utils/Pair.html" title="class in battleship.utils"><code>Pair</code></a> containing the x and y coordinate (left side store Y and right side X)</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#chooseMove(battleship.model.player.Player)"><code>Window.chooseMove(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseInput(battleship.model.player.Player)">
|
||||
<h3>mouseInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">mouseInput</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask <code>player</code> for mouse input</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>coordinate of <code>player</code> opponent grid</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#mouseInput(battleship.model.player.Player)"><code>Window.mouseInput(Player)</code></a></dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#mouseInput(battleship.model.player.Player)"><code>Window.mouseInput(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyboardInput()">
|
||||
<h3>keyboardInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type">java.lang.String</span> <span class="member-name">keyboardInput</span>()
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>String given by player</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#keyboardInput()"><code>Window.keyboardInput()</code></a></dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#keyboardInput()"><code>Window.keyboardInput()</code></a>,
|
||||
<a href="Terminal.html#keyboardInput()"><code>Terminal.keyboardInput()</code></a>,
|
||||
<a href="Terminal.html#keyboardInputInteger()"><code>Terminal.keyboardInputInteger()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
480
livraison/doc/battleship/view/Terminal.html
Normal file
@ -0,0 +1,480 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Terminal</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view, class: Terminal">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.view</a></div>
|
||||
<h1 title="Class Terminal" class="title">Class Terminal</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance"><a href="AbstractView.html" title="class in battleship.view">battleship.view.AbstractView</a>
|
||||
<div class="inheritance">battleship.view.Terminal</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Terminal</span>
|
||||
extends <a href="AbstractView.html" title="class in battleship.view">AbstractView</a></pre>
|
||||
<div class="block">Terminal view, instanced if argument 2 equals to "nogui"</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="View.html" title="interface in battleship.view"><code>View</code></a>,
|
||||
<a href="AbstractView.html" title="class in battleship.view"><code>AbstractView</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="../control/TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardComponent">keyboardComponent</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>static java.util.Scanner</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#scanner">scanner</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.view.AbstractView">Fields inherited from class battleship.view.<a href="AbstractView.html" title="class in battleship.view">AbstractView</a></h3>
|
||||
<code><a href="AbstractView.html#game">game</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.view.View">Fields inherited from interface battleship.view.<a href="View.html" title="interface in battleship.view">View</a></h3>
|
||||
<code><a href="View.html#shipsSize">shipsSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.model.Game)">Terminal</a></span>​(<a href="../model/Game.html" title="class in battleship.model">Game</a> game)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove(battleship.model.player.Player)">chooseMove</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask player to choose a coords on its opponent grid, call <a href="AbstractView.html#chooseMove(battleship.model.player.Player)"><code>AbstractView.chooseMove(Player)</code></a> if instance of
|
||||
player is <a href="../model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a>
|
||||
if <code>player</code> isn't <a href="../model/player/Human.html" title="class in battleship.model.player"><code>Human</code></a> instance</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#displayBoard()">displayBoard</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">print board in terminal</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#displayWinner(battleship.model.player.Player)">displayWinner</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> winner)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">print grid, winner player and close scanner, game automatically close after this</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>protected java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getKeyInput()">getKeyInput</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>protected java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardInput()">keyboardInput</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>protected int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardInputInteger()">keyboardInputInteger</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>protected <a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseInput(battleship.model.player.Player)">mouseInput</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Never call in Terminal</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setShips(battleship.model.player.Player)">setShips</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><code>protected void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setUpperText(java.lang.String)">setUpperText</a></span>​(java.lang.String s)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">print string</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.view.AbstractView">Methods inherited from class battleship.view.<a href="AbstractView.html" title="class in battleship.view">AbstractView</a></h3>
|
||||
<code><a href="AbstractView.html#getDirectionFromChar()">getDirectionFromChar</a>, <a href="AbstractView.html#toString()">toString</a>, <a href="AbstractView.html#toString(boolean)">toString</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</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="scanner">
|
||||
<h3>scanner</h3>
|
||||
<div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">java.util.Scanner</span> <span class="member-name">scanner</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyboardComponent">
|
||||
<h3>keyboardComponent</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="../control/TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></span> <span class="member-name">keyboardComponent</span></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="<init>(battleship.model.Game)">
|
||||
<h3>Terminal</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Terminal</span>​(<span class="parameters"><a href="../model/Game.html" title="class in battleship.model">Game</a> game)</span></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="getKeyInput()">
|
||||
<h3>getKeyInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">java.lang.String</span> <span class="member-name">getKeyInput</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from class: <code><a href="AbstractView.html#getKeyInput()">AbstractView</a></code></span></div>
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#getKeyInput()">getKeyInput</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>given string in terminal</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setUpperText(java.lang.String)">
|
||||
<h3>setUpperText</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="member-name">setUpperText</span>​(<span class="parameters">java.lang.String s)</span></div>
|
||||
<div class="block">print string</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#setUpperText(java.lang.String)">setUpperText</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>s</code> - text to display</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#setUpperText(java.lang.String)"><code>Window.setUpperText(String)</code></a>,
|
||||
<a href="#setUpperText(java.lang.String)"><code>setUpperText(String)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setShips(battleship.model.player.Player)">
|
||||
<h3>setShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setShips</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="View.html#setShips(battleship.model.player.Player)">setShips</a></code> in interface <code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code><a href="AbstractView.html#setShips(battleship.model.player.Player)">setShips</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - player we ask to set position of its ships</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="AbstractView.html#getDirectionFromChar()"><code>AbstractView.getDirectionFromChar()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="displayBoard()">
|
||||
<h3>displayBoard</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">displayBoard</span>()</div>
|
||||
<div class="block">print board in terminal</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="chooseMove(battleship.model.player.Player)">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask player to choose a coords on its opponent grid, call <a href="AbstractView.html#chooseMove(battleship.model.player.Player)"><code>AbstractView.chooseMove(Player)</code></a> if instance of
|
||||
player is <a href="../model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a>
|
||||
if <code>player</code> isn't <a href="../model/player/Human.html" title="class in battleship.model.player"><code>Human</code></a> instance</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="View.html#chooseMove(battleship.model.player.Player)">chooseMove</a></code> in interface <code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code><a href="AbstractView.html#chooseMove(battleship.model.player.Player)">chooseMove</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>a element containing the x and y coordinate (left side store Y and right side X)</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="AbstractView.html#chooseMove(battleship.model.player.Player)"><code>AbstractView.chooseMove(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseInput(battleship.model.player.Player)">
|
||||
<h3>mouseInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">mouseInput</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span></div>
|
||||
<div class="block">Never call in Terminal</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#mouseInput(battleship.model.player.Player)">mouseInput</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd><code>null</code></dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#mouseInput(battleship.model.player.Player)"><code>Window.mouseInput(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyboardInput()">
|
||||
<h3>keyboardInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">java.lang.String</span> <span class="member-name">keyboardInput</span>()</div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from class: <code><a href="AbstractView.html#keyboardInput()">AbstractView</a></code></span></div>
|
||||
<div class="block">ask <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#keyboardInput()">keyboardInput</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>given string in terminal</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="../control/TerminalKeyboardListener.html#keyboardInput()"><code>TerminalKeyboardListener.keyboardInput()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyboardInputInteger()">
|
||||
<h3>keyboardInputInteger</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">int</span> <span class="member-name">keyboardInputInteger</span>()
|
||||
throws <span class="exceptions">java.lang.NumberFormatException</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Returns:</dt>
|
||||
<dd>convert string from keyboardInput() and convert it into an integer</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.NumberFormatException</code> - if given string can't be parse into an integer</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#keyboardInput()"><code>keyboardInput()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="displayWinner(battleship.model.player.Player)">
|
||||
<h3>displayWinner</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">displayWinner</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> winner)</span></div>
|
||||
<div class="block">print grid, winner player and close scanner, game automatically close after this</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>winner</code> - the winner of the game.</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#displayWinner(battleship.model.player.Player)"><code>Window.displayWinner(Player)</code></a>,
|
||||
<a href="#displayWinner(battleship.model.player.Player)"><code>displayWinner(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
295
livraison/doc/battleship/view/View.html
Normal file
@ -0,0 +1,295 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>View</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view, interface: View">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":6,"i1":6,"i2":6,"i3":6};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.view</a></div>
|
||||
<h1 title="Interface View" class="title">Interface View</h1>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Known Implementing Classes:</dt>
|
||||
<dd><code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code>, <code><a href="Terminal.html" title="class in battleship.view">Terminal</a></code>, <code><a href="Window.html" title="class in battleship.view">Window</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public interface <span class="type-name-label">View</span></pre>
|
||||
<div class="block"><p>View interface, used as an API</p>
|
||||
<p>This model (interface -> abstract class(es) -> concrete classes) prevent hard code.</p>
|
||||
<p>This is the only object which interact with other object<br>
|
||||
Allows an outside person easily change the code or add a view easily without modifying existing classes</p></div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="AbstractView.html" title="class in battleship.view"><code>AbstractView</code></a>,
|
||||
<a href="Terminal.html" title="class in battleship.view"><code>Terminal</code></a>,
|
||||
<a href="Window.html" title="class in battleship.view"><code>Window</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>static int[]</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#shipsSize">shipsSize</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove(battleship.model.player.Player)">chooseMove</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask the player the choose a position on its opponent grid</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#displayBoard()">displayBoard</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Display all grids</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#displayWinner(battleship.model.player.Player)">displayWinner</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> winner)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Display the winner of the game and then close the game</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setShips(battleship.model.player.Player)">setShips</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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="shipsSize">
|
||||
<h3>shipsSize</h3>
|
||||
<div class="member-signature"><span class="modifiers">static final</span> <span class="return-type">int[]</span> <span class="member-name">shipsSize</span></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="setShips(battleship.model.player.Player)">
|
||||
<h3>setShips</h3>
|
||||
<div class="member-signature"><span class="return-type">void</span> <span class="member-name">setShips</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - player instance we ask</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#setShips(battleship.model.player.Player)"><code>Window.setShips(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="displayBoard()">
|
||||
<h3>displayBoard</h3>
|
||||
<div class="member-signature"><span class="return-type">void</span> <span class="member-name">displayBoard</span>()</div>
|
||||
<div class="block">Display all grids</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="chooseMove(battleship.model.player.Player)">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask the player the choose a position on its opponent grid</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>a element containing the x and y coordinate (left side store Y and right side X)</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="Window.html#chooseMove(battleship.model.player.Player)"><code>Window.chooseMove(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="displayWinner(battleship.model.player.Player)">
|
||||
<h3>displayWinner</h3>
|
||||
<div class="member-signature"><span class="return-type">void</span> <span class="member-name">displayWinner</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> winner)</span></div>
|
||||
<div class="block">Display the winner of the game and then close the game</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>winner</code> - the winner of the game.</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="Window.html#displayWinner(battleship.model.player.Player)"><code>Window.displayWinner(Player)</code></a>,
|
||||
<a href="Terminal.html#displayWinner(battleship.model.player.Player)"><code>Terminal.displayWinner(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
321
livraison/doc/battleship/view/Window.Draw.html
Normal file
@ -0,0 +1,321 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Window.Draw</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view, class: Window, class: Draw">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.view</a></div>
|
||||
<h1 title="Class Window.Draw" class="title">Class Window.Draw</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">java.awt.Component
|
||||
<div class="inheritance">java.awt.Container
|
||||
<div class="inheritance">javax.swing.JComponent
|
||||
<div class="inheritance">javax.swing.JPanel
|
||||
<div class="inheritance">battleship.view.Window.Draw</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code>java.awt.image.ImageObserver</code>, <code>java.awt.MenuContainer</code>, <code>java.io.Serializable</code>, <code>javax.accessibility.Accessible</code></dd>
|
||||
</dl>
|
||||
<dl class="notes">
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="Window.html" title="class in battleship.view">Window</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>class <span class="type-name-label">Window.Draw</span>
|
||||
extends javax.swing.JPanel</pre>
|
||||
<div class="block">Panel where we paint the board</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><code>JPanel</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="nested-class-summary" id="nested.class.summary">
|
||||
<h2>Nested Class Summary</h2>
|
||||
<div class="inherited-list">
|
||||
<h2 id="nested.classes.inherited.from.class.javax.swing.JPanel">Nested classes/interfaces inherited from class javax.swing.JPanel</h2>
|
||||
<code>javax.swing.JPanel.AccessibleJPanel</code></div>
|
||||
<div class="inherited-list">
|
||||
<h2 id="nested.classes.inherited.from.class.javax.swing.JComponent">Nested classes/interfaces inherited from class javax.swing.JComponent</h2>
|
||||
<code>javax.swing.JComponent.AccessibleJComponent</code></div>
|
||||
<div class="inherited-list">
|
||||
<h2 id="nested.classes.inherited.from.class.java.awt.Container">Nested classes/interfaces inherited from class java.awt.Container</h2>
|
||||
<code>java.awt.Container.AccessibleAWTContainer</code></div>
|
||||
<div class="inherited-list">
|
||||
<h2 id="nested.classes.inherited.from.class.java.awt.Component">Nested classes/interfaces inherited from class java.awt.Component</h2>
|
||||
<code>java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy</code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="Window.html" title="class in battleship.view">Window</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#window">window</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.javax.swing.JComponent">Fields inherited from class javax.swing.JComponent</h3>
|
||||
<code>listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.java.awt.Component">Fields inherited from class java.awt.Component</h3>
|
||||
<code>accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.java.awt.image.ImageObserver">Fields inherited from interface java.awt.image.ImageObserver</h3>
|
||||
<code>ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH</code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.view.Window)">Draw</a></span>​(<a href="Window.html" title="class in battleship.view">Window</a> window)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#paintComponent(java.awt.Graphics)">paintComponent</a></span>​(java.awt.Graphics g)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.javax.swing.JPanel">Methods inherited from class javax.swing.JPanel</h3>
|
||||
<code>getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.javax.swing.JComponent">Methods inherited from class javax.swing.JComponent</h3>
|
||||
<code>addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.awt.Container">Methods inherited from class java.awt.Container</h3>
|
||||
<code>add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.awt.Component">Methods inherited from class java.awt.Component</h3>
|
||||
<code>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</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="window">
|
||||
<h3>window</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Window.html" title="class in battleship.view">Window</a></span> <span class="member-name">window</span></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="<init>(battleship.view.Window)">
|
||||
<h3>Draw</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Draw</span>​(<span class="parameters"><a href="Window.html" title="class in battleship.view">Window</a> window)</span></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="paintComponent(java.awt.Graphics)">
|
||||
<h3>paintComponent</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">paintComponent</span>​(<span class="parameters">java.awt.Graphics g)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code>paintComponent</code> in class <code>javax.swing.JComponent</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
603
livraison/doc/battleship/view/Window.html
Normal file
@ -0,0 +1,603 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Window</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view, class: Window">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.view</a></div>
|
||||
<h1 title="Class Window" class="title">Class Window</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance"><a href="AbstractView.html" title="class in battleship.view">battleship.view.AbstractView</a>
|
||||
<div class="inheritance">battleship.view.Window</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">Window</span>
|
||||
extends <a href="AbstractView.html" title="class in battleship.view">AbstractView</a></pre>
|
||||
<div class="block">Window view, instanced if argument 2 equals to "nogui"</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="View.html" title="interface in battleship.view"><code>View</code></a>,
|
||||
<a href="AbstractView.html" title="class in battleship.view"><code>AbstractView</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="nested-class-summary" id="nested.class.summary">
|
||||
<h2>Nested Class Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Nested Classes</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>(package private) class </code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="Window.Draw.html" title="class in battleship.view">Window.Draw</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Panel where we paint the board</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="field-summary" id="field.summary">
|
||||
<h2>Field Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Fields</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Field</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>(package private) javax.swing.JFrame</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#frame">frame</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#height">height</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">grids height, do no represent frame size</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>private <a href="../control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardComponent">keyboardComponent</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>private <a href="../control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseComponent">mouseComponent</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>(package private) java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#upperSubTitle">upperSubTitle</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code>(package private) java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#upperTitle">upperTitle</a></span></code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code>int</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#width">width</a></span></code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">grids width, do no represent frame size</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.view.AbstractView">Fields inherited from class battleship.view.<a href="AbstractView.html" title="class in battleship.view">AbstractView</a></h3>
|
||||
<code><a href="AbstractView.html#game">game</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="fields.inherited.from.class.battleship.view.View">Fields inherited from interface battleship.view.<a href="View.html" title="interface in battleship.view">View</a></h3>
|
||||
<code><a href="View.html#shipsSize">shipsSize</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E(battleship.model.Game)">Window</a></span>​(<a href="../model/Game.html" title="class in battleship.model">Game</a> game)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#chooseMove(battleship.model.player.Player)">chooseMove</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask player to choose a position in its opponent grid</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#displayBoard()">displayBoard</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">refresh windows to display updated content</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#displayWinner(battleship.model.player.Player)">displayWinner</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> winner)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">open a dialog to display the winner and exit the program when window is closed</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>protected java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#getKeyInput()">getKeyInput</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>protected java.lang.String</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#keyboardInput()">keyboardInput</a></span>()</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<td class="col-first"><code>protected <a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseInput(battleship.model.player.Player)">mouseInput</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">ask <code>player</code> for mouse input</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i6">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#openDialog(java.lang.String)">openDialog</a></span>​(java.lang.String message)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Open a window with <code>message</code> as content and with a "OK" button</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i7">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#openDialog(java.lang.String,boolean)">openDialog</a></span>​(java.lang.String message,
|
||||
boolean exitOnClose)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Open a window with <code>message</code> as content and with a "OK" button</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i8">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setShips(battleship.model.player.Player)">setShips</a></span>​(<a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i9">
|
||||
<td class="col-first"><code>protected void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#setUpperText(java.lang.String)">setUpperText</a></span>​(java.lang.String s)</code></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Display a text above the grid</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.battleship.view.AbstractView">Methods inherited from class battleship.view.<a href="AbstractView.html" title="class in battleship.view">AbstractView</a></h3>
|
||||
<code><a href="AbstractView.html#getDirectionFromChar()">getDirectionFromChar</a>, <a href="AbstractView.html#toString()">toString</a>, <a href="AbstractView.html#toString(boolean)">toString</a></code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</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="frame">
|
||||
<h3>frame</h3>
|
||||
<div class="member-signature"><span class="modifiers">final</span> <span class="return-type">javax.swing.JFrame</span> <span class="member-name">frame</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="height">
|
||||
<h3>height</h3>
|
||||
<div class="member-signature"><span class="modifiers">public final</span> <span class="return-type">int</span> <span class="member-name">height</span></div>
|
||||
<div class="block">grids height, do no represent frame size</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="../../constant-values.html#battleship.view.Window.height">Constant Field Values</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="width">
|
||||
<h3>width</h3>
|
||||
<div class="member-signature"><span class="modifiers">public final</span> <span class="return-type">int</span> <span class="member-name">width</span></div>
|
||||
<div class="block">grids width, do no represent frame size</div>
|
||||
<dl class="notes">
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="../../constant-values.html#battleship.view.Window.width">Constant Field Values</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseComponent">
|
||||
<h3>mouseComponent</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="../control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></span> <span class="member-name">mouseComponent</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyboardComponent">
|
||||
<h3>keyboardComponent</h3>
|
||||
<div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="../control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></span> <span class="member-name">keyboardComponent</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="upperTitle">
|
||||
<h3>upperTitle</h3>
|
||||
<div class="member-signature"><span class="return-type">java.lang.String</span> <span class="member-name">upperTitle</span></div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="upperSubTitle">
|
||||
<h3>upperSubTitle</h3>
|
||||
<div class="member-signature"><span class="return-type">java.lang.String</span> <span class="member-name">upperSubTitle</span></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="<init>(battleship.model.Game)">
|
||||
<h3>Window</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">Window</span>​(<span class="parameters"><a href="../model/Game.html" title="class in battleship.model">Game</a> game)</span></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="getKeyInput()">
|
||||
<h3>getKeyInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">java.lang.String</span> <span class="member-name">getKeyInput</span>()
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block"><span class="descfrm-type-label">Description copied from class: <code><a href="AbstractView.html#getKeyInput()">AbstractView</a></code></span></div>
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#getKeyInput()">getKeyInput</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>String given by player</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="#getKeyInput()"><code>getKeyInput()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setUpperText(java.lang.String)">
|
||||
<h3>setUpperText</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="member-name">setUpperText</span>​(<span class="parameters">java.lang.String s)</span></div>
|
||||
<div class="block">Display a text above the grid</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#setUpperText(java.lang.String)">setUpperText</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>s</code> - text to display</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#setUpperText(java.lang.String)"><code>setUpperText(String)</code></a>,
|
||||
<a href="Terminal.html#setUpperText(java.lang.String)"><code>Terminal.setUpperText(String)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="setShips(battleship.model.player.Player)">
|
||||
<h3>setShips</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">setShips</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="View.html#setShips(battleship.model.player.Player)">setShips</a></code> in interface <code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code><a href="AbstractView.html#setShips(battleship.model.player.Player)">setShips</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - player we ask</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="#mouseInput(battleship.model.player.Player)"><code>mouseInput(Player)</code></a> and <a href="AbstractView.html#getDirectionFromChar()"><code>AbstractView.getDirectionFromChar()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="keyboardInput()">
|
||||
<h3>keyboardInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">java.lang.String</span> <span class="member-name">keyboardInput</span>()
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#keyboardInput()">keyboardInput</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>String given by player</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - throw if this Thread is interrupted while <code>sleeping</code></dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#keyboardInput()"><code>keyboardInput()</code></a>,
|
||||
<a href="Terminal.html#keyboardInput()"><code>Terminal.keyboardInput()</code></a>,
|
||||
<a href="Terminal.html#keyboardInputInteger()"><code>Terminal.keyboardInputInteger()</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseInput(battleship.model.player.Player)">
|
||||
<h3>mouseInput</h3>
|
||||
<div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">mouseInput</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask <code>player</code> for mouse input</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="AbstractView.html#mouseInput(battleship.model.player.Player)">mouseInput</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>coordinate of <code>player</code> opponent grid</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - throw if this Thread is interrupted while <code>sleeping</code></dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#mouseInput(battleship.model.player.Player)"><code>mouseInput(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="openDialog(java.lang.String,boolean)">
|
||||
<h3>openDialog</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">openDialog</span>​(<span class="parameters">java.lang.String message,
|
||||
boolean exitOnClose)</span></div>
|
||||
<div class="block">Open a window with <code>message</code> as content and with a "OK" button</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>message</code> - message to display</dd>
|
||||
<dd><code>exitOnClose</code> - <code>true</code> if when user close this window, the program exit, <code>false</code> otherwise</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="openDialog(java.lang.String)">
|
||||
<h3>openDialog</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">openDialog</span>​(<span class="parameters">java.lang.String message)</span></div>
|
||||
<div class="block">Open a window with <code>message</code> as content and with a "OK" button</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>message</code> - message to display</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#openDialog(java.lang.String,boolean)"><code>openDialog(String, boolean)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="displayBoard()">
|
||||
<h3>displayBoard</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">displayBoard</span>()</div>
|
||||
<div class="block">refresh windows to display updated content</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="chooseMove(battleship.model.player.Player)">
|
||||
<h3>chooseMove</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../utils/Pair.html" title="class in battleship.utils">Pair</a><java.lang.Integer,​java.lang.Integer></span> <span class="member-name">chooseMove</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> player)</span>
|
||||
throws <span class="exceptions">java.lang.InterruptedException</span></div>
|
||||
<div class="block">ask player to choose a position in its opponent grid</div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code><a href="View.html#chooseMove(battleship.model.player.Player)">chooseMove</a></code> in interface <code><a href="View.html" title="interface in battleship.view">View</a></code></dd>
|
||||
<dt>Overrides:</dt>
|
||||
<dd><code><a href="AbstractView.html#chooseMove(battleship.model.player.Player)">chooseMove</a></code> in class <code><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></code></dd>
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>player</code> - <a href="../model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>a couple (<a href="../utils/Pair.html" title="class in battleship.utils"><code>Pair</code></a> containing the x and y coordinate (left side store Y and right side X)</dd>
|
||||
<dt>Throws:</dt>
|
||||
<dd><code>java.lang.InterruptedException</code> - see <a href="#mouseInput(battleship.model.player.Player)"><code>mouseInput(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="displayWinner(battleship.model.player.Player)">
|
||||
<h3>displayWinner</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">displayWinner</span>​(<span class="parameters"><a href="../model/player/Player.html" title="interface in battleship.model.player">Player</a> winner)</span></div>
|
||||
<div class="block">open a dialog to display the winner and exit the program when window is closed</div>
|
||||
<dl class="notes">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><code>winner</code> - the winner of the game.</dd>
|
||||
<dt>See Also:</dt>
|
||||
<dd><a href="#displayWinner(battleship.model.player.Player)"><code>displayWinner(Player)</code></a>,
|
||||
<a href="Terminal.html#displayWinner(battleship.model.player.Player)"><code>Terminal.displayWinner(Player)</code></a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.class.summary">Nested</a> | </li>
|
||||
<li><a href="#field.summary">Field</a> | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field.detail">Field</a> | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
287
livraison/doc/battleship/view/WindowListener.html
Normal file
@ -0,0 +1,287 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>WindowListener</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view, class: WindowListener">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "alt-color";
|
||||
var rowColor = "row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">battleship.view</a></div>
|
||||
<h1 title="Class WindowListener" class="title">Class WindowListener</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Inheritance Tree">java.lang.Object
|
||||
<div class="inheritance">battleship.view.WindowListener</div>
|
||||
</div>
|
||||
<section class="description">
|
||||
<dl class="notes">
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code>java.awt.event.MouseListener</code>, <code>java.util.EventListener</code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public class <span class="type-name-label">WindowListener</span>
|
||||
extends java.lang.Object
|
||||
implements java.awt.event.MouseListener</pre>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor.summary">
|
||||
<h2>Constructor Summary</h2>
|
||||
<div class="member-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Constructors</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Constructor</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-constructor-name" scope="row"><code><span class="member-name-link"><a href="#%3Cinit%3E()">WindowListener</a></span>()</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method.summary">
|
||||
<h2>Method Summary</h2>
|
||||
<div class="member-summary" id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Methods</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel">
|
||||
<table class="summary-table" aria-labelledby="t0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Method</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseClicked(java.awt.event.MouseEvent)">mouseClicked</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseEntered(java.awt.event.MouseEvent)">mouseEntered</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseExited(java.awt.event.MouseEvent)">mouseExited</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mousePressed(java.awt.event.MouseEvent)">mousePressed</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<td class="col-first"><code>void</code></td>
|
||||
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#mouseReleased(java.awt.event.MouseEvent)">mouseReleased</a></span>​(java.awt.event.MouseEvent e)</code></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor.detail">
|
||||
<h2>Constructor Details</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>()">
|
||||
<h3>WindowListener</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="member-name">WindowListener</span>()</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="mouseClicked(java.awt.event.MouseEvent)">
|
||||
<h3>mouseClicked</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseClicked</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseClicked</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mousePressed(java.awt.event.MouseEvent)">
|
||||
<h3>mousePressed</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mousePressed</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mousePressed</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseReleased(java.awt.event.MouseEvent)">
|
||||
<h3>mouseReleased</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseReleased</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseReleased</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseEntered(java.awt.event.MouseEvent)">
|
||||
<h3>mouseEntered</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseEntered</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseEntered</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="mouseExited(java.awt.event.MouseEvent)">
|
||||
<h3>mouseExited</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="member-name">mouseExited</span>​(<span class="parameters">java.awt.event.MouseEvent e)</span></div>
|
||||
<dl class="notes">
|
||||
<dt>Specified by:</dt>
|
||||
<dd><code>mouseExited</code> in interface <code>java.awt.event.MouseListener</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="nav-bar-cell1-rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
145
livraison/doc/battleship/view/package-summary.html
Normal file
@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.view</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="declaration: package: battleship.view">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package battleship.view</h1>
|
||||
</div>
|
||||
<section class="package-description" id="package.description">
|
||||
<div class="block">Contains terminal and windows view classes and theirs super class and interface</div>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Interface Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Interface</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="View.html" title="interface in battleship.view">View</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">View interface, used as an API</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="type-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>Class Summary</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Class</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="AbstractView.html" title="class in battleship.view">AbstractView</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Abstract view class</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="Terminal.html" title="class in battleship.view">Terminal</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Terminal view, instanced if argument 2 equals to "nogui"</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<th class="col-first" scope="row"><a href="Window.html" title="class in battleship.view">Window</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Window view, instanced if argument 2 equals to "nogui"</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<th class="col-first" scope="row"><a href="WindowListener.html" title="class in battleship.view">WindowListener</a></th>
|
||||
<td class="col-last"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li class="nav-bar-cell1-rev">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
123
livraison/doc/battleship/view/package-tree.html
Normal file
@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>battleship.view Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="tree: package: battleship.view">
|
||||
<meta name="generator" content="javadoc/PackageTreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="../../script.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "../../";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package battleship.view</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../overview-tree.html">All Packages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.view.<a href="AbstractView.html" title="class in battleship.view"><span class="type-name-link">AbstractView</span></a> (implements battleship.view.<a href="View.html" title="interface in battleship.view">View</a>)
|
||||
<ul>
|
||||
<li class="circle">battleship.view.<a href="Terminal.html" title="class in battleship.view"><span class="type-name-link">Terminal</span></a></li>
|
||||
<li class="circle">battleship.view.<a href="Window.html" title="class in battleship.view"><span class="type-name-link">Window</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
|
||||
<ul>
|
||||
<li class="circle">java.awt.Container
|
||||
<ul>
|
||||
<li class="circle">javax.swing.JComponent (implements java.io.Serializable)
|
||||
<ul>
|
||||
<li class="circle">javax.swing.JPanel (implements javax.accessibility.Accessible)
|
||||
<ul>
|
||||
<li class="circle">battleship.view.<a href="Window.Draw.html" title="class in battleship.view"><span class="type-name-link">Window.Draw</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">battleship.view.<a href="WindowListener.html" title="class in battleship.view"><span class="type-name-link">WindowListener</span></a> (implements java.awt.event.MouseListener)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">battleship.view.<a href="View.html" title="interface in battleship.view"><span class="type-name-link">View</span></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="../../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../index-all.html">Index</a></li>
|
||||
<li><a href="../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
117
livraison/doc/constant-values.html
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Constant Field Values</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="summary of constants">
|
||||
<meta name="generator" content="javadoc/ConstantsSummaryWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="constants-summary-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
|
||||
<section class="packages">
|
||||
<h2 title="Contents">Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#battleship.view">battleship.view.*</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<section class="constants-summary" id="battleship.view">
|
||||
<h2 title="battleship.view">battleship.view.*</h2>
|
||||
<ul class="block-list">
|
||||
<li>
|
||||
<div class="constants-summary">
|
||||
<table class="summary-table">
|
||||
<caption><span>battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Modifier and Type</th>
|
||||
<th class="col-second" scope="col">Constant Field</th>
|
||||
<th class="col-last" scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color">
|
||||
<td class="col-first"><code id="battleship.view.Window.height">public final int</code></td>
|
||||
<th class="col-second" scope="row"><code><a href="battleship/view/Window.html#height">height</a></code></th>
|
||||
<td class="col-last"><code>600</code></td>
|
||||
</tr>
|
||||
<tr class="row-color">
|
||||
<td class="col-first"><code id="battleship.view.Window.width">public final int</code></td>
|
||||
<th class="col-second" scope="row"><code><a href="battleship/view/Window.html#width">width</a></code></th>
|
||||
<td class="col-last"><code>1200</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
81
livraison/doc/deprecated-list.html
Normal file
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Deprecated List</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="deprecated elements">
|
||||
<meta name="generator" content="javadoc/DeprecatedListWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="deprecated-list-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li class="nav-bar-cell1-rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Deprecated API" class="title">Deprecated API</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li class="nav-bar-cell1-rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
6
livraison/doc/element-list
Normal file
@ -0,0 +1,6 @@
|
||||
battleship
|
||||
battleship.control
|
||||
battleship.model
|
||||
battleship.model.player
|
||||
battleship.utils
|
||||
battleship.view
|
181
livraison/doc/help-doc.html
Normal file
@ -0,0 +1,181 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>API Help</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="help">
|
||||
<meta name="generator" content="javadoc/HelpWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="help-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="nav-bar-cell1-rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">How This API Document Is Organized</h1>
|
||||
<div class="sub-title">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
|
||||
</div>
|
||||
<section class="help-section">
|
||||
<h2>Overview</h2>
|
||||
<p>The <a href="index.html">Overview</a> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</p>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Package</h2>
|
||||
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:</p>
|
||||
<ul class="help-section-list">
|
||||
<li>Interfaces</li>
|
||||
<li>Classes</li>
|
||||
<li>Enums</li>
|
||||
<li>Exceptions</li>
|
||||
<li>Errors</li>
|
||||
<li>Annotation Types</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Class or Interface</h2>
|
||||
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
|
||||
<ul class="help-section-list">
|
||||
<li>Class Inheritance Diagram</li>
|
||||
<li>Direct Subclasses</li>
|
||||
<li>All Known Subinterfaces</li>
|
||||
<li>All Known Implementing Classes</li>
|
||||
<li>Class or Interface Declaration</li>
|
||||
<li>Class or Interface Description</li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="help-section-list">
|
||||
<li>Nested Class Summary</li>
|
||||
<li>Field Summary</li>
|
||||
<li>Property Summary</li>
|
||||
<li>Constructor Summary</li>
|
||||
<li>Method Summary</li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="help-section-list">
|
||||
<li>Field Details</li>
|
||||
<li>Property Details</li>
|
||||
<li>Constructor Details</li>
|
||||
<li>Method Details</li>
|
||||
</ul>
|
||||
<p>The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Annotation Type</h2>
|
||||
<p>Each annotation type has its own separate page with the following sections:</p>
|
||||
<ul class="help-section-list">
|
||||
<li>Annotation Type Declaration</li>
|
||||
<li>Annotation Type Description</li>
|
||||
<li>Required Element Summary</li>
|
||||
<li>Optional Element Summary</li>
|
||||
<li>Element Details</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Enum</h2>
|
||||
<p>Each enum has its own separate page with the following sections:</p>
|
||||
<ul class="help-section-list">
|
||||
<li>Enum Declaration</li>
|
||||
<li>Enum Description</li>
|
||||
<li>Enum Constant Summary</li>
|
||||
<li>Enum Constant Details</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Tree (Class Hierarchy)</h2>
|
||||
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with <code>java.lang.Object</code>. Interfaces do not inherit from <code>java.lang.Object</code>.</p>
|
||||
<ul class="help-section-list">
|
||||
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
|
||||
<li>When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Deprecated API</h2>
|
||||
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Index</h2>
|
||||
<p>The <a href="index-all.html">Index</a> contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.</p>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Serialized Form</h2>
|
||||
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.</p>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Constant Field Values</h2>
|
||||
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
|
||||
</section>
|
||||
<section class="help-section">
|
||||
<h2>Search</h2>
|
||||
<p>You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:</p>
|
||||
<ul class="help-section-list">
|
||||
<li><code>j.l.obj</code> will match "java.lang.Object"</li>
|
||||
<li><code>InpStr</code> will match "java.io.InputStream"</li>
|
||||
<li><code>HM.cK</code> will match "java.util.HashMap.containsKey(Object)"</li>
|
||||
</ul>
|
||||
<p>Refer to <a href="https://docs.oracle.com/en/java/javase/15/docs/specs/javadoc/javadoc-search-spec.html">the Javadoc Search Specification</a> for a full description of search features.</p>
|
||||
</section>
|
||||
<hr>
|
||||
<span class="help-footnote">This help file applies to API documentation generated by the standard doclet.</span></main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="nav-bar-cell1-rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
697
livraison/doc/index-all.html
Normal file
@ -0,0 +1,697 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Index</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="index">
|
||||
<meta name="generator" content="javadoc/SingleIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="single-index-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li class="nav-bar-cell1-rev">Index</li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1>Index</h1>
|
||||
</div>
|
||||
<a href="#I:A">A</a> <a href="#I:B">B</a> <a href="#I:C">C</a> <a href="#I:D">D</a> <a href="#I:E">E</a> <a href="#I:F">F</a> <a href="#I:G">G</a> <a href="#I:H">H</a> <a href="#I:I">I</a> <a href="#I:K">K</a> <a href="#I:L">L</a> <a href="#I:M">M</a> <a href="#I:O">O</a> <a href="#I:P">P</a> <a href="#I:R">R</a> <a href="#I:S">S</a> <a href="#I:T">T</a> <a href="#I:U">U</a> <a href="#I:V">V</a> <a href="#I:W">W</a> <br><a href="allclasses-index.html">All Classes</a><span class="vertical-separator">|</span><a href="allpackages-index.html">All Packages</a>
|
||||
<h2 class="title" id="I:A">A</h2>
|
||||
<dl class="index">
|
||||
<dt><a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player"><span class="type-name-link">AbstractPlayer</span></a> - Class in <a href="battleship/model/player/package-summary.html">battleship.model.player</a></dt>
|
||||
<dd>
|
||||
<div class="block">Abstract player class see <a href="battleship/model/player/Player.html" title="interface in battleship.model.player"><code>Player</code></a> to know more about this code organisation</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#%3Cinit%3E()">AbstractPlayer()</a></span> - Constructor for class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/view/AbstractView.html" title="class in battleship.view"><span class="type-name-link">AbstractView</span></a> - Class in <a href="battleship/view/package-summary.html">battleship.view</a></dt>
|
||||
<dd>
|
||||
<div class="block">Abstract view class</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#%3Cinit%3E(battleship.model.Game)">AbstractView(Game)</a></span> - Constructor for class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#addMove(battleship.utils.Triplet)">addMove(Triplet<Integer, Integer, Boolean>)</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd>
|
||||
<div class="block">add <code>move</code> to the <a href="battleship/model/player/AbstractPlayer.html#moves"><code>AbstractPlayer.moves</code></a> list</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#addMove(battleship.utils.Triplet)">addMove(Triplet<Integer, Integer, Boolean>)</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd>
|
||||
<div class="block">Adds coordinates of the <code>move</code> in the <a href="battleship/model/player/AbstractPlayer.html#moves"><code>AbstractPlayer.moves</code></a> list</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#areValid(int,int)">areValid(int, int)</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#areValid(int,int)">areValid(int, int)</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd>
|
||||
<div class="block">check if coordinates from <a href="battleship/view/View.html#chooseMove(battleship.model.player.Player)"><code>View.chooseMove(Player)</code></a>are in valids position</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#arrow">arrow</a></span> - Variable in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:B">B</h2>
|
||||
<dl class="index">
|
||||
<dt><a href="battleship/package-summary.html">battleship</a> - package battleship</dt>
|
||||
<dd>
|
||||
<div class="block">Contains Main Class</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/control/package-summary.html">battleship.control</a> - package battleship.control</dt>
|
||||
<dd>
|
||||
<div class="block">Contains keyboard and mouse listeners</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/model/package-summary.html">battleship.model</a> - package battleship.model</dt>
|
||||
<dd>
|
||||
<div class="block">Contains all main Game classes</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/model/player/package-summary.html">battleship.model.player</a> - package battleship.model.player</dt>
|
||||
<dd>
|
||||
<div class="block">Contains all players classes instances and theirs super classes and interface</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/utils/package-summary.html">battleship.utils</a> - package battleship.utils</dt>
|
||||
<dd>
|
||||
<div class="block">Utility classes</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/view/package-summary.html">battleship.view</a> - package battleship.view</dt>
|
||||
<dd>
|
||||
<div class="block">Contains terminal and windows view classes and theirs super class and interface</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:C">C</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#changeCurrentPlayer()">changeCurrentPlayer()</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#checkDrownedShips()">checkDrownedShips()</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd>
|
||||
<div class="block">Update ship to know if they're drowned</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Human.html#chooseMove()">chooseMove()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/Human.html" title="class in battleship.model.player">Human</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#chooseMove()">chooseMove()</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd>
|
||||
<div class="block">Used by computer only</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Random.html#chooseMove()">chooseMove()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/Random.html" title="class in battleship.model.player">Random</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#chooseMove(battleship.model.player.Player)">chooseMove(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">used by <a href="battleship/model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a> player to play a move in the grid depending of its algorithm</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#chooseMove(battleship.model.player.Player)">chooseMove(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask player to choose a coords on its opponent grid, call <a href="battleship/view/AbstractView.html#chooseMove(battleship.model.player.Player)"><code>AbstractView.chooseMove(Player)</code></a> if instance of
|
||||
player is <a href="battleship/model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a>
|
||||
if <code>player</code> isn't <a href="battleship/model/player/Human.html" title="class in battleship.model.player"><code>Human</code></a> instance</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/View.html#chooseMove(battleship.model.player.Player)">chooseMove(Player)</a></span> - Method in interface battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view">View</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask the player the choose a position on its opponent grid</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#chooseMove(battleship.model.player.Player)">chooseMove(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask player to choose a position in its opponent grid</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/model/player/Computer.html" title="class in battleship.model.player"><span class="type-name-link">Computer</span></a> - Class in <a href="battleship/model/player/package-summary.html">battleship.model.player</a></dt>
|
||||
<dd>
|
||||
<div class="block">Computer super class, all player object which use an algorithm to calculate coordinates to use should extend from
|
||||
this object.</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Computer.html#%3Cinit%3E()">Computer()</a></span> - Constructor for class battleship.model.player.<a href="battleship/model/player/Computer.html" title="class in battleship.model.player">Computer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#coords">coords</a></span> - Variable in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">base coordinates of the ship</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#currentPlayer">currentPlayer</a></span> - Variable in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:D">D</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#DEFAULT">DEFAULT</a></span> - battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#direction">direction</a></span> - Variable in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#direction">direction</a></span> - Variable in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/model/Direction.html" title="enum in battleship.model"><span class="type-name-link">Direction</span></a> - Enum in <a href="battleship/model/package-summary.html">battleship.model</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#%3Cinit%3E(battleship.utils.Pair,java.lang.String,int)">Direction(Pair<Integer, Integer>, String, int)</a></span> - Constructor for enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#displayBoard()">displayBoard()</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd>
|
||||
<div class="block">print board in terminal</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/View.html#displayBoard()">displayBoard()</a></span> - Method in interface battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view">View</a></dt>
|
||||
<dd>
|
||||
<div class="block">Display all grids</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#displayBoard()">displayBoard()</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">refresh windows to display updated content</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#displayWinner(battleship.model.player.Player)">displayWinner(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd>
|
||||
<div class="block">print grid, winner player and close scanner, game automatically close after this</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/View.html#displayWinner(battleship.model.player.Player)">displayWinner(Player)</a></span> - Method in interface battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view">View</a></dt>
|
||||
<dd>
|
||||
<div class="block">Display the winner of the game and then close the game</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#displayWinner(battleship.model.player.Player)">displayWinner(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">open a dialog to display the winner and exit the program when window is closed</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#DOWN">DOWN</a></span> - battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.Draw.html#%3Cinit%3E(battleship.view.Window)">Draw(Window)</a></span> - Constructor for class battleship.view.<a href="battleship/view/Window.Draw.html" title="class in battleship.view">Window.Draw</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:E">E</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#equals(java.lang.Object)">equals(Object)</a></span> - Method in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#equals(java.lang.Object)">equals(Object)</a></span> - Method in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:F">F</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#frame">frame</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#fullCoords">fullCoords</a></span> - Variable in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">ship full coordinates calculate thank to base coordinates, direction and size</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:G">G</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/Main.html#game">game</a></span> - Static variable in class battleship.<a href="battleship/Main.html" title="class in battleship">Main</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#game">game</a></span> - Variable in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/model/Game.html" title="class in battleship.model"><span class="type-name-link">Game</span></a> - Class in <a href="battleship/model/package-summary.html">battleship.model</a></dt>
|
||||
<dd>
|
||||
<div class="block">Main game class</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#%3Cinit%3E(battleship.model.player.Player%5B%5D)">Game(Player[])</a></span> - Constructor for class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#getArrow()">getArrow()</a></span> - Method in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#getCoords()">getCoords()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#getCurrentPlayer()">getCurrentPlayer()</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#getDirection()">getDirection()</a></span> - Method in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#getDirection()">getDirection()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#getDirectionFromChar()">getDirectionFromChar()</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask player for keyboard input and parse it into one of <a href="battleship/model/Direction.html" title="enum in battleship.model"><code>Direction</code></a> value</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#getFullCoords()">getFullCoords()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#getId()">getId()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#getId()">getId()</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#getKeyInput()">getKeyInput()</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask player for keyboard input and return result</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#getKeyInput()">getKeyInput()</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#getKeyInput()">getKeyInput()</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#getKeyword()">getKeyword()</a></span> - Method in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#getLeft()">getLeft()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#getLeft()">getLeft()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#getMiddle()">getMiddle()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#getMoves()">getMoves()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#getMoves()">getMoves()</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#getOtherPlayer()">getOtherPlayer()</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#getOtherPlayer(battleship.model.player.Player)">getOtherPlayer(Player)</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#getRight()">getRight()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#getRight()">getRight()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#getShips()">getShips()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#getShips()">getShips()</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#getSize()">getSize()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#getWinner()">getWinner()</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:H">H</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#hashCode()">hashCode()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#hashCode()">hashCode()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#height">height</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">grids height, do no represent frame size</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/model/player/Human.html" title="class in battleship.model.player"><span class="type-name-link">Human</span></a> - Class in <a href="battleship/model/player/package-summary.html">battleship.model.player</a></dt>
|
||||
<dd>
|
||||
<div class="block">This object do nothing itself, it just an interface to know the type of player (Human or not),
|
||||
each view interact with the player with its methods</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Human.html#%3Cinit%3E()">Human()</a></span> - Constructor for class battleship.model.player.<a href="battleship/model/player/Human.html" title="class in battleship.model.player">Human</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:I">I</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#id">id</a></span> - Variable in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#isDrown">isDrown</a></span> - Variable in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">if true the ship is destroyed</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#isDrown()">isDrown()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#isPositionDrowned(battleship.model.player.Player,battleship.model.Ship,battleship.utils.Pair)">isPositionDrowned(Player, Ship, Pair<Integer, Integer>)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#isPositionDrowned(battleship.model.player.Player,battleship.utils.Pair)">isPositionDrowned(Player, Pair<Integer, Integer>)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#isShipPosition(battleship.model.Ship,battleship.utils.Pair)">isShipPosition(Ship, Pair<Integer, Integer>)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:K">K</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#keyboardComponent">keyboardComponent</a></span> - Variable in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#keyboardComponent">keyboardComponent</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/TerminalKeyboardListener.html#keyboardInput()">keyboardInput()</a></span> - Method in class battleship.control.<a href="battleship/control/TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#keyboardInput()">keyboardInput()</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask <a href="battleship/model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#keyboardInput()">keyboardInput()</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#keyboardInput()">keyboardInput()</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask <a href="battleship/model/Game.html#currentPlayer"><code>Game.currentPlayer</code></a> for keyboard input</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#keyboardInputInteger()">keyboardInputInteger()</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#keyPressed(java.awt.event.KeyEvent)">keyPressed(KeyEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#keyReleased(java.awt.event.KeyEvent)">keyReleased(KeyEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#keyTyped">keyTyped</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#keyTyped(java.awt.event.KeyEvent)">keyTyped(KeyEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#keyTypedArrow">keyTypedArrow</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#keyword">keyword</a></span> - Variable in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:L">L</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#lastInput">lastInput</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#left">left</a></span> - Variable in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#left">left</a></span> - Variable in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#LEFT">LEFT</a></span> - battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:M">M</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/Main.html#main(java.lang.String%5B%5D)">main(String[])</a></span> - Static method in class battleship.<a href="battleship/Main.html" title="class in battleship">Main</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/Main.html" title="class in battleship"><span class="type-name-link">Main</span></a> - Class in <a href="battleship/package-summary.html">battleship</a></dt>
|
||||
<dd>
|
||||
<div class="block">Main class
|
||||
Given arguments are importants, please give attention to <a href="battleship/Main.html#parseArgs(java.lang.String%5B%5D)"><code>Main.parseArgs(String[])</code></a> about this</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/Main.html#%3Cinit%3E()">Main()</a></span> - Constructor for class battleship.<a href="battleship/Main.html" title="class in battleship">Main</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#middle">middle</a></span> - Variable in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#mouseClicked(java.awt.event.MouseEvent)">mouseClicked(MouseEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/WindowListener.html#mouseClicked(java.awt.event.MouseEvent)">mouseClicked(MouseEvent)</a></span> - Method in class battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#mouseComponent">mouseComponent</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#mouseEntered(java.awt.event.MouseEvent)">mouseEntered(MouseEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/WindowListener.html#mouseEntered(java.awt.event.MouseEvent)">mouseEntered(MouseEvent)</a></span> - Method in class battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#mouseExited(java.awt.event.MouseEvent)">mouseExited(MouseEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/WindowListener.html#mouseExited(java.awt.event.MouseEvent)">mouseExited(MouseEvent)</a></span> - Method in class battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#mouseInput(battleship.model.player.Player)">mouseInput(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask <code>player</code> for mouse input</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#mouseInput(battleship.model.player.Player)">mouseInput(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd>
|
||||
<div class="block">Never call in Terminal</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#mouseInput(battleship.model.player.Player)">mouseInput(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">ask <code>player</code> for mouse input</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#mousePressed(java.awt.event.MouseEvent)">mousePressed(MouseEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/WindowListener.html#mousePressed(java.awt.event.MouseEvent)">mousePressed(MouseEvent)</a></span> - Method in class battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#mouseReleased(java.awt.event.MouseEvent)">mouseReleased(MouseEvent)</a></span> - Method in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/WindowListener.html#mouseReleased(java.awt.event.MouseEvent)">mouseReleased(MouseEvent)</a></span> - Method in class battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#move(battleship.utils.Pair)">move(Pair<Integer, Integer>)</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd>
|
||||
<div class="block">Play the selected move from current player in grid</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#moves">moves</a></span> - Variable in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd>
|
||||
<div class="block">reference every shot on the opponent board, left and middle side of the Triplet reference the coordinates and the
|
||||
right side if this move hit or not an opponent ship</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:O">O</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#openDialog(java.lang.String)">openDialog(String)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">Open a window with <code>message</code> as content and with a "OK" button</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#openDialog(java.lang.String,boolean)">openDialog(String, boolean)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">Open a window with <code>message</code> as content and with a "OK" button</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:P">P</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.Draw.html#paintComponent(java.awt.Graphics)">paintComponent(Graphics)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.Draw.html" title="class in battleship.view">Window.Draw</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/utils/Pair.html" title="class in battleship.utils"><span class="type-name-link">Pair</span></a><<a href="battleship/utils/Pair.html" title="type parameter in Pair">U</a>,​<a href="battleship/utils/Pair.html" title="type parameter in Pair">K</a>> - Class in <a href="battleship/utils/package-summary.html">battleship.utils</a></dt>
|
||||
<dd>
|
||||
<div class="block">tuple containing 2 generic type elements</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#%3Cinit%3E(U,K)">Pair(U, K)</a></span> - Constructor for class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/Main.html#parseArgs(java.lang.String%5B%5D)">parseArgs(String[])</a></span> - Static method in class battleship.<a href="battleship/Main.html" title="class in battleship">Main</a></dt>
|
||||
<dd>
|
||||
<div class="block">Read and parse launch arguments.<br>
|
||||
launch arguments need to follow this syntax:<br></div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Computer.html#placeShipRandomly()">placeShipRandomly()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/Computer.html" title="class in battleship.model.player">Computer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Human.html#placeShips()">placeShips()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/Human.html" title="class in battleship.model.player">Human</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#placeShips()">placeShips()</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd>
|
||||
<div class="block">Used by <a href="battleship/model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a> instances to place ships</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Random.html#placeShips()">placeShips()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/Random.html" title="class in battleship.model.player">Random</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#Play(battleship.view.View)">Play(View)</a></span> - Method in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd>
|
||||
<div class="block">game loop</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/model/player/Player.html" title="interface in battleship.model.player"><span class="type-name-link">Player</span></a> - Interface in <a href="battleship/model/player/package-summary.html">battleship.model.player</a></dt>
|
||||
<dd>
|
||||
<div class="block">Player interface, used as an API.</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#playerIdLastInput">playerIdLastInput</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Game.html#players">players</a></span> - Variable in class battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model">Game</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:R">R</h2>
|
||||
<dl class="index">
|
||||
<dt><a href="battleship/model/player/Random.html" title="class in battleship.model.player"><span class="type-name-link">Random</span></a> - Class in <a href="battleship/model/player/package-summary.html">battleship.model.player</a></dt>
|
||||
<dd>
|
||||
<div class="block">place its ship and choose moves randomly</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Random.html#%3Cinit%3E()">Random()</a></span> - Constructor for class battleship.model.player.<a href="battleship/model/player/Random.html" title="class in battleship.model.player">Random</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#recalculateFullCoords()">recalculateFullCoords()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">recalculate all coords based on this base coords, direction and size</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#requestInput">requestInput</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#requestInput">requestInput</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#right">right</a></span> - Variable in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#right">right</a></span> - Variable in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#RIGHT">RIGHT</a></span> - battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:S">S</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/control/TerminalKeyboardListener.html#scanner">scanner</a></span> - Variable in class battleship.control.<a href="battleship/control/TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#scanner">scanner</a></span> - Static variable in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#setCoords(battleship.utils.Pair)">setCoords(Pair<Integer, Integer>)</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#setDirection(battleship.model.Direction)">setDirection(Direction)</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#setDrown()">setDrown()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">set <a href="battleship/model/Ship.html#isDrown"><code>Ship.isDrown</code></a> to true</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#setId(int)">setId(int)</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#setId(int)">setId(int)</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#setShips(battleship.model.player.Player)">setShips(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">used if <code>player</code> instance of <a href="battleship/model/player/Computer.html" title="class in battleship.model.player"><code>Computer</code></a></div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#setShips(battleship.model.player.Player)">setShips(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd>
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/View.html#setShips(battleship.model.player.Player)">setShips(Player)</a></span> - Method in interface battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view">View</a></dt>
|
||||
<dd>
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#setShips(battleship.model.player.Player)">setShips(Player)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">Ask <code>player</code> to set position of its ships</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#setShips(battleship.model.Ship)">setShips(Ship)</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#setShips(battleship.model.Ship)">setShips(Ship)</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd>
|
||||
<div class="block">check if ship position and direction are valides and does not overlap on other vessels
|
||||
add the ship to player <a href="battleship/model/player/AbstractPlayer.html#ships"><code>AbstractPlayer.ships</code></a> list and return <code>true</code> if valid
|
||||
<code>false</code> otherwise</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#setUpperText(java.lang.String)">setUpperText(String)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">Display a text above the grid on <a href="battleship/view/Window.html" title="class in battleship.view"><code>Window</code></a>, simply print text on <a href="battleship/view/Terminal.html" title="class in battleship.view"><code>Terminal</code></a></div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#setUpperText(java.lang.String)">setUpperText(String)</a></span> - Method in class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd>
|
||||
<div class="block">print string</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#setUpperText(java.lang.String)">setUpperText(String)</a></span> - Method in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">Display a text above the grid</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/model/Ship.html" title="class in battleship.model"><span class="type-name-link">Ship</span></a> - Class in <a href="battleship/model/package-summary.html">battleship.model</a></dt>
|
||||
<dd>
|
||||
<div class="block">player's ship class</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#%3Cinit%3E(battleship.utils.Pair,int,battleship.model.Direction)">Ship(Pair<Integer, Integer>, int, Direction)</a></span> - Constructor for class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#ships">ships</a></span> - Variable in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#shipSize">shipSize</a></span> - Static variable in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/View.html#shipsSize">shipsSize</a></span> - Static variable in interface battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view">View</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#size">size</a></span> - Variable in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">ship size</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:T">T</h2>
|
||||
<dl class="index">
|
||||
<dt><a href="battleship/view/Terminal.html" title="class in battleship.view"><span class="type-name-link">Terminal</span></a> - Class in <a href="battleship/view/package-summary.html">battleship.view</a></dt>
|
||||
<dd>
|
||||
<div class="block">Terminal view, instanced if argument 2 equals to "nogui"</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Terminal.html#%3Cinit%3E(battleship.model.Game)">Terminal(Game)</a></span> - Constructor for class battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view">Terminal</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/control/TerminalKeyboardListener.html" title="class in battleship.control"><span class="type-name-link">TerminalKeyboardListener</span></a> - Class in <a href="battleship/control/package-summary.html">battleship.control</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/TerminalKeyboardListener.html#%3Cinit%3E(java.util.Scanner)">TerminalKeyboardListener(Scanner)</a></span> - Constructor for class battleship.control.<a href="battleship/control/TerminalKeyboardListener.html" title="class in battleship.control">TerminalKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#toString()">toString()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#toString()">toString()</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Pair.html#toString()">toString()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils">Pair</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#toString()">toString()</a></span> - Method in class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#toString()">toString()</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd>
|
||||
<div class="block">Used during debugging, used in terminal to display grids too</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/AbstractView.html#toString(boolean)">toString(boolean)</a></span> - Method in class battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view">AbstractView</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/utils/Triplet.html" title="class in battleship.utils"><span class="type-name-link">Triplet</span></a><<a href="battleship/utils/Triplet.html" title="type parameter in Triplet">U</a>,​<a href="battleship/utils/Triplet.html" title="type parameter in Triplet">K</a>,​<a href="battleship/utils/Triplet.html" title="type parameter in Triplet">V</a>> - Class in <a href="battleship/utils/package-summary.html">battleship.utils</a></dt>
|
||||
<dd>
|
||||
<div class="block">tuple containing 3 generic type elements</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#%3Cinit%3E(battleship.utils.Pair,V)">Triplet(Pair<U, K>, V)</a></span> - Constructor for class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/utils/Triplet.html#%3Cinit%3E(U,K,V)">Triplet(U, K, V)</a></span> - Constructor for class battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils">Triplet</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:U">U</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#UP">UP</a></span> - battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Ship.html#updateIsDrown(battleship.model.player.Player)">updateIsDrown(Player)</a></span> - Method in class battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model">Ship</a></dt>
|
||||
<dd>
|
||||
<div class="block">update value <a href="battleship/model/Ship.html#isDrown"><code>Ship.isDrown</code></a> to true if <code>player</code> hit all of ship boxes</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#upperSubTitle">upperSubTitle</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#upperTitle">upperTitle</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:V">V</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/AbstractPlayer.html#validMoves()">validMoves()</a></span> - Method in class battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player">AbstractPlayer</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/player/Player.html#validMoves()">validMoves()</a></span> - Method in interface battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a></dt>
|
||||
<dd>
|
||||
<div class="block">give a list of the player possible moves, used in <a href="battleship/model/player/Player.html#chooseMove()"><code>Player.chooseMove()</code></a></div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#valueOf(java.lang.String)">valueOf(String)</a></span> - Static method in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd>
|
||||
<div class="block">Returns the enum constant of this type with the specified name.</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/model/Direction.html#values()">values()</a></span> - Static method in enum battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model">Direction</a></dt>
|
||||
<dd>
|
||||
<div class="block">Returns an array containing the constants of this enum type, in
|
||||
the order they are declared.</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/Main.html#view">view</a></span> - Static variable in class battleship.<a href="battleship/Main.html" title="class in battleship">Main</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/view/View.html" title="interface in battleship.view"><span class="type-name-link">View</span></a> - Interface in <a href="battleship/view/package-summary.html">battleship.view</a></dt>
|
||||
<dd>
|
||||
<div class="block">View interface, used as an API</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2 class="title" id="I:W">W</h2>
|
||||
<dl class="index">
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#width">width</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd>
|
||||
<div class="block">grids width, do no represent frame size</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#window">window</a></span> - Variable in class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.Draw.html#window">window</a></span> - Variable in class battleship.view.<a href="battleship/view/Window.Draw.html" title="class in battleship.view">Window.Draw</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/view/Window.html" title="class in battleship.view"><span class="type-name-link">Window</span></a> - Class in <a href="battleship/view/package-summary.html">battleship.view</a></dt>
|
||||
<dd>
|
||||
<div class="block">Window view, instanced if argument 2 equals to "nogui"</div>
|
||||
</dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/Window.html#%3Cinit%3E(battleship.model.Game)">Window(Game)</a></span> - Constructor for class battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view">Window</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/view/Window.Draw.html" title="class in battleship.view"><span class="type-name-link">Window.Draw</span></a> - Class in <a href="battleship/view/package-summary.html">battleship.view</a></dt>
|
||||
<dd>
|
||||
<div class="block">Panel where we paint the board</div>
|
||||
</dd>
|
||||
<dt><a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control"><span class="type-name-link">WindowKeyboardListener</span></a> - Class in <a href="battleship/control/package-summary.html">battleship.control</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowKeyboardListener.html#%3Cinit%3E()">WindowKeyboardListener()</a></span> - Constructor for class battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control">WindowKeyboardListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/view/WindowListener.html" title="class in battleship.view"><span class="type-name-link">WindowListener</span></a> - Class in <a href="battleship/view/package-summary.html">battleship.view</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/view/WindowListener.html#%3Cinit%3E()">WindowListener()</a></span> - Constructor for class battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view">WindowListener</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><a href="battleship/control/WindowMouseListener.html" title="class in battleship.control"><span class="type-name-link">WindowMouseListener</span></a> - Class in <a href="battleship/control/package-summary.html">battleship.control</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="member-name-link"><a href="battleship/control/WindowMouseListener.html#%3Cinit%3E(battleship.view.Window)">WindowMouseListener(Window)</a></span> - Constructor for class battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control">WindowMouseListener</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a href="#I:A">A</a> <a href="#I:B">B</a> <a href="#I:C">C</a> <a href="#I:D">D</a> <a href="#I:E">E</a> <a href="#I:F">F</a> <a href="#I:G">G</a> <a href="#I:H">H</a> <a href="#I:I">I</a> <a href="#I:K">K</a> <a href="#I:L">L</a> <a href="#I:M">M</a> <a href="#I:O">O</a> <a href="#I:P">P</a> <a href="#I:R">R</a> <a href="#I:S">S</a> <a href="#I:T">T</a> <a href="#I:U">U</a> <a href="#I:V">V</a> <a href="#I:W">W</a> <br><a href="allclasses-index.html">All Classes</a><span class="vertical-separator">|</span><a href="allpackages-index.html">All Packages</a></main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li class="nav-bar-cell1-rev">Index</li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
127
livraison/doc/index.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Overview</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="package index">
|
||||
<meta name="generator" content="javadoc/PackageIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="package-index-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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 class="nav-bar-cell1-rev">Overview</li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="block">BattleShip package</div>
|
||||
<div class="overview-summary" id="all-packages-table">
|
||||
<table class="summary-table">
|
||||
<caption><span>Packages</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-first" scope="col">Package</th>
|
||||
<th class="col-last" scope="col">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="alt-color" id="i0">
|
||||
<th class="col-first" scope="row"><a href="battleship/package-summary.html">battleship</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains Main Class</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i1">
|
||||
<th class="col-first" scope="row"><a href="battleship/control/package-summary.html">battleship.control</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains keyboard and mouse listeners</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i2">
|
||||
<th class="col-first" scope="row"><a href="battleship/model/package-summary.html">battleship.model</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains all main Game classes</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i3">
|
||||
<th class="col-first" scope="row"><a href="battleship/model/player/package-summary.html">battleship.model.player</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains all players classes instances and theirs super classes and interface</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt-color" id="i4">
|
||||
<th class="col-first" scope="row"><a href="battleship/utils/package-summary.html">battleship.utils</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Utility classes</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-color" id="i5">
|
||||
<th class="col-first" scope="row"><a href="battleship/view/package-summary.html">battleship.view</a></th>
|
||||
<td class="col-last">
|
||||
<div class="block">Contains terminal and windows view classes and theirs super class and interface</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li class="nav-bar-cell1-rev">Overview</li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
34
livraison/doc/jquery-ui.overrides.css
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
.ui-state-active,
|
||||
.ui-widget-content .ui-state-active,
|
||||
.ui-widget-header .ui-state-active,
|
||||
a.ui-button:active,
|
||||
.ui-button:active,
|
||||
.ui-button.ui-state-active:hover {
|
||||
/* Overrides the color of selection used in jQuery UI */
|
||||
background: #F8981D;
|
||||
}
|
1
livraison/doc/member-search-index.js
Normal file
1
livraison/doc/module-search-index.js
Normal file
@ -0,0 +1 @@
|
||||
moduleSearchIndex = [];updateSearchResults();
|
26
livraison/doc/overview-summary.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="index redirect">
|
||||
<meta name="generator" content="javadoc/IndexRedirectWriter">
|
||||
<link rel="canonical" href="index.html">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript">window.location.replace('index.html')</script>
|
||||
<noscript>
|
||||
<meta http-equiv="Refresh" content="0;index.html">
|
||||
</noscript>
|
||||
</head>
|
||||
<body class="index-redirect-page">
|
||||
<main role="main">
|
||||
<noscript>
|
||||
<p>JavaScript is disabled on your browser.</p>
|
||||
</noscript>
|
||||
<p><a href="index.html">index.html</a></p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
161
livraison/doc/overview-tree.html
Normal file
@ -0,0 +1,161 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- Generated by javadoc (15) on Fri May 07 15:56:25 CEST 2021 -->
|
||||
<title>Class Hierarchy</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||
<meta name="dc.created" content="2021-05-07">
|
||||
<meta name="description" content="class tree">
|
||||
<meta name="generator" content="javadoc/TreeWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="tree-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar.top">
|
||||
<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="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For All Packages</h1>
|
||||
<span class="package-hierarchy-label">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="battleship/package-tree.html">battleship</a>, </li>
|
||||
<li><a href="battleship/control/package-tree.html">battleship.control</a>, </li>
|
||||
<li><a href="battleship/model/package-tree.html">battleship.model</a>, </li>
|
||||
<li><a href="battleship/model/player/package-tree.html">battleship.model.player</a>, </li>
|
||||
<li><a href="battleship/utils/package-tree.html">battleship.utils</a>, </li>
|
||||
<li><a href="battleship/view/package-tree.html">battleship.view</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="battleship/model/player/AbstractPlayer.html" title="class in battleship.model.player"><span class="type-name-link">AbstractPlayer</span></a> (implements battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player">Player</a>)
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="battleship/model/player/Computer.html" title="class in battleship.model.player"><span class="type-name-link">Computer</span></a>
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="battleship/model/player/Random.html" title="class in battleship.model.player"><span class="type-name-link">Random</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">battleship.model.player.<a href="battleship/model/player/Human.html" title="class in battleship.model.player"><span class="type-name-link">Human</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">battleship.view.<a href="battleship/view/AbstractView.html" title="class in battleship.view"><span class="type-name-link">AbstractView</span></a> (implements battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view">View</a>)
|
||||
<ul>
|
||||
<li class="circle">battleship.view.<a href="battleship/view/Terminal.html" title="class in battleship.view"><span class="type-name-link">Terminal</span></a></li>
|
||||
<li class="circle">battleship.view.<a href="battleship/view/Window.html" title="class in battleship.view"><span class="type-name-link">Window</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
|
||||
<ul>
|
||||
<li class="circle">java.awt.Container
|
||||
<ul>
|
||||
<li class="circle">javax.swing.JComponent (implements java.io.Serializable)
|
||||
<ul>
|
||||
<li class="circle">javax.swing.JPanel (implements javax.accessibility.Accessible)
|
||||
<ul>
|
||||
<li class="circle">battleship.view.<a href="battleship/view/Window.Draw.html" title="class in battleship.view"><span class="type-name-link">Window.Draw</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="circle">battleship.model.<a href="battleship/model/Game.html" title="class in battleship.model"><span class="type-name-link">Game</span></a></li>
|
||||
<li class="circle">battleship.<a href="battleship/Main.html" title="class in battleship"><span class="type-name-link">Main</span></a></li>
|
||||
<li class="circle">battleship.utils.<a href="battleship/utils/Pair.html" title="class in battleship.utils"><span class="type-name-link">Pair</span></a><U,​K></li>
|
||||
<li class="circle">battleship.model.<a href="battleship/model/Ship.html" title="class in battleship.model"><span class="type-name-link">Ship</span></a></li>
|
||||
<li class="circle">battleship.control.<a href="battleship/control/TerminalKeyboardListener.html" title="class in battleship.control"><span class="type-name-link">TerminalKeyboardListener</span></a></li>
|
||||
<li class="circle">battleship.utils.<a href="battleship/utils/Triplet.html" title="class in battleship.utils"><span class="type-name-link">Triplet</span></a><U,​K,​V></li>
|
||||
<li class="circle">battleship.control.<a href="battleship/control/WindowKeyboardListener.html" title="class in battleship.control"><span class="type-name-link">WindowKeyboardListener</span></a> (implements java.awt.event.KeyListener)</li>
|
||||
<li class="circle">battleship.view.<a href="battleship/view/WindowListener.html" title="class in battleship.view"><span class="type-name-link">WindowListener</span></a> (implements java.awt.event.MouseListener)</li>
|
||||
<li class="circle">battleship.control.<a href="battleship/control/WindowMouseListener.html" title="class in battleship.control"><span class="type-name-link">WindowMouseListener</span></a> (implements java.awt.event.MouseListener)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">battleship.model.player.<a href="battleship/model/player/Player.html" title="interface in battleship.model.player"><span class="type-name-link">Player</span></a></li>
|
||||
<li class="circle">battleship.view.<a href="battleship/view/View.html" title="interface in battleship.view"><span class="type-name-link">View</span></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="hierarchy">
|
||||
<h2 title="Enum Hierarchy">Enum Hierarchy</h2>
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<ul>
|
||||
<li class="circle">java.lang.Enum<E> (implements java.lang.Comparable<T>, java.lang.constant.Constable, java.io.Serializable)
|
||||
<ul>
|
||||
<li class="circle">battleship.model.<a href="battleship/model/Direction.html" title="enum in battleship.model"><span class="type-name-link">Direction</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottom-nav" id="navbar.bottom">
|
||||
<div class="skip-nav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar.bottom.firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li class="nav-bar-cell1-rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
<span class="skip-nav" id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</span></nav>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1
livraison/doc/package-search-index.js
Normal file
@ -0,0 +1 @@
|
||||
packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"battleship"},{"l":"battleship.control"},{"l":"battleship.model"},{"l":"battleship.model.player"},{"l":"battleship.utils"},{"l":"battleship.view"}];updateSearchResults();
|
BIN
livraison/doc/resources/glass.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
livraison/doc/resources/x.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
livraison/doc/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
livraison/doc/script-dir/images/ui-bg_glass_65_dadada_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
livraison/doc/script-dir/images/ui-bg_glass_75_dadada_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
livraison/doc/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
livraison/doc/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png
Normal file
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 280 B |
BIN
livraison/doc/script-dir/images/ui-icons_222222_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
livraison/doc/script-dir/images/ui-icons_2e83ff_256x240.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
livraison/doc/script-dir/images/ui-icons_454545_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
livraison/doc/script-dir/images/ui-icons_888888_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
livraison/doc/script-dir/images/ui-icons_cd0a0a_256x240.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
2
livraison/doc/script-dir/jquery-3.5.1.min.js
vendored
Normal file
7
livraison/doc/script-dir/jquery-ui.min.css
vendored
Normal file
6
livraison/doc/script-dir/jquery-ui.min.js
vendored
Normal file
5
livraison/doc/script-dir/jquery-ui.structure.min.css
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/*! jQuery UI - v1.12.1 - 2018-12-06
|
||||
* http://jqueryui.com
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}
|
103
livraison/doc/script.js
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
var moduleSearchIndex;
|
||||
var packageSearchIndex;
|
||||
var typeSearchIndex;
|
||||
var memberSearchIndex;
|
||||
var tagSearchIndex;
|
||||
function loadScripts(doc, tag) {
|
||||
createElem(doc, tag, 'search.js');
|
||||
|
||||
createElem(doc, tag, 'module-search-index.js');
|
||||
createElem(doc, tag, 'package-search-index.js');
|
||||
createElem(doc, tag, 'type-search-index.js');
|
||||
createElem(doc, tag, 'member-search-index.js');
|
||||
createElem(doc, tag, 'tag-search-index.js');
|
||||
}
|
||||
|
||||
function createElem(doc, tag, path) {
|
||||
var script = doc.createElement(tag);
|
||||
var scriptElement = doc.getElementsByTagName(tag)[0];
|
||||
script.src = pathtoroot + path;
|
||||
scriptElement.parentNode.insertBefore(script, scriptElement);
|
||||
}
|
||||
|
||||
function show(type) {
|
||||
count = 0;
|
||||
for (var key in data) {
|
||||
var row = document.getElementById(key);
|
||||
if ((data[key] & type) !== 0) {
|
||||
row.style.display = '';
|
||||
row.className = (count++ % 2) ? rowColor : altColor;
|
||||
}
|
||||
else
|
||||
row.style.display = 'none';
|
||||
}
|
||||
updateTabs(type);
|
||||
}
|
||||
|
||||
function updateTabs(type) {
|
||||
var firstRow = document.getElementById(Object.keys(data)[0]);
|
||||
var table = firstRow.closest('table');
|
||||
for (var value in tabs) {
|
||||
var tab = document.getElementById(tabs[value][0]);
|
||||
if (value == type) {
|
||||
tab.className = activeTableTab;
|
||||
tab.innerHTML = tabs[value][1];
|
||||
tab.setAttribute('aria-selected', true);
|
||||
tab.setAttribute('tabindex',0);
|
||||
table.setAttribute('aria-labelledby', tabs[value][0]);
|
||||
}
|
||||
else {
|
||||
tab.className = tableTab;
|
||||
tab.setAttribute('aria-selected', false);
|
||||
tab.setAttribute('tabindex',-1);
|
||||
tab.setAttribute('onclick', "show("+ value + ")");
|
||||
tab.innerHTML = tabs[value][1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function switchTab(e) {
|
||||
if (e.keyCode == 37 || e.keyCode == 38) {
|
||||
$("[aria-selected=true]").prev().click().focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
if (e.keyCode == 39 || e.keyCode == 40) {
|
||||
$("[aria-selected=true]").next().click().focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
var updateSearchResults = function() {};
|
||||
|
||||
function indexFilesLoaded() {
|
||||
return moduleSearchIndex
|
||||
&& packageSearchIndex
|
||||
&& typeSearchIndex
|
||||
&& memberSearchIndex
|
||||
&& tagSearchIndex;
|
||||
}
|
378
livraison/doc/search.js
Normal file
@ -0,0 +1,378 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
var noResult = {l: "No results found"};
|
||||
var loading = {l: "Loading search index..."};
|
||||
var catModules = "Modules";
|
||||
var catPackages = "Packages";
|
||||
var catTypes = "Types";
|
||||
var catMembers = "Members";
|
||||
var catSearchTags = "SearchTags";
|
||||
var highlight = "<span class=\"result-highlight\">$&</span>";
|
||||
var searchPattern = "";
|
||||
var RANKING_THRESHOLD = 2;
|
||||
var NO_MATCH = 0xffff;
|
||||
var MAX_RESULTS_PER_CATEGORY = 500;
|
||||
var UNNAMED = "<Unnamed>";
|
||||
function escapeHtml(str) {
|
||||
return str.replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
function getHighlightedText(item, matcher) {
|
||||
var escapedItem = escapeHtml(item);
|
||||
return escapedItem.replace(matcher, highlight);
|
||||
}
|
||||
function getURLPrefix(ui) {
|
||||
var urlPrefix="";
|
||||
var slash = "/";
|
||||
if (ui.item.category === catModules) {
|
||||
return ui.item.l + slash;
|
||||
} else if (ui.item.category === catPackages && ui.item.m) {
|
||||
return ui.item.m + slash;
|
||||
} else if (ui.item.category === catTypes || ui.item.category === catMembers) {
|
||||
if (ui.item.m) {
|
||||
urlPrefix = ui.item.m + slash;
|
||||
} else {
|
||||
$.each(packageSearchIndex, function(index, item) {
|
||||
if (item.m && ui.item.p === item.l) {
|
||||
urlPrefix = item.m + slash;
|
||||
}
|
||||
});
|
||||
}
|
||||
return urlPrefix;
|
||||
}
|
||||
return urlPrefix;
|
||||
}
|
||||
function makeCamelCaseRegex(term) {
|
||||
var pattern = "";
|
||||
var isWordToken = false;
|
||||
term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) {
|
||||
if (index > 0) {
|
||||
// whitespace between identifiers is significant
|
||||
pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*";
|
||||
}
|
||||
var tokens = w.split(/(?=[A-Z,.()<>[\/])/);
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var s = tokens[i];
|
||||
if (s === "") {
|
||||
continue;
|
||||
}
|
||||
pattern += $.ui.autocomplete.escapeRegex(s);
|
||||
isWordToken = /\w$/.test(s);
|
||||
if (isWordToken) {
|
||||
pattern += "([a-z0-9_$<>\\[\\]]*?)";
|
||||
}
|
||||
}
|
||||
});
|
||||
return pattern;
|
||||
}
|
||||
function createMatcher(pattern, flags) {
|
||||
var isCamelCase = /[A-Z]/.test(pattern);
|
||||
return new RegExp(pattern, flags + (isCamelCase ? "" : "i"));
|
||||
}
|
||||
var watermark = 'Search';
|
||||
$(function() {
|
||||
$("#search").val('');
|
||||
$("#search").prop("disabled", false);
|
||||
$("#reset").prop("disabled", false);
|
||||
$("#search").val(watermark).addClass('watermark');
|
||||
$("#search").blur(function() {
|
||||
if ($(this).val().length == 0) {
|
||||
$(this).val(watermark).addClass('watermark');
|
||||
}
|
||||
});
|
||||
$("#search").on('click keydown paste', function() {
|
||||
if ($(this).val() == watermark) {
|
||||
$(this).val('').removeClass('watermark');
|
||||
}
|
||||
});
|
||||
$("#reset").click(function() {
|
||||
$("#search").val('');
|
||||
$("#search").focus();
|
||||
});
|
||||
$("#search").focus();
|
||||
$("#search")[0].setSelectionRange(0, 0);
|
||||
});
|
||||
$.widget("custom.catcomplete", $.ui.autocomplete, {
|
||||
_create: function() {
|
||||
this._super();
|
||||
this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)");
|
||||
},
|
||||
_renderMenu: function(ul, items) {
|
||||
var rMenu = this;
|
||||
var currentCategory = "";
|
||||
rMenu.menu.bindings = $();
|
||||
$.each(items, function(index, item) {
|
||||
var li;
|
||||
if (item.category && item.category !== currentCategory) {
|
||||
ul.append("<li class=\"ui-autocomplete-category\">" + item.category + "</li>");
|
||||
currentCategory = item.category;
|
||||
}
|
||||
li = rMenu._renderItemData(ul, item);
|
||||
if (item.category) {
|
||||
li.attr("aria-label", item.category + " : " + item.l);
|
||||
li.attr("class", "result-item");
|
||||
} else {
|
||||
li.attr("aria-label", item.l);
|
||||
li.attr("class", "result-item");
|
||||
}
|
||||
});
|
||||
},
|
||||
_renderItem: function(ul, item) {
|
||||
var label = "";
|
||||
var matcher = createMatcher(escapeHtml(searchPattern), "g");
|
||||
if (item.category === catModules) {
|
||||
label = getHighlightedText(item.l, matcher);
|
||||
} else if (item.category === catPackages) {
|
||||
label = getHighlightedText(item.l, matcher);
|
||||
} else if (item.category === catTypes) {
|
||||
label = (item.p && item.p !== UNNAMED)
|
||||
? getHighlightedText(item.p + "." + item.l, matcher)
|
||||
: getHighlightedText(item.l, matcher);
|
||||
} else if (item.category === catMembers) {
|
||||
label = (item.p && item.p !== UNNAMED)
|
||||
? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher)
|
||||
: getHighlightedText(item.c + "." + item.l, matcher);
|
||||
} else if (item.category === catSearchTags) {
|
||||
label = getHighlightedText(item.l, matcher);
|
||||
} else {
|
||||
label = item.l;
|
||||
}
|
||||
var li = $("<li/>").appendTo(ul);
|
||||
var div = $("<div/>").appendTo(li);
|
||||
if (item.category === catSearchTags) {
|
||||
if (item.d) {
|
||||
div.html(label + "<span class=\"search-tag-holder-result\"> (" + item.h + ")</span><br><span class=\"search-tag-desc-result\">"
|
||||
+ item.d + "</span><br>");
|
||||
} else {
|
||||
div.html(label + "<span class=\"search-tag-holder-result\"> (" + item.h + ")</span>");
|
||||
}
|
||||
} else {
|
||||
if (item.m) {
|
||||
div.html(item.m + "/" + label);
|
||||
} else {
|
||||
div.html(label);
|
||||
}
|
||||
}
|
||||
return li;
|
||||
}
|
||||
});
|
||||
function rankMatch(match, category) {
|
||||
if (!match) {
|
||||
return NO_MATCH;
|
||||
}
|
||||
var index = match.index;
|
||||
var input = match.input;
|
||||
var leftBoundaryMatch = 2;
|
||||
var periferalMatch = 0;
|
||||
var delta = 0;
|
||||
// make sure match is anchored on a left word boundary
|
||||
if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index - 1] || "_" === input[index]) {
|
||||
leftBoundaryMatch = 0;
|
||||
} else if (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input)) {
|
||||
leftBoundaryMatch = 1;
|
||||
}
|
||||
var matchEnd = index + match[0].length;
|
||||
var leftParen = input.indexOf("(");
|
||||
// exclude peripheral matches
|
||||
if (category !== catModules && category !== catSearchTags) {
|
||||
var endOfName = leftParen > -1 ? leftParen : input.length;
|
||||
var delim = category === catPackages ? "/" : ".";
|
||||
if (leftParen > -1 && leftParen < index) {
|
||||
periferalMatch += 2;
|
||||
} else if (input.lastIndexOf(delim, endOfName) >= matchEnd) {
|
||||
periferalMatch += 2;
|
||||
}
|
||||
}
|
||||
for (var i = 1; i < match.length; i++) {
|
||||
// lower ranking if parts of the name are missing
|
||||
if (match[i])
|
||||
delta += match[i].length;
|
||||
}
|
||||
if (category === catTypes) {
|
||||
// lower ranking if a type name contains unmatched camel-case parts
|
||||
if (/[A-Z]/.test(input.substring(matchEnd)))
|
||||
delta += 5;
|
||||
if (/[A-Z]/.test(input.substring(0, index)))
|
||||
delta += 5;
|
||||
}
|
||||
return leftBoundaryMatch + periferalMatch + (delta / 200);
|
||||
|
||||
}
|
||||
function doSearch(request, response) {
|
||||
var result = [];
|
||||
var newResults = [];
|
||||
|
||||
searchPattern = makeCamelCaseRegex(request.term);
|
||||
if (searchPattern === "") {
|
||||
return this.close();
|
||||
}
|
||||
var camelCaseMatcher = createMatcher(searchPattern, "");
|
||||
var boundaryMatcher = createMatcher("\\b" + searchPattern, "");
|
||||
|
||||
function concatResults(a1, a2) {
|
||||
a2.sort(function(e1, e2) {
|
||||
return e1.ranking - e2.ranking;
|
||||
});
|
||||
a1 = a1.concat(a2.map(function(e) { return e.item; }));
|
||||
a2.length = 0;
|
||||
return a1;
|
||||
}
|
||||
|
||||
if (moduleSearchIndex) {
|
||||
$.each(moduleSearchIndex, function(index, item) {
|
||||
item.category = catModules;
|
||||
var ranking = rankMatch(boundaryMatcher.exec(item.l), catModules);
|
||||
if (ranking < RANKING_THRESHOLD) {
|
||||
newResults.push({ ranking: ranking, item: item });
|
||||
}
|
||||
return newResults.length < MAX_RESULTS_PER_CATEGORY;
|
||||
});
|
||||
result = concatResults(result, newResults);
|
||||
}
|
||||
if (packageSearchIndex) {
|
||||
$.each(packageSearchIndex, function(index, item) {
|
||||
item.category = catPackages;
|
||||
var name = (item.m && request.term.indexOf("/") > -1)
|
||||
? (item.m + "/" + item.l)
|
||||
: item.l;
|
||||
var ranking = rankMatch(boundaryMatcher.exec(name), catPackages);
|
||||
if (ranking < RANKING_THRESHOLD) {
|
||||
newResults.push({ ranking: ranking, item: item });
|
||||
}
|
||||
return newResults.length < MAX_RESULTS_PER_CATEGORY;
|
||||
});
|
||||
result = concatResults(result, newResults);
|
||||
}
|
||||
if (typeSearchIndex) {
|
||||
$.each(typeSearchIndex, function(index, item) {
|
||||
item.category = catTypes;
|
||||
var name = request.term.indexOf(".") > -1
|
||||
? item.p + "." + item.l
|
||||
: item.l;
|
||||
var ranking = rankMatch(camelCaseMatcher.exec(name), catTypes);
|
||||
if (ranking < RANKING_THRESHOLD) {
|
||||
newResults.push({ ranking: ranking, item: item });
|
||||
}
|
||||
return newResults.length < MAX_RESULTS_PER_CATEGORY;
|
||||
});
|
||||
result = concatResults(result, newResults);
|
||||
}
|
||||
if (memberSearchIndex) {
|
||||
$.each(memberSearchIndex, function(index, item) {
|
||||
item.category = catMembers;
|
||||
var name = request.term.indexOf(".") > -1
|
||||
? item.p + "." + item.c + "." + item.l
|
||||
: item.l;
|
||||
var ranking = rankMatch(camelCaseMatcher.exec(name), catMembers);
|
||||
if (ranking < RANKING_THRESHOLD) {
|
||||
newResults.push({ ranking: ranking, item: item });
|
||||
}
|
||||
return newResults.length < MAX_RESULTS_PER_CATEGORY;
|
||||
});
|
||||
result = concatResults(result, newResults);
|
||||
}
|
||||
if (tagSearchIndex) {
|
||||
$.each(tagSearchIndex, function(index, item) {
|
||||
item.category = catSearchTags;
|
||||
var ranking = rankMatch(boundaryMatcher.exec(item.l), catSearchTags);
|
||||
if (ranking < RANKING_THRESHOLD) {
|
||||
newResults.push({ ranking: ranking, item: item });
|
||||
}
|
||||
return newResults.length < MAX_RESULTS_PER_CATEGORY;
|
||||
});
|
||||
result = concatResults(result, newResults);
|
||||
}
|
||||
if (!indexFilesLoaded()) {
|
||||
updateSearchResults = function() {
|
||||
doSearch(request, response);
|
||||
}
|
||||
result.unshift(loading);
|
||||
} else {
|
||||
updateSearchResults = function() {};
|
||||
}
|
||||
response(result);
|
||||
}
|
||||
$(function() {
|
||||
$("#search").catcomplete({
|
||||
minLength: 1,
|
||||
delay: 300,
|
||||
source: doSearch,
|
||||
response: function(event, ui) {
|
||||
if (!ui.content.length) {
|
||||
ui.content.push(noResult);
|
||||
} else {
|
||||
$("#search").empty();
|
||||
}
|
||||
},
|
||||
autoFocus: true,
|
||||
focus: function(event, ui) {
|
||||
return false;
|
||||
},
|
||||
position: {
|
||||
collision: "flip"
|
||||
},
|
||||
select: function(event, ui) {
|
||||
if (ui.item.category) {
|
||||
var url = getURLPrefix(ui);
|
||||
if (ui.item.category === catModules) {
|
||||
url += "module-summary.html";
|
||||
} else if (ui.item.category === catPackages) {
|
||||
if (ui.item.u) {
|
||||
url = ui.item.u;
|
||||
} else {
|
||||
url += ui.item.l.replace(/\./g, '/') + "/package-summary.html";
|
||||
}
|
||||
} else if (ui.item.category === catTypes) {
|
||||
if (ui.item.u) {
|
||||
url = ui.item.u;
|
||||
} else if (ui.item.p === UNNAMED) {
|
||||
url += ui.item.l + ".html";
|
||||
} else {
|
||||
url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html";
|
||||
}
|
||||
} else if (ui.item.category === catMembers) {
|
||||
if (ui.item.p === UNNAMED) {
|
||||
url += ui.item.c + ".html" + "#";
|
||||
} else {
|
||||
url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#";
|
||||
}
|
||||
if (ui.item.u) {
|
||||
url += ui.item.u;
|
||||
} else {
|
||||
url += ui.item.l;
|
||||
}
|
||||
} else if (ui.item.category === catSearchTags) {
|
||||
url += ui.item.u;
|
||||
}
|
||||
if (top !== window) {
|
||||
parent.classFrame.location = pathtoroot + url;
|
||||
} else {
|
||||
window.location.href = pathtoroot + url;
|
||||
}
|
||||
$("#search").focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
792
livraison/doc/stylesheet.css
Normal file
@ -0,0 +1,792 @@
|
||||
/*
|
||||
* Javadoc style sheet
|
||||
*/
|
||||
|
||||
@import url('resources/fonts/dejavu.css');
|
||||
|
||||
/*
|
||||
* Styles for individual HTML elements.
|
||||
*
|
||||
* These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
|
||||
* HTML element throughout the page.
|
||||
*/
|
||||
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
}
|
||||
iframe {
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
overflow-y:scroll;
|
||||
border:none;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a[href]:hover, a[href]:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
}
|
||||
h1 {
|
||||
font-size:20px;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
}
|
||||
h3 {
|
||||
font-size:16px;
|
||||
}
|
||||
h4 {
|
||||
font-size:13px;
|
||||
}
|
||||
h5 {
|
||||
font-size:12px;
|
||||
}
|
||||
h6 {
|
||||
font-size:11px;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
margin-top:8px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
vertical-align:top;
|
||||
padding-top:4px;
|
||||
}
|
||||
sup {
|
||||
font-size:8px;
|
||||
}
|
||||
button {
|
||||
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
/*
|
||||
* Styles for HTML generated by javadoc.
|
||||
*
|
||||
* These are style classes that are used by the standard doclet to generate HTML documentation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Styles for document title and copyright.
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.about-language {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:11px;
|
||||
z-index:200;
|
||||
margin-top:-9px;
|
||||
}
|
||||
.legal-copy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
* Styles for navigation bar.
|
||||
*/
|
||||
@media screen {
|
||||
.flex-box {
|
||||
position:fixed;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.flex-header {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.flex-content {
|
||||
flex: 1 1 auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.top-nav {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.bottom-nav {
|
||||
margin-top:10px;
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.sub-nav {
|
||||
background-color:#dee3e9;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.sub-nav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.sub-nav .nav-list {
|
||||
padding-top:5px;
|
||||
}
|
||||
ul.nav-list, ul.sub-nav-list {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.nav-list li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding: 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.sub-nav .nav-list-search {
|
||||
float:right;
|
||||
margin:0 0 0 0;
|
||||
padding:5px 6px;
|
||||
clear:none;
|
||||
}
|
||||
.nav-list-search label {
|
||||
position:relative;
|
||||
right:-16px;
|
||||
}
|
||||
ul.sub-nav-list li {
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding-top:10px;
|
||||
}
|
||||
.top-nav a:link, .top-nav a:active, .top-nav a:visited, .bottom-nav a:link, .bottom-nav a:active, .bottom-nav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.top-nav a:hover, .bottom-nav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.nav-bar-cell1-rev {
|
||||
background-color:#F8981D;
|
||||
color:#253441;
|
||||
margin: auto 5px;
|
||||
}
|
||||
.skip-nav {
|
||||
position:absolute;
|
||||
top:auto;
|
||||
left:-9999px;
|
||||
overflow:hidden;
|
||||
}
|
||||
/*
|
||||
* Hide navigation links and search box in print layout
|
||||
*/
|
||||
@media print {
|
||||
ul.nav-list, div.sub-nav {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Styles for page header and footer.
|
||||
*/
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.sub-title {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 15px 0;
|
||||
padding:0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:13px;
|
||||
}
|
||||
/*
|
||||
* Styles for headings.
|
||||
*/
|
||||
body.class-declaration-page .summary h2,
|
||||
body.class-declaration-page .details h2,
|
||||
body.class-use-page h2,
|
||||
body.module-declaration-page .block-list h2 {
|
||||
font-style: italic;
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
body.class-declaration-page .summary h3,
|
||||
body.class-declaration-page .details h3,
|
||||
body.class-declaration-page .summary .inherited-list h2 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
/*
|
||||
* Styles for page layout containers.
|
||||
*/
|
||||
main {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
dl.notes > dt {
|
||||
font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
dl.notes > dd {
|
||||
margin:5px 0 10px 0px;
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
dl.name-value > dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
dl.name-value > dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
* Styles for lists.
|
||||
*/
|
||||
li.circle {
|
||||
list-style:circle;
|
||||
}
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
div.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
div.inheritance div.inheritance {
|
||||
margin-left:2em;
|
||||
}
|
||||
ul.block-list,
|
||||
ul.details-list,
|
||||
ul.member-list,
|
||||
ul.summary-list {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.block-list > li,
|
||||
ul.details-list > li,
|
||||
ul.member-list > li,
|
||||
ul.summary-list > li {
|
||||
list-style:none;
|
||||
margin-bottom:15px;
|
||||
line-height:1.4;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
* Styles for tables.
|
||||
*/
|
||||
.overview-summary table, .member-summary table, .type-summary table, .use-summary table, .constants-summary table, .deprecated-summary table,
|
||||
.requires-summary table, .packages-summary table, .provides-summary table, .uses-summary table, .system-properties-summary table {
|
||||
width:100%;
|
||||
border-spacing:0;
|
||||
border-left:1px solid #EEE;
|
||||
border-right:1px solid #EEE;
|
||||
border-bottom:1px solid #EEE;
|
||||
}
|
||||
.overview-summary table, .member-summary table, .requires-summary table, .packages-summary table,
|
||||
.provides-summary table, .uses-summary table, .system-properties-summary table {
|
||||
padding:0px;
|
||||
}
|
||||
.overview-summary caption, .member-summary caption, .type-summary caption,
|
||||
.use-summary caption, .constants-summary caption, .deprecated-summary caption,
|
||||
.requires-summary caption, .packages-summary caption, .provides-summary caption,
|
||||
.uses-summary caption, .system-properties-summary caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#253441;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
padding-top:10px;
|
||||
padding-left:1px;
|
||||
margin:0px;
|
||||
white-space:pre;
|
||||
}
|
||||
.constants-summary caption a:link, .constants-summary caption a:visited,
|
||||
.use-summary caption a:link, .use-summary caption a:visited {
|
||||
color:#1f389c;
|
||||
}
|
||||
.overview-summary caption a:link, .member-summary caption a:link, .type-summary caption a:link,
|
||||
.deprecated-summary caption a:link,
|
||||
.requires-summary caption a:link, .packages-summary caption a:link, .provides-summary caption a:link,
|
||||
.uses-summary caption a:link,
|
||||
.overview-summary caption a:hover, .member-summary caption a:hover, .type-summary caption a:hover,
|
||||
.use-summary caption a:hover, .constants-summary caption a:hover, .deprecated-summary caption a:hover,
|
||||
.requires-summary caption a:hover, .packages-summary caption a:hover, .provides-summary caption a:hover,
|
||||
.uses-summary caption a:hover,
|
||||
.overview-summary caption a:active, .member-summary caption a:active, .type-summary caption a:active,
|
||||
.use-summary caption a:active, .constants-summary caption a:active, .deprecated-summary caption a:active,
|
||||
.requires-summary caption a:active, .packages-summary caption a:active, .provides-summary caption a:active,
|
||||
.uses-summary caption a:active,
|
||||
.overview-summary caption a:visited, .member-summary caption a:visited, .type-summary caption a:visited,
|
||||
.deprecated-summary caption a:visited,
|
||||
.requires-summary caption a:visited, .packages-summary caption a:visited, .provides-summary caption a:visited,
|
||||
.uses-summary caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overview-summary caption span, .member-summary caption span, .type-summary caption span,
|
||||
.use-summary caption span, .constants-summary caption span, .deprecated-summary caption span,
|
||||
.requires-summary caption span, .packages-summary caption span, .provides-summary caption span,
|
||||
.uses-summary caption span, .system-properties-summary caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
padding-bottom:7px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
border: none;
|
||||
height:16px;
|
||||
}
|
||||
|
||||
div.table-tabs > button {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 5px 12px 7px 12px;
|
||||
font-weight: bold;
|
||||
margin-right: 3px;
|
||||
}
|
||||
div.table-tabs > button.active-table-tab {
|
||||
background: #F8981D;
|
||||
color: #253441;
|
||||
}
|
||||
div.table-tabs > button.table-tab {
|
||||
background: #4D7A97;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.row-color th,
|
||||
.alt-color th {
|
||||
font-weight:normal;
|
||||
}
|
||||
.overview-summary td, .member-summary td, .type-summary td,
|
||||
.use-summary td, .constants-summary td, .deprecated-summary td,
|
||||
.requires-summary td, .packages-summary td, .provides-summary td,
|
||||
.uses-summary td, .system-properties-summary td {
|
||||
text-align:left;
|
||||
padding:0px 0px 12px 10px;
|
||||
}
|
||||
th.col-first, th.col-second, th.col-last, th.col-constructor-name, th.col-deprecated-item-name, .use-summary th,
|
||||
.constants-summary th, .packages-summary th, td.col-first, td.col-second, td.col-last, .use-summary td,
|
||||
.constants-summary td, .system-properties-summary th {
|
||||
vertical-align:top;
|
||||
padding-right:0px;
|
||||
padding-top:8px;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
th.col-first, th.col-second, th.col-last, th.col-constructor-name, th.col-deprecated-item-name, .constants-summary th,
|
||||
.packages-summary th {
|
||||
background:#dee3e9;
|
||||
text-align:left;
|
||||
padding:8px 3px 3px 7px;
|
||||
}
|
||||
td.col-first, th.col-first {
|
||||
font-size:13px;
|
||||
}
|
||||
td.col-second, th.col-second, td.col-last, th.col-constructor-name, th.col-deprecated-item-name, th.col-last {
|
||||
font-size:13px;
|
||||
}
|
||||
.constants-summary th, .packages-summary th {
|
||||
font-size:13px;
|
||||
}
|
||||
.provides-summary th.col-first, .provides-summary th.col-last, .provides-summary td.col-first,
|
||||
.provides-summary td.col-last {
|
||||
white-space:normal;
|
||||
font-size:13px;
|
||||
}
|
||||
.overview-summary td.col-first, .overview-summary th.col-first,
|
||||
.requires-summary td.col-first, .requires-summary th.col-first,
|
||||
.packages-summary td.col-first, .packages-summary td.col-second, .packages-summary th.col-first, .packages-summary th,
|
||||
.uses-summary td.col-first, .uses-summary th.col-first,
|
||||
.provides-summary td.col-first, .provides-summary th.col-first,
|
||||
.member-summary td.col-first, .member-summary th.col-first,
|
||||
.member-summary td.col-second, .member-summary th.col-second, .member-summary th.col-constructor-name,
|
||||
.type-summary td.col-first, .type-summary th.col-first {
|
||||
vertical-align:top;
|
||||
}
|
||||
.packages-summary th.col-last, .packages-summary td.col-last {
|
||||
white-space:normal;
|
||||
}
|
||||
td.col-first a:link, td.col-first a:visited,
|
||||
td.col-second a:link, td.col-second a:visited,
|
||||
th.col-first a:link, th.col-first a:visited,
|
||||
th.col-second a:link, th.col-second a:visited,
|
||||
th.col-constructor-name a:link, th.col-constructor-name a:visited,
|
||||
th.col-deprecated-item-name a:link, th.col-deprecated-item-name a:visited,
|
||||
.constant-values-container td a:link, .constant-values-container td a:visited,
|
||||
.all-classes-container td a:link, .all-classes-container td a:visited,
|
||||
.all-packages-container td a:link, .all-packages-container td a:visited {
|
||||
font-weight:bold;
|
||||
}
|
||||
.table-sub-heading-color {
|
||||
background-color:#EEEEFF;
|
||||
}
|
||||
.alt-color, .alt-color th {
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
.row-color, .row-color th {
|
||||
background-color:#EEEEEF;
|
||||
}
|
||||
/*
|
||||
* Styles for contents.
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecated-content {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
div.block {
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
td.col-last div {
|
||||
padding-top:0px;
|
||||
}
|
||||
td.col-last a {
|
||||
padding-bottom:3px;
|
||||
}
|
||||
div.member-signature {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
margin:14px 0;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
div.member-signature span.annotations {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
div.member-signature span.type-parameters-long,
|
||||
div.member-signature span.parameters,
|
||||
div.member-signature span.exceptions {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
white-space: pre;
|
||||
}
|
||||
div.member-signature span.type-parameters {
|
||||
white-space: normal;
|
||||
}
|
||||
/*
|
||||
* Styles for formatting effect.
|
||||
*/
|
||||
.source-line-no {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:10px;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:0 10px 5px 0;
|
||||
color:#474747;
|
||||
}
|
||||
.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link,
|
||||
.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type,
|
||||
.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link {
|
||||
font-weight:bold;
|
||||
}
|
||||
.deprecation-comment, .help-footnote, .interface-name {
|
||||
font-style:italic;
|
||||
}
|
||||
.deprecation-block {
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
border-style:solid;
|
||||
border-width:thin;
|
||||
border-radius:10px;
|
||||
padding:10px;
|
||||
margin-bottom:10px;
|
||||
margin-right:10px;
|
||||
display:inline-block;
|
||||
}
|
||||
div.block div.deprecation-comment, div.block div.block span.emphasized-phrase,
|
||||
div.block div.block span.interface-name {
|
||||
font-style:normal;
|
||||
}
|
||||
/*
|
||||
* Styles specific to HTML5 elements.
|
||||
*/
|
||||
main, nav, header, footer, section {
|
||||
display:block;
|
||||
}
|
||||
/*
|
||||
* Styles for javadoc search.
|
||||
*/
|
||||
.ui-autocomplete-category {
|
||||
font-weight:bold;
|
||||
font-size:15px;
|
||||
padding:7px 0 7px 3px;
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.result-item {
|
||||
font-size:13px;
|
||||
}
|
||||
.ui-autocomplete {
|
||||
max-height:85%;
|
||||
max-width:65%;
|
||||
overflow-y:scroll;
|
||||
overflow-x:scroll;
|
||||
white-space:nowrap;
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
ul.ui-autocomplete {
|
||||
position:fixed;
|
||||
z-index:999999;
|
||||
}
|
||||
ul.ui-autocomplete li {
|
||||
float:left;
|
||||
clear:both;
|
||||
width:100%;
|
||||
}
|
||||
.result-highlight {
|
||||
font-weight:bold;
|
||||
}
|
||||
#search {
|
||||
background-image:url('resources/glass.png');
|
||||
background-size:13px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:2px 3px;
|
||||
padding-left:20px;
|
||||
position:relative;
|
||||
right:-18px;
|
||||
width:400px;
|
||||
}
|
||||
#reset {
|
||||
background-color: rgb(255,255,255);
|
||||
background-image:url('resources/x.png');
|
||||
background-position:center;
|
||||
background-repeat:no-repeat;
|
||||
background-size:12px;
|
||||
border:0 none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
position:relative;
|
||||
left:-4px;
|
||||
top:-4px;
|
||||
font-size:0px;
|
||||
}
|
||||
.watermark {
|
||||
color:#545454;
|
||||
}
|
||||
.search-tag-desc-result {
|
||||
font-style:italic;
|
||||
font-size:11px;
|
||||
}
|
||||
.search-tag-holder-result {
|
||||
font-style:italic;
|
||||
font-size:12px;
|
||||
}
|
||||
.search-tag-result:target {
|
||||
background-color:yellow;
|
||||
}
|
||||
.module-graph span {
|
||||
display:none;
|
||||
position:absolute;
|
||||
}
|
||||
.module-graph:hover span {
|
||||
display:block;
|
||||
margin: -100px 0 0 100px;
|
||||
z-index: 1;
|
||||
}
|
||||
.inherited-list {
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
section.description {
|
||||
line-height: 1.4;
|
||||
}
|
||||
.summary section[class$="-summary"], .details section[class$="-details"],
|
||||
.class-uses .detail, .serialized-class-details {
|
||||
padding: 0px 20px 5px 10px;
|
||||
border: 1px solid #ededed;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.inherited-list, section[class$="-details"] .detail {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:none;
|
||||
}
|
||||
.vertical-separator {
|
||||
padding: 0 5px;
|
||||
}
|
||||
ul.help-section-list {
|
||||
margin: 0;
|
||||
}
|
||||
/*
|
||||
* Indicator icon for external links.
|
||||
*/
|
||||
main a[href*="://"]::after {
|
||||
content:"";
|
||||
display:inline-block;
|
||||
background-image:url('data:image/svg+xml; utf8, \
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768">\
|
||||
<path d="M584 664H104V184h216V80H0v688h688V448H584zM384 0l132 \
|
||||
132-240 240 120 120 240-240 132 132V0z" fill="%234a6782"/>\
|
||||
</svg>');
|
||||
background-size:100% 100%;
|
||||
width:7px;
|
||||
height:7px;
|
||||
margin-left:2px;
|
||||
margin-bottom:4px;
|
||||
}
|
||||
main a[href*="://"]:hover::after,
|
||||
main a[href*="://"]:focus::after {
|
||||
background-image:url('data:image/svg+xml; utf8, \
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768">\
|
||||
<path d="M584 664H104V184h216V80H0v688h688V448H584zM384 0l132 \
|
||||
132-240 240 120 120 240-240 132 132V0z" fill="%23bb7a2a"/>\
|
||||
</svg>');
|
||||
}
|
||||
|
||||
/*
|
||||
* Styles for user-provided tables.
|
||||
*
|
||||
* borderless:
|
||||
* No borders, vertical margins, styled caption.
|
||||
* This style is provided for use with existing doc comments.
|
||||
* In general, borderless tables should not be used for layout purposes.
|
||||
*
|
||||
* plain:
|
||||
* Plain borders around table and cells, vertical margins, styled caption.
|
||||
* Best for small tables or for complex tables for tables with cells that span
|
||||
* rows and columns, when the "striped" style does not work well.
|
||||
*
|
||||
* striped:
|
||||
* Borders around the table and vertical borders between cells, striped rows,
|
||||
* vertical margins, styled caption.
|
||||
* Best for tables that have a header row, and a body containing a series of simple rows.
|
||||
*/
|
||||
|
||||
table.borderless,
|
||||
table.plain,
|
||||
table.striped {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
table.borderless > caption,
|
||||
table.plain > caption,
|
||||
table.striped > caption {
|
||||
font-weight: bold;
|
||||
font-size: smaller;
|
||||
}
|
||||
table.borderless th, table.borderless td,
|
||||
table.plain th, table.plain td,
|
||||
table.striped th, table.striped td {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
table.borderless,
|
||||
table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
|
||||
table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
|
||||
border: none;
|
||||
}
|
||||
table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
|
||||
background-color: transparent;
|
||||
}
|
||||
table.plain {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
|
||||
background-color: transparent;
|
||||
}
|
||||
table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
|
||||
table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.striped {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.striped > thead {
|
||||
background-color: #E3E3E3;
|
||||
}
|
||||
table.striped > thead > tr > th, table.striped > thead > tr > td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
table.striped > tbody > tr:nth-child(even) {
|
||||
background-color: #EEE
|
||||
}
|
||||
table.striped > tbody > tr:nth-child(odd) {
|
||||
background-color: #FFF
|
||||
}
|
||||
table.striped > tbody > tr > th, table.striped > tbody > tr > td {
|
||||
border-left: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
table.striped > tbody > tr > th {
|
||||
font-weight: normal;
|
||||
}
|
1
livraison/doc/tag-search-index.js
Normal file
@ -0,0 +1 @@
|
||||
tagSearchIndex = [];updateSearchResults();
|
1
livraison/doc/type-search-index.js
Normal file
@ -0,0 +1 @@
|
||||
typeSearchIndex = [{"p":"battleship.model.player","l":"AbstractPlayer"},{"p":"battleship.view","l":"AbstractView"},{"l":"All Classes","u":"allclasses-index.html"},{"p":"battleship.model.player","l":"Computer"},{"p":"battleship.model","l":"Direction"},{"p":"battleship.view","l":"Window.Draw"},{"p":"battleship.model","l":"Game"},{"p":"battleship.model.player","l":"Human"},{"p":"battleship","l":"Main"},{"p":"battleship.utils","l":"Pair"},{"p":"battleship.model.player","l":"Player"},{"p":"battleship.model.player","l":"Random"},{"p":"battleship.model","l":"Ship"},{"p":"battleship.view","l":"Terminal"},{"p":"battleship.control","l":"TerminalKeyboardListener"},{"p":"battleship.utils","l":"Triplet"},{"p":"battleship.view","l":"View"},{"p":"battleship.view","l":"Window"},{"p":"battleship.control","l":"WindowKeyboardListener"},{"p":"battleship.view","l":"WindowListener"},{"p":"battleship.control","l":"WindowMouseListener"}];updateSearchResults();
|
BIN
livraison/rapport/rapport.pdf
Normal file
86
livraison/src/battleship/Main.java
Normal file
@ -0,0 +1,86 @@
|
||||
package battleship;
|
||||
|
||||
import battleship.model.Game;
|
||||
import battleship.model.player.AbstractPlayer;
|
||||
import battleship.model.player.Human;
|
||||
import battleship.model.player.Player;
|
||||
import battleship.model.player.Random;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.view.Terminal;
|
||||
import battleship.view.View;
|
||||
import battleship.view.Window;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* Main class
|
||||
* Given arguments are importants, please give attention to {@link Main#parseArgs(String[])} about this
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
public static View view;
|
||||
public static Game game;
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
parseArgs(args);
|
||||
} catch (NoSuchElementException e) {
|
||||
System.out.println("Pas assez d'arguments, veuillez donner des arguments de cette forme:");
|
||||
System.out.println("java -jar battleship <Human/Random> <Human/Random> [nogui]");
|
||||
System.out.println("<param>: paramètre obligatoire");
|
||||
System.out.println("[param]: paramètre optionnel");
|
||||
System.exit(2);
|
||||
} catch (InstantiationException | InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
game.Play(view);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Read and parse launch arguments.<br>
|
||||
* launch arguments need to follow this syntax:<br></p>
|
||||
* <p><strong>{@code <player1_instance> <player2_instance> [nogui]}</strong></p>
|
||||
* <p><strong><arg></strong> -> mandatory parameter<br>
|
||||
* <strong>[arg]</strong> -> optional parameter<br>
|
||||
* player_instance values are: <strong>"Human"</strong> or <strong>"Random"</strong><br>
|
||||
* nogui to launch the game in terminal or nothing to launch in graphical interface</p>
|
||||
* @param args launch arguments
|
||||
* @throws NoSuchMethodException reflect exception
|
||||
* @throws IllegalAccessException reflect exception
|
||||
* @throws InvocationTargetException reflect exception
|
||||
* @throws InstantiationException reflect exception
|
||||
*/
|
||||
private static void parseArgs(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
|
||||
Player[] players = new Player[2];
|
||||
ArrayList<Pair<String, Class<? extends AbstractPlayer>>> playerClass = new ArrayList<>(2);
|
||||
playerClass.add(new Pair<>("human", Human.class));
|
||||
playerClass.add(new Pair<>("random", Random.class));
|
||||
if(args.length >= 2) {
|
||||
for(int i = 0; i < 2; ++i) {
|
||||
for (Pair<String, Class<? extends AbstractPlayer>> pair : playerClass) {
|
||||
if(args[i].equalsIgnoreCase(pair.getLeft())) {
|
||||
players[i] = pair.getRight().getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(players[0] != null && players[1] != null) {
|
||||
game = new Game(players);
|
||||
} else
|
||||
throw new IllegalArgumentException("Arguments incorrects: " + Arrays.toString(args));
|
||||
if(args.length >= 3) {
|
||||
// arguments > 3 ignorés
|
||||
if(args[2].equalsIgnoreCase("nogui"))
|
||||
view = new Terminal(game);
|
||||
else
|
||||
view = new Window(game);
|
||||
} else {
|
||||
view = new Window(game);
|
||||
}
|
||||
} else
|
||||
throw new NoSuchElementException("Pas assez d'arguments");
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package battleship.control;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class TerminalKeyboardListener {
|
||||
|
||||
private final Scanner scanner;
|
||||
|
||||
public TerminalKeyboardListener(Scanner scanner) {
|
||||
this.scanner = scanner;
|
||||
}
|
||||
|
||||
public String keyboardInput() {
|
||||
return scanner.next();
|
||||
}
|
||||
}
|
34
livraison/src/battleship/control/WindowKeyboardListener.java
Normal file
@ -0,0 +1,34 @@
|
||||
package battleship.control;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
|
||||
public class WindowKeyboardListener implements KeyListener {
|
||||
|
||||
public boolean requestInput = false;
|
||||
public char keyTyped = KeyEvent.CHAR_UNDEFINED;
|
||||
public int keyTypedArrow = KeyEvent.VK_UNDEFINED;
|
||||
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
if(requestInput) {
|
||||
if(e.getKeyChar() != KeyEvent.CHAR_UNDEFINED)
|
||||
keyTyped = e.getKeyChar();
|
||||
if(e.getKeyCode() != KeyEvent.VK_UNDEFINED) {
|
||||
System.out.println(e.getKeyCode());
|
||||
keyTypedArrow = e.getKeyCode();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyReleased(KeyEvent e) {
|
||||
|
||||
}
|
||||
}
|
58
livraison/src/battleship/control/WindowMouseListener.java
Normal file
@ -0,0 +1,58 @@
|
||||
package battleship.control;
|
||||
|
||||
import battleship.utils.Pair;
|
||||
import battleship.view.Window;
|
||||
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
|
||||
public class WindowMouseListener implements MouseListener {
|
||||
|
||||
private final Window window;
|
||||
public boolean requestInput = false;
|
||||
public Pair<Integer, Integer> lastInput = null;
|
||||
public int playerIdLastInput = 0;
|
||||
|
||||
public WindowMouseListener(Window view) {
|
||||
this.window = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if(requestInput) {
|
||||
int x = e.getX() - 7;
|
||||
int y = e.getY() - 30;
|
||||
int initialHeight = window.height / 12;
|
||||
int initialWidth = window.width / 23;
|
||||
if(y >= initialHeight * 2 && y <= window.height) {
|
||||
y -= initialHeight * 2;
|
||||
if(x >= initialWidth && x <= initialWidth * 11) {
|
||||
x -= initialWidth;
|
||||
lastInput = new Pair<>((y + 2) / initialHeight, (x + 2) / initialWidth);
|
||||
playerIdLastInput = 1;
|
||||
} else if(x >= initialHeight * 13 && x <= window.width) {
|
||||
x -= initialWidth * 13;
|
||||
lastInput = new Pair<>((y + 2) / initialHeight, (x + 2) / initialWidth);
|
||||
playerIdLastInput = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent ignored) {}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent ignored) {}
|
||||
|
||||
}
|
4
livraison/src/battleship/control/package-info.java
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Contains keyboard and mouse listeners
|
||||
*/
|
||||
package battleship.control;
|
36
livraison/src/battleship/model/Direction.java
Normal file
@ -0,0 +1,36 @@
|
||||
package battleship.model;
|
||||
|
||||
import battleship.utils.Pair;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public enum Direction {
|
||||
|
||||
RIGHT(new Pair<>(0, 1), "D", KeyEvent.VK_RIGHT),
|
||||
LEFT(new Pair<>(0,-1), "G", KeyEvent.VK_LEFT),
|
||||
UP(new Pair<>(-1,0), "H", KeyEvent.VK_UP),
|
||||
DOWN(new Pair<>(1,0), "B", KeyEvent.VK_DOWN),
|
||||
DEFAULT(new Pair<>(-1,-1), null, KeyEvent.VK_UNDEFINED);
|
||||
|
||||
private final Pair<Integer, Integer> direction;
|
||||
private final String keyword;
|
||||
private final int arrow;
|
||||
|
||||
<K, U> Direction(Pair<Integer, Integer> ukPair, String keyword, int arrow) {
|
||||
this.direction = ukPair;
|
||||
this.keyword = keyword;
|
||||
this.arrow = arrow;
|
||||
}
|
||||
|
||||
public Pair<Integer, Integer> getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public String getKeyword() {
|
||||
return keyword;
|
||||
}
|
||||
|
||||
public int getArrow() {
|
||||
return arrow;
|
||||
}
|
||||
}
|
111
livraison/src/battleship/model/Game.java
Normal file
@ -0,0 +1,111 @@
|
||||
package battleship.model;
|
||||
|
||||
import battleship.model.player.Player;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.utils.Triplet;
|
||||
import battleship.view.View;
|
||||
|
||||
/**
|
||||
* Main game class
|
||||
*/
|
||||
public class Game {
|
||||
|
||||
public final Player[] players;
|
||||
public Player currentPlayer;
|
||||
|
||||
public Game(Player[] players) {
|
||||
this.players = players;
|
||||
this.currentPlayer = players[0];
|
||||
players[0].setId(1);
|
||||
players[1].setId(2);
|
||||
}
|
||||
|
||||
public Player getCurrentPlayer(){
|
||||
return this.currentPlayer;
|
||||
}
|
||||
|
||||
public Player getOtherPlayer() {
|
||||
return this.currentPlayer == players[0] ? players[1] : players[0];
|
||||
}
|
||||
|
||||
public Player getOtherPlayer(Player player) {
|
||||
return this.currentPlayer == player ? getOtherPlayer() : currentPlayer;
|
||||
}
|
||||
|
||||
public void changeCurrentPlayer(){
|
||||
currentPlayer = getOtherPlayer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update ship to know if they're drowned
|
||||
*/
|
||||
public void checkDrownedShips(){
|
||||
Player otherPlayer = getOtherPlayer();
|
||||
for(Ship ship : otherPlayer.getShips()){
|
||||
if(!ship.isDrown())
|
||||
ship.updateIsDrown(currentPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return player 1 if player 2' ships are drowned, or player 2 if player1' ships are drowned, null otherwise
|
||||
*/
|
||||
public Player getWinner(){
|
||||
Ship remainingShip = players[0].getShips().parallelStream().filter(ship -> !ship.isDrown()).findFirst().orElse(null);
|
||||
if(remainingShip == null)
|
||||
return players[1];
|
||||
remainingShip = players[1].getShips().parallelStream().filter(ship -> !ship.isDrown()).findFirst().orElse(null);
|
||||
if(remainingShip == null)
|
||||
return players[0];
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Play the selected move from current player in grid
|
||||
* @param move selected player move
|
||||
*/
|
||||
public void move(Pair<Integer,Integer> move){
|
||||
boolean bool = false;
|
||||
Player otherPlayer = getOtherPlayer();
|
||||
for (Ship ship : otherPlayer.getShips()) {
|
||||
for(Pair<Integer,Integer> coords : ship.getFullCoords()){
|
||||
if ((coords.getRight().equals(move.getRight())) && (coords.getLeft().equals(move.getLeft()))) {
|
||||
bool = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bool)
|
||||
break;
|
||||
}
|
||||
currentPlayer.addMove(new Triplet<>(move, bool));
|
||||
}
|
||||
|
||||
/**
|
||||
* game loop
|
||||
* @param view can be {@link battleship.view.Terminal} or {@link battleship.view.Window}
|
||||
*/
|
||||
public void Play(View view) {
|
||||
try {
|
||||
view.setShips(players[0]);
|
||||
changeCurrentPlayer();
|
||||
view.setShips(players[1]);
|
||||
changeCurrentPlayer();
|
||||
Player winner = null;
|
||||
while (winner == null) {
|
||||
System.out.println("Au tour du joueur " + currentPlayer.getId());
|
||||
view.displayBoard();
|
||||
move(view.chooseMove(currentPlayer));
|
||||
checkDrownedShips();
|
||||
changeCurrentPlayer();
|
||||
winner = getWinner();
|
||||
}
|
||||
view.displayWinner(winner);
|
||||
} catch (InterruptedException e) {
|
||||
System.out.println("Une erreur est survenue");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
107
livraison/src/battleship/model/Ship.java
Normal file
@ -0,0 +1,107 @@
|
||||
package battleship.model;
|
||||
|
||||
import battleship.model.player.Player;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
/**
|
||||
* player's ship class
|
||||
*/
|
||||
public class Ship {
|
||||
|
||||
/**
|
||||
* base coordinates of the ship
|
||||
*/
|
||||
private Pair<Integer, Integer> coords;
|
||||
/**
|
||||
* ship size
|
||||
*/
|
||||
private final int size;
|
||||
/**
|
||||
* ship full coordinates calculate thank to base coordinates, direction and size
|
||||
*/
|
||||
final Pair<Integer,Integer>[] fullCoords;
|
||||
private Direction direction;
|
||||
/**
|
||||
* if true the ship is destroyed
|
||||
*/
|
||||
private boolean isDrown;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Ship(Pair<Integer, Integer> coords, int size, Direction direction) {
|
||||
this.coords = coords;
|
||||
this.size = size;
|
||||
this.fullCoords = new Pair[this.size];
|
||||
this.direction = direction;
|
||||
isDrown = false;
|
||||
recalculateFullCoords();
|
||||
}
|
||||
|
||||
public void setDirection(Direction d){
|
||||
this.direction = d;
|
||||
}
|
||||
|
||||
public void setCoords(Pair<Integer,Integer> c){
|
||||
this.coords = c;
|
||||
}
|
||||
|
||||
/**
|
||||
* set {@link Ship#isDrown} to true
|
||||
*/
|
||||
public void setDrown(){
|
||||
isDrown = true;
|
||||
}
|
||||
|
||||
public boolean isDrown(){
|
||||
return isDrown;
|
||||
}
|
||||
|
||||
public int getSize(){
|
||||
return this.size;
|
||||
}
|
||||
|
||||
public Direction getDirection(){
|
||||
return this.direction;
|
||||
}
|
||||
|
||||
public Pair<Integer,Integer> getCoords(){
|
||||
return this.coords;
|
||||
}
|
||||
|
||||
/**
|
||||
* recalculate all coords based on this base coords, direction and size
|
||||
*/
|
||||
public void recalculateFullCoords() {
|
||||
for(int i = 0; i < size; ++i){
|
||||
fullCoords[i] = new Pair<>(coords.getLeft() + i * direction.getDirection().getLeft(),coords.getRight() + i * direction.getDirection().getRight());
|
||||
}
|
||||
}
|
||||
|
||||
public Pair<Integer, Integer>[] getFullCoords(){
|
||||
return fullCoords;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + ", coords=" + coords.toString() + ", size=" + size + ", direction=" + direction.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* update value {@link Ship#isDrown} to true if {@code player} hit all of ship boxes
|
||||
* @param player the opponent of this ship owner
|
||||
*/
|
||||
public void updateIsDrown(Player player) {
|
||||
int cpt = 0;
|
||||
for(Pair<Integer, Integer> coords : getFullCoords()) {
|
||||
for(Triplet<Integer,Integer,Boolean> move : player.getMoves()) {
|
||||
if(move.getRight() && move.getLeft().equals(coords.getLeft()) && move.getMiddle().equals(coords.getRight())){
|
||||
++cpt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cpt == getSize()) {
|
||||
setDrown();
|
||||
}
|
||||
}
|
||||
}
|
4
livraison/src/battleship/model/package-info.java
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Contains all main Game classes
|
||||
*/
|
||||
package battleship.model;
|
98
livraison/src/battleship/model/player/AbstractPlayer.java
Normal file
@ -0,0 +1,98 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.model.Direction;
|
||||
import battleship.model.Ship;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Abstract player class see {@link Player} to know more about this code organisation
|
||||
* @see Player
|
||||
* @see Human
|
||||
* @see Computer
|
||||
* @see Random
|
||||
*/
|
||||
public abstract class AbstractPlayer implements Player {
|
||||
|
||||
final ArrayList<Ship> ships = new ArrayList<>();
|
||||
/**
|
||||
* reference every shot on the opponent board, left and middle side of the Triplet reference the coordinates and the
|
||||
* right side if this move hit or not an opponent ship
|
||||
*/
|
||||
final ArrayList<Triplet<Integer,Integer,Boolean>> moves = new ArrayList<>();
|
||||
public int id;
|
||||
|
||||
public boolean setShips(Ship ship) {
|
||||
if(ship.getDirection() == Direction.DEFAULT)
|
||||
return false;
|
||||
for(Pair<Integer, Integer> coords : ship.getFullCoords()) {
|
||||
if(coords.getLeft() > 9 || coords.getLeft() < 0 || coords.getRight() > 9 || coords.getRight() < 0)
|
||||
return false;
|
||||
for(Ship ship1 : this.ships) {
|
||||
for (Pair<Integer, Integer> coords1 : ship1.getFullCoords()) {
|
||||
if (coords1.getLeft().equals(coords.getLeft()) && coords1.getRight().equals(coords.getRight()))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ships.add(ship);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* add {@code move} to the {@link AbstractPlayer#moves} list
|
||||
*/
|
||||
public void addMove(Triplet<Integer,Integer,Boolean> move){
|
||||
moves.add(move);
|
||||
}
|
||||
|
||||
public ArrayList<Pair<Integer,Integer>> validMoves() {
|
||||
ArrayList<Pair<Integer,Integer>> validMovesList = new ArrayList<>();
|
||||
for(int x = 0; x < 10; x++){
|
||||
for(int y = 0; y < 10; y++) {
|
||||
Pair<Integer, Integer> coords = new Pair<>(x,y);
|
||||
if(!(moves.contains(new Triplet<>(coords, true)) || moves.contains(new Triplet<>(coords, false)))){
|
||||
validMovesList.add(new Pair<>(x,y));
|
||||
}
|
||||
}
|
||||
}
|
||||
return validMovesList;
|
||||
|
||||
}
|
||||
|
||||
public boolean areValid(int x, int y){
|
||||
if(x < 0 || x > 10 || y < 0 || y > 10)
|
||||
return false;
|
||||
for(Triplet<Integer,Integer,Boolean> move : moves){
|
||||
if(move.getLeft() == x && move.getMiddle() == y)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(int i) {
|
||||
id = i;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + " " + id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Ship> getShips() {
|
||||
return ships;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Triplet<Integer,Integer,Boolean>> getMoves() {
|
||||
return moves;
|
||||
}
|
||||
}
|
28
livraison/src/battleship/model/player/Computer.java
Normal file
@ -0,0 +1,28 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.model.Direction;
|
||||
import battleship.model.Ship;
|
||||
import battleship.utils.Pair;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* <p>Computer super class, all player object which use an algorithm to calculate coordinates to use should extend from
|
||||
* this object.</p>
|
||||
* <p>Random is the only algorithm include here but another algorithm can be easily implemented</p>
|
||||
*/
|
||||
public abstract class Computer extends AbstractPlayer {
|
||||
|
||||
public void placeShipRandomly() {
|
||||
java.util.Random rand = new Random();
|
||||
for(int i : shipSize) {
|
||||
Ship ship = new Ship(new Pair<>(-1, -1), i, Direction.DEFAULT);
|
||||
while(!setShips(ship)) {
|
||||
ship.setCoords(new Pair<>(rand.nextInt(10), rand.nextInt(10)));
|
||||
ship.setDirection(Direction.values()[rand.nextInt(Direction.values().length)]);
|
||||
ship.recalculateFullCoords();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
19
livraison/src/battleship/model/player/Human.java
Normal file
@ -0,0 +1,19 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.utils.Pair;
|
||||
|
||||
/**
|
||||
* This object do nothing itself, it just an interface to know the type of player (Human or not),
|
||||
* each view interact with the player with its methods
|
||||
*/
|
||||
public class Human extends AbstractPlayer {
|
||||
|
||||
@Override
|
||||
public Pair<Integer,Integer> chooseMove() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeShips() {}
|
||||
|
||||
}
|
73
livraison/src/battleship/model/player/Player.java
Normal file
@ -0,0 +1,73 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.model.Ship;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* <p>Player interface, used as an API.</p>
|
||||
* <p>This model (interface -> abstract class(es) -> concrete classes) prevent hard code.</p>
|
||||
* <p>This is the only object which interact with other object<br>
|
||||
* Allows an outside person from the project to easily change the code or to add a view easily without modifying
|
||||
* existing classes</p>
|
||||
* @see AbstractPlayer
|
||||
* @see Computer
|
||||
* @see Human
|
||||
* @see Random
|
||||
*/
|
||||
public interface Player {
|
||||
|
||||
int[] shipSize = { 5, 4, 3, 3, 2 };
|
||||
|
||||
/**
|
||||
* Used by computer only
|
||||
* @see Random#chooseMove()
|
||||
* @return coords in its opponent grid to play a move
|
||||
*/
|
||||
Pair<Integer,Integer> chooseMove();
|
||||
|
||||
/**
|
||||
* check if ship position and direction are valides and does not overlap on other vessels
|
||||
* add the ship to player {@link AbstractPlayer#ships} list and return {@code true} if valid
|
||||
* {@code false} otherwise
|
||||
* @param ship the ship instance we check
|
||||
* @return {@code true} if ship data are valids, {@code false} otherwise
|
||||
*/
|
||||
boolean setShips(Ship ship);
|
||||
|
||||
int getId();
|
||||
|
||||
/**
|
||||
* Adds coordinates of the {@code move} in the {@link AbstractPlayer#moves} list
|
||||
* @param move the move chosen by the player
|
||||
*/
|
||||
void addMove(Triplet<Integer,Integer,Boolean> move);
|
||||
|
||||
|
||||
void setId(int i);
|
||||
|
||||
/**
|
||||
* give a list of the player possible moves, used in {@link Player#chooseMove()}
|
||||
* @return a list of playable move
|
||||
*/
|
||||
ArrayList<Pair<Integer,Integer>> validMoves();
|
||||
|
||||
/**
|
||||
* Used by {@link Computer} instances to place ships
|
||||
*/
|
||||
void placeShips();
|
||||
|
||||
/**
|
||||
* check if coordinates from {@link battleship.view.View#chooseMove(Player)}are in valids position
|
||||
* @param x the x-axis of the coordinates
|
||||
* @param y the y-axis of the coordinates
|
||||
* @return {@code true} if valid, {@code false} otherwise
|
||||
*/
|
||||
boolean areValid(int x, int y);
|
||||
|
||||
ArrayList<Ship> getShips();
|
||||
|
||||
ArrayList<Triplet<Integer,Integer,Boolean>> getMoves();
|
||||
}
|
21
livraison/src/battleship/model/player/Random.java
Normal file
@ -0,0 +1,21 @@
|
||||
package battleship.model.player;
|
||||
|
||||
import battleship.utils.Pair;
|
||||
|
||||
/**
|
||||
* place its ship and choose moves randomly
|
||||
*/
|
||||
public class Random extends Computer {
|
||||
|
||||
@Override
|
||||
public Pair<Integer,Integer> chooseMove() {
|
||||
java.util.Random rand = new java.util.Random();
|
||||
return validMoves().get(rand.nextInt(validMoves().size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeShips() {
|
||||
placeShipRandomly();
|
||||
}
|
||||
|
||||
}
|
4
livraison/src/battleship/model/player/package-info.java
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Contains all players classes instances and theirs super classes and interface
|
||||
*/
|
||||
package battleship.model.player;
|
4
livraison/src/battleship/package-info.java
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Contains Main Class
|
||||
*/
|
||||
package battleship;
|
53
livraison/src/battleship/utils/Pair.java
Normal file
@ -0,0 +1,53 @@
|
||||
package battleship.utils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* tuple containing 2 generic type elements
|
||||
*
|
||||
* @param <U> left
|
||||
* @param <K> right
|
||||
*/
|
||||
public class Pair<U, K> {
|
||||
|
||||
private final U left;
|
||||
private final K right;
|
||||
|
||||
public Pair(U left, K right) {
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
public U getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public K getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Pair<?, ?> other = (Pair<?, ?>) obj;
|
||||
return this.left.equals(other.getLeft()) && this.right.equals(other.getRight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(left.hashCode(), right.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + left + ", " + right + ")";
|
||||
}
|
||||
}
|
64
livraison/src/battleship/utils/Triplet.java
Normal file
@ -0,0 +1,64 @@
|
||||
package battleship.utils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* tuple containing 3 generic type elements
|
||||
*
|
||||
* @param <U> left
|
||||
* @param <K> middle
|
||||
* @param <V> right
|
||||
*/
|
||||
public class Triplet<U, K, V> {
|
||||
|
||||
private final U left;
|
||||
private final K middle;
|
||||
private final V right;
|
||||
|
||||
public Triplet(U left, K middle, V right) {
|
||||
this.left = left;
|
||||
this.middle = middle;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
public Triplet(Pair<U, K> pair, V right) {
|
||||
this(pair.getLeft(), pair.getRight(), right);
|
||||
}
|
||||
|
||||
public U getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public K getMiddle() {
|
||||
return middle;
|
||||
}
|
||||
|
||||
public V getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Triplet<?, ?, ?> other = (Triplet<?, ?, ?>) obj;
|
||||
return this.left.equals(other.getLeft()) && this.middle.equals(other.getMiddle()) && this.right.equals(other.getRight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(left, middle, right);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + left + ", " + middle + ", " + right + ")";
|
||||
}
|
||||
}
|
4
livraison/src/battleship/utils/package-info.java
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Utility classes
|
||||
*/
|
||||
package battleship.utils;
|
192
livraison/src/battleship/view/AbstractView.java
Normal file
@ -0,0 +1,192 @@
|
||||
package battleship.view;
|
||||
|
||||
import battleship.model.Direction;
|
||||
import battleship.model.Game;
|
||||
import battleship.model.Ship;
|
||||
import battleship.model.player.Player;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Abstract view class
|
||||
* @see View
|
||||
* @see Window
|
||||
* @see Terminal
|
||||
*/
|
||||
public abstract class AbstractView implements View {
|
||||
|
||||
protected final Game game;
|
||||
|
||||
public AbstractView(Game game) {
|
||||
this.game = game;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used during debugging, used in terminal to display grids too
|
||||
* @return all player grids
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return toString(true);
|
||||
}
|
||||
|
||||
public String toString(boolean debug) {
|
||||
StringBuilder chain = new StringBuilder();
|
||||
for(int u = 0; u < 2; ++u) {
|
||||
Player player = game.players[u];
|
||||
ArrayList<Ship> ships = game.players[u].getShips();
|
||||
chain.append("Joueur ").append(player.getId()).append(" :\n");
|
||||
chain.append("+ 0 1 2 3 4 5 6 7 8 9 +\n");
|
||||
for(int x = 0; x < 10; ++x) {
|
||||
chain.append(x);
|
||||
for(int y = 0; y < 10; ++y) {
|
||||
Pair<Integer, Integer> pair = new Pair<>(x, y);
|
||||
boolean isPosition = false;
|
||||
for(Ship ship : ships) {
|
||||
if(isShipPosition(ship, pair)) {
|
||||
isPosition = true;
|
||||
int result = isPositionDrowned(game.players[u == 0 ? 1 : 0], ship, pair);
|
||||
if(result == 1) {
|
||||
chain.append(" X");
|
||||
} else if (result == 2){
|
||||
chain.append(" !");
|
||||
} else if(debug || game.getCurrentPlayer() == player) {
|
||||
chain.append(" .");
|
||||
} else {
|
||||
chain.append(" _");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!isPosition) {
|
||||
if(isPositionDrowned(game.players[u == 0 ? 1 : 0], pair) == 2) {
|
||||
chain.append(" ?");
|
||||
} else {
|
||||
chain.append(" _");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
chain.append(" |\n");
|
||||
}
|
||||
chain.append("+ - - - - - - - - - - +\n");
|
||||
}
|
||||
|
||||
return chain.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return {@code true} if {@link Ship#getFullCoords()} contains {@code boardsCoords}, {@code false} otherwise
|
||||
*/
|
||||
private boolean isShipPosition(Ship ship, Pair<Integer, Integer> boardsCoords) {
|
||||
for(Pair<Integer, Integer> coords : ship.getFullCoords()) {
|
||||
if(boardsCoords.equals(coords))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ask player for keyboard input and parse it into one of {@link Direction} value
|
||||
* @return Direction depending of player input
|
||||
* @throws InterruptedException caused by {@link Window#getKeyInput()}
|
||||
* @see Window#getDirectionFromChar()
|
||||
*/
|
||||
protected Direction getDirectionFromChar() throws InterruptedException {
|
||||
String dir;
|
||||
while (true) {
|
||||
setUpperText("Veuillez indiquer la direction de placement de votre bateau (d droite, h haut, b bas, g gauche)");
|
||||
dir = getKeyInput();
|
||||
for (Direction direction : Direction.values()) {
|
||||
if (direction.getKeyword() != null && direction.getKeyword().equals(dir)) {
|
||||
return direction;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ask player for keyboard input and return result
|
||||
* @return String given by player
|
||||
* @throws InterruptedException see {@link Window#getKeyInput()}
|
||||
*/
|
||||
protected abstract String getKeyInput() throws InterruptedException;
|
||||
|
||||
/**
|
||||
* Display a text above the grid on {@link Window}, simply print text on {@link Terminal}
|
||||
* @param s text to display
|
||||
* @see Window#setUpperText(String)
|
||||
* @see Terminal#setUpperText(String)
|
||||
*/
|
||||
protected abstract void setUpperText(String s);
|
||||
|
||||
/**
|
||||
* used if {@code player} instance of {@link battleship.model.player.Computer}
|
||||
* @param player player we ask to set position of its ships
|
||||
* @throws InterruptedException see {@link Window#setShips(Player)}
|
||||
*/
|
||||
@Override
|
||||
public void setShips(Player player) throws InterruptedException {
|
||||
player.placeShips();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param other other than the current player
|
||||
* @param ship check if this ship at this position has been hit
|
||||
* @param pair coords
|
||||
* @return 1 if ship fully drowned, 2 if only damaged, 0 if not
|
||||
* @see AbstractView#isPositionDrowned(Player, Pair)
|
||||
*/
|
||||
private int isPositionDrowned(Player other, Ship ship, Pair<Integer, Integer> pair) {
|
||||
if(ship.isDrown())
|
||||
return 1;
|
||||
return isPositionDrowned(other, pair);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param other other than the current player
|
||||
* @param pair coords to check
|
||||
* @return 2 if player already played here, 0 otherwise
|
||||
*/
|
||||
private int isPositionDrowned(Player other, Pair<Integer, Integer> pair) {
|
||||
for(Triplet<Integer, Integer, Boolean> move : other.getMoves()) {
|
||||
if(pair.getLeft().equals(move.getLeft()) && pair.getRight().equals(move.getMiddle())) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* used by {@link battleship.model.player.Computer} player to play a move in the grid depending of its algorithm
|
||||
* @param player {@link battleship.model.Game#currentPlayer}
|
||||
* @return a couple ({@link Pair} containing the x and y coordinate (left side store Y and right side X)
|
||||
* @throws InterruptedException see {@link Window#chooseMove(Player)}
|
||||
*/
|
||||
@Override
|
||||
public Pair<Integer, Integer> chooseMove(Player player) throws InterruptedException {
|
||||
return player.chooseMove();
|
||||
}
|
||||
|
||||
/**
|
||||
* ask {@code player} for mouse input
|
||||
* @param player {@link Game#currentPlayer}
|
||||
* @return coordinate of {@code player} opponent grid
|
||||
* @see Window#mouseInput(Player)
|
||||
* @throws InterruptedException see {@link Window#mouseInput(Player)}
|
||||
*/
|
||||
protected abstract Pair<Integer, Integer> mouseInput(Player player) throws InterruptedException;
|
||||
|
||||
/**
|
||||
* ask {@link Game#currentPlayer} for keyboard input
|
||||
* @return String given by player
|
||||
* @throws InterruptedException see {@link Window#keyboardInput()}
|
||||
* @see Window#keyboardInput()
|
||||
* @see Terminal#keyboardInput()
|
||||
* @see Terminal#keyboardInputInteger()
|
||||
*/
|
||||
protected abstract String keyboardInput() throws InterruptedException;
|
||||
}
|
167
livraison/src/battleship/view/Terminal.java
Normal file
@ -0,0 +1,167 @@
|
||||
package battleship.view;
|
||||
|
||||
import battleship.control.TerminalKeyboardListener;
|
||||
import battleship.model.Direction;
|
||||
import battleship.model.Game;
|
||||
import battleship.model.Ship;
|
||||
import battleship.model.player.Human;
|
||||
import battleship.model.player.Player;
|
||||
import battleship.utils.Pair;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* Terminal view, instanced if argument 2 equals to "nogui"
|
||||
* @see View
|
||||
* @see AbstractView
|
||||
*/
|
||||
public class Terminal extends AbstractView {
|
||||
|
||||
public static Scanner scanner = null;
|
||||
private final TerminalKeyboardListener keyboardComponent;
|
||||
|
||||
public Terminal(Game game) {
|
||||
super(game);
|
||||
if(scanner == null)
|
||||
scanner = new Scanner(System.in);
|
||||
keyboardComponent = new TerminalKeyboardListener(scanner);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return given string in terminal
|
||||
*/
|
||||
@Override
|
||||
protected String getKeyInput() {
|
||||
return scanner.next().toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* print string
|
||||
* @param s text to display
|
||||
*/
|
||||
@Override
|
||||
protected void setUpperText(String s) {
|
||||
System.out.println(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask {@code player} to set position of its ships
|
||||
* @param player player we ask to set position of its ships
|
||||
* @throws InterruptedException see {@link AbstractView#getDirectionFromChar()}
|
||||
*/
|
||||
@Override
|
||||
public void setShips(Player player) throws InterruptedException {
|
||||
setUpperText("Joueur " + player.getId() + ", placez vos navires");
|
||||
int x, y;
|
||||
if(player instanceof Human) {
|
||||
for(int i : shipsSize) {
|
||||
boolean valid = false;
|
||||
Pair<Integer, Integer> defaultPos = new Pair<>(-1, -1);
|
||||
Ship ship = new Ship(defaultPos, i, Direction.DEFAULT);
|
||||
while (!player.setShips(ship)) {
|
||||
try {
|
||||
if (valid) {
|
||||
setUpperText("Erreur");
|
||||
}
|
||||
valid = true;
|
||||
setUpperText("Placement du bateau de longueur " + ship.getSize());
|
||||
setUpperText("Veuillez indiquer la coordonée x de votre bateau");
|
||||
x = keyboardInputInteger();
|
||||
setUpperText("Veuillez indiquer la coordonée y de votre bateau");
|
||||
y = keyboardInputInteger();
|
||||
ship.setCoords(new Pair<>(x, y));
|
||||
ship.setDirection(getDirectionFromChar());
|
||||
ship.recalculateFullCoords();
|
||||
} catch(NumberFormatException e) {
|
||||
// Pour être sur qu'il ne passera pas la boucle
|
||||
ship.setCoords(defaultPos);
|
||||
ship.setDirection(Direction.DEFAULT);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
super.setShips(player);
|
||||
// Computer
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* print board in terminal
|
||||
*/
|
||||
@Override
|
||||
public void displayBoard() {
|
||||
System.out.println(this.toString(false));
|
||||
}
|
||||
|
||||
/**
|
||||
* ask player to choose a coords on its opponent grid, call {@link AbstractView#chooseMove(Player)} if instance of
|
||||
* player is {@link battleship.model.player.Computer}
|
||||
* if {@code player} isn't {@link Human} instance
|
||||
* @param player {@link battleship.model.Game#currentPlayer}
|
||||
* @return a element containing the x and y coordinate (left side store Y and right side X)
|
||||
* @throws InterruptedException see {@link AbstractView#chooseMove(Player)}
|
||||
*/
|
||||
@Override
|
||||
public Pair<Integer, Integer> chooseMove(Player player) throws InterruptedException {
|
||||
if(player instanceof Human) {
|
||||
int x = -1, y = -1;
|
||||
while(!player.areValid(x, y)) {
|
||||
try {
|
||||
// y correspond à l'ordonnée mais est stocké comme étant l'abscisse
|
||||
// (erreur de notre part aperçu lors du passage à une fenetre swing)
|
||||
setUpperText("Veuillez indiquer la coordonée x de votre coup");
|
||||
y = keyboardInputInteger();
|
||||
setUpperText("Veuillez indiquer la coordonée y de votre coup");
|
||||
x = keyboardInputInteger();
|
||||
} catch (NumberFormatException ignored) {
|
||||
x = -1;
|
||||
y = -1;
|
||||
}
|
||||
}
|
||||
return new Pair<>(x,y);
|
||||
}
|
||||
return super.chooseMove(player);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Never call in Terminal
|
||||
* @param player {@link Game#currentPlayer}
|
||||
* @return {@code null}
|
||||
*/
|
||||
@Override
|
||||
protected Pair<Integer, Integer> mouseInput(Player player) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see TerminalKeyboardListener#keyboardInput()
|
||||
* @return given string in terminal
|
||||
*/
|
||||
@Override
|
||||
protected String keyboardInput() {
|
||||
return keyboardComponent.keyboardInput();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Terminal#keyboardInput()
|
||||
* @return convert string from keyboardInput() and convert it into an integer
|
||||
* @throws NumberFormatException if given string can't be parse into an integer
|
||||
*/
|
||||
protected int keyboardInputInteger() throws NumberFormatException {
|
||||
return Integer.parseInt(keyboardComponent.keyboardInput());
|
||||
}
|
||||
|
||||
/**
|
||||
* print grid, winner player and close scanner, game automatically close after this
|
||||
* @param winner the winner of the game.
|
||||
*/
|
||||
@Override
|
||||
public void displayWinner(Player winner) {
|
||||
displayBoard();
|
||||
setUpperText("Le joueur " + winner.getId() + " a gagné");
|
||||
scanner.close();
|
||||
}
|
||||
|
||||
}
|
46
livraison/src/battleship/view/View.java
Normal file
@ -0,0 +1,46 @@
|
||||
package battleship.view;
|
||||
|
||||
import battleship.model.player.Player;
|
||||
import battleship.utils.Pair;
|
||||
|
||||
/**
|
||||
* <p>View interface, used as an API</p>
|
||||
* <p>This model (interface -> abstract class(es) -> concrete classes) prevent hard code.</p>
|
||||
* <p>This is the only object which interact with other object<br>
|
||||
* Allows an outside person easily change the code or add a view easily without modifying existing classes</p>
|
||||
* @see AbstractView
|
||||
* @see Terminal
|
||||
* @see Window
|
||||
*/
|
||||
public interface View {
|
||||
|
||||
int[] shipsSize = { 5, 4, 3, 3, 2};
|
||||
|
||||
/**
|
||||
* Ask {@code player} to set position of its ships
|
||||
* @param player player instance we ask
|
||||
* @throws InterruptedException see {@link Window#setShips(Player)}
|
||||
*/
|
||||
void setShips(Player player) throws InterruptedException;
|
||||
|
||||
/**
|
||||
* Display all grids
|
||||
*/
|
||||
void displayBoard();
|
||||
|
||||
/**
|
||||
* ask the player the choose a position on its opponent grid
|
||||
* @param player {@link battleship.model.Game#currentPlayer}
|
||||
* @return a element containing the x and y coordinate (left side store Y and right side X)
|
||||
* @throws InterruptedException see {@link Window#chooseMove(Player)}
|
||||
*/
|
||||
Pair<Integer,Integer> chooseMove(Player player) throws InterruptedException;
|
||||
|
||||
/**
|
||||
* Display the winner of the game and then close the game
|
||||
* @param winner the winner of the game.
|
||||
* @see Window#displayWinner(Player)
|
||||
* @see Terminal#displayWinner(Player)
|
||||
*/
|
||||
void displayWinner(Player winner);
|
||||
}
|
304
livraison/src/battleship/view/Window.java
Normal file
@ -0,0 +1,304 @@
|
||||
package battleship.view;
|
||||
|
||||
import battleship.control.WindowKeyboardListener;
|
||||
import battleship.control.WindowMouseListener;
|
||||
import battleship.model.Direction;
|
||||
import battleship.model.Game;
|
||||
import battleship.model.Ship;
|
||||
import battleship.model.player.Human;
|
||||
import battleship.model.player.Player;
|
||||
import battleship.utils.Pair;
|
||||
import battleship.utils.Triplet;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.geom.RoundRectangle2D;
|
||||
|
||||
/**
|
||||
* Window view, instanced if argument 2 equals to "nogui"
|
||||
* @see View
|
||||
* @see AbstractView
|
||||
*/
|
||||
public class Window extends AbstractView {
|
||||
|
||||
final JFrame frame;
|
||||
|
||||
/**
|
||||
* grids height, do no represent frame size
|
||||
*/
|
||||
public final int height = 600;
|
||||
/**
|
||||
* grids width, do no represent frame size
|
||||
*/
|
||||
public final int width = 1200;
|
||||
private final WindowMouseListener mouseComponent;
|
||||
private final WindowKeyboardListener keyboardComponent;
|
||||
String upperTitle = "";
|
||||
String upperSubTitle = "";
|
||||
|
||||
public Window(Game game) {
|
||||
super(game);
|
||||
this.frame = new JFrame("Battleship");
|
||||
frame.setSize(width + width / 13, height + height / 4);
|
||||
frame.setResizable(false);
|
||||
frame.setContentPane(new Draw(this));
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
frame.setVisible(true);
|
||||
this.mouseComponent = new WindowMouseListener(this);
|
||||
frame.addMouseListener(mouseComponent);
|
||||
this.keyboardComponent = new WindowKeyboardListener();
|
||||
frame.addKeyListener(keyboardComponent);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getKeyInput() throws InterruptedException {
|
||||
return keyboardInput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a text above the grid
|
||||
* @param s text to display
|
||||
*/
|
||||
@Override
|
||||
protected void setUpperText(String s) {
|
||||
upperTitle = s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask {@code player} to set position of its ships
|
||||
* @param player player we ask
|
||||
* @throws InterruptedException see {@link Window#mouseInput(Player)} and {@link Window#getDirectionFromChar()}
|
||||
*/
|
||||
@Override
|
||||
public void setShips(Player player) throws InterruptedException {
|
||||
if(player instanceof Human) {
|
||||
for(int i : shipsSize) {
|
||||
Ship ship = new Ship(new Pair<>(-1, -1), i, Direction.DEFAULT);
|
||||
boolean valid = false;
|
||||
while(!player.setShips(ship)) {
|
||||
frame.repaint();
|
||||
if(valid)
|
||||
openDialog("Erreur de placement, votre navire se superpose avec un autre, ou la direction donnée n'est pas valide");
|
||||
|
||||
upperTitle = "joueur " + player.getId() + ", Placez votre premier navire de taille " + i + " à l'aide de la souris";
|
||||
ship.setCoords(mouseInput(player));
|
||||
upperTitle = "joueur " + player.getId() + ", Choisissez la direction de votre navire avec le clavier";
|
||||
upperSubTitle = "H, B, G, D pour respectivement Haut, Bas, Gauche, Droite";
|
||||
frame.repaint();
|
||||
ship.setDirection(getDirectionFromChar());
|
||||
ship.recalculateFullCoords();
|
||||
valid = true;
|
||||
}
|
||||
|
||||
}
|
||||
upperTitle = "";
|
||||
upperSubTitle = "";
|
||||
} else {
|
||||
super.setShips(player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ask {@link Game#currentPlayer} for keyboard input
|
||||
* @return String given by player
|
||||
* @throws InterruptedException throw if this Thread is interrupted while {@link Thread#sleep(long) sleeping}
|
||||
*/
|
||||
@Override
|
||||
protected String keyboardInput() throws InterruptedException {
|
||||
keyboardComponent.requestInput = true;
|
||||
while(true) {
|
||||
Thread.sleep(25);
|
||||
if(keyboardComponent.keyTyped != KeyEvent.CHAR_UNDEFINED) {
|
||||
keyboardComponent.requestInput = false;
|
||||
String value = String.valueOf(keyboardComponent.keyTyped).toUpperCase();
|
||||
keyboardComponent.keyTyped = KeyEvent.CHAR_UNDEFINED;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ask {@code player} for mouse input
|
||||
* @param player {@link Game#currentPlayer}
|
||||
* @return coordinate of {@code player} opponent grid
|
||||
* @throws InterruptedException throw if this Thread is interrupted while {@link Thread#sleep(long) sleeping}
|
||||
*/
|
||||
@Override
|
||||
protected Pair<Integer, Integer> mouseInput(Player player) throws InterruptedException {
|
||||
mouseComponent.requestInput = true;
|
||||
while(true) {
|
||||
Thread.sleep(25);
|
||||
if(mouseComponent.playerIdLastInput != 0) {
|
||||
if(player.getId() == mouseComponent.playerIdLastInput) {
|
||||
mouseComponent.requestInput = false;
|
||||
mouseComponent.playerIdLastInput = 0;
|
||||
Pair<Integer, Integer> value = mouseComponent.lastInput;
|
||||
mouseComponent.lastInput = null;
|
||||
return value;
|
||||
} else {
|
||||
openDialog("Vous avez cliqué sur une zone de jeu qui n'est pas la votre");
|
||||
mouseComponent.playerIdLastInput = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a window with {@code message} as content and with a "OK" button
|
||||
* @param message message to display
|
||||
* @param exitOnClose {@code true} if when user close this window, the program exit, {@code false} otherwise
|
||||
*/
|
||||
public void openDialog(String message, boolean exitOnClose) {
|
||||
JOptionPane.showMessageDialog(frame, message);
|
||||
if(exitOnClose)
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a window with {@code message} as content and with a "OK" button
|
||||
* @param message message to display
|
||||
* @see Window#openDialog(String, boolean)
|
||||
*/
|
||||
public void openDialog(String message) {
|
||||
openDialog(message, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* refresh windows to display updated content
|
||||
*/
|
||||
@Override
|
||||
public void displayBoard() {
|
||||
frame.paintComponents(frame.getGraphics());
|
||||
}
|
||||
|
||||
/**
|
||||
* ask player to choose a position in its opponent grid
|
||||
* @param player {@link battleship.model.Game#currentPlayer}
|
||||
* @return a couple ({@link Pair} containing the x and y coordinate (left side store Y and right side X)
|
||||
* @throws InterruptedException see {@link Window#mouseInput(Player)}
|
||||
*/
|
||||
@Override
|
||||
public Pair<Integer, Integer> chooseMove(Player player) throws InterruptedException {
|
||||
setUpperText("Joueur " + player.getId() + " cliquez sur l'emplacement où vous souhaitez tirer");
|
||||
frame.repaint();
|
||||
if(player instanceof Human) {
|
||||
Pair<Integer, Integer> coords = new Pair<>(-1, -1);
|
||||
boolean valid = false;
|
||||
while(!player.areValid(coords.getLeft(), coords.getRight())) {
|
||||
if(valid)
|
||||
openDialog("Erreur de placement, ce coup a déjà été effectué");
|
||||
valid = true;
|
||||
coords = mouseInput(game.getOtherPlayer(player));
|
||||
}
|
||||
return coords;
|
||||
}
|
||||
return super.chooseMove(player);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* open a dialog to display the winner and exit the program when window is closed
|
||||
* @param winner the winner of the game.
|
||||
*/
|
||||
@Override
|
||||
public void displayWinner(Player winner) {
|
||||
openDialog("Le joueur " + winner.getId() + " a gagné", true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Panel where we paint the board
|
||||
* @see JPanel
|
||||
*/
|
||||
class Draw extends JPanel {
|
||||
|
||||
private final Window window;
|
||||
|
||||
public Draw(Window window) {
|
||||
this.window = window;
|
||||
}
|
||||
|
||||
public void paintComponent(Graphics g) {
|
||||
super.paintComponent(g);
|
||||
Graphics2D g2d = (Graphics2D)g;
|
||||
g2d.drawString(upperTitle, (int) (window.width /2 - (upperTitle.length() * 2.5)), 50);
|
||||
g2d.drawString(upperSubTitle, (int) (window.width / 2 - (upperSubTitle.length() * 2.5)), 65);
|
||||
int width = window.width;
|
||||
int height = window.height;
|
||||
int initialHeight = height / 12;
|
||||
int initialWidth = width / 23;
|
||||
for(int abscisse = initialWidth; abscisse < width; abscisse += initialWidth) {
|
||||
g2d.drawLine(abscisse, initialHeight * 2, abscisse, height);
|
||||
if(abscisse == initialWidth * 11)
|
||||
abscisse += initialWidth;
|
||||
}
|
||||
for(int ordonnee = initialHeight * 2; ordonnee < height + 1; ordonnee += initialHeight) {
|
||||
g2d.drawLine(initialWidth, ordonnee, initialWidth * 11, ordonnee);
|
||||
g2d.drawLine(initialWidth * 13, ordonnee, width - 4, ordonnee);
|
||||
}
|
||||
|
||||
for(int i = 1; i < 3; ++i) {
|
||||
Player player = game.players[i-1];
|
||||
for(Ship ship : player.getShips()) {
|
||||
if(player == game.getCurrentPlayer() ||ship.isDrown()) {
|
||||
int x1 = i == 1 ? initialWidth : initialWidth * 13;
|
||||
int y1 = initialHeight * 2;
|
||||
int shipWidth = initialWidth;
|
||||
int shipHeight = initialHeight;
|
||||
switch(ship.getDirection()) {
|
||||
case DOWN:
|
||||
x1 += initialWidth * ship.getCoords().getRight();
|
||||
y1 += initialHeight * ship.getCoords().getLeft();
|
||||
shipHeight = initialHeight * ship.getSize();
|
||||
g.setColor(new Color(0, 255, 255));
|
||||
break;
|
||||
case UP:
|
||||
x1 += initialWidth * ship.getCoords().getRight();
|
||||
shipHeight = initialHeight * ship.getSize();
|
||||
y1 += initialHeight * ship.getCoords().getLeft() - shipHeight + initialHeight;
|
||||
g.setColor(new Color(255, 255, 0));
|
||||
break;
|
||||
case RIGHT:
|
||||
x1 += initialWidth * ship.getCoords().getRight();
|
||||
y1 += initialHeight * ship.getCoords().getLeft();
|
||||
shipWidth = initialWidth * ship.getSize();
|
||||
g.setColor(new Color(0, 255, 0));
|
||||
break;
|
||||
case LEFT:
|
||||
shipWidth = initialWidth * ship.getSize();
|
||||
x1 += initialWidth * ship.getCoords().getRight() - shipWidth + initialWidth;
|
||||
y1 += initialHeight * ship.getCoords().getLeft();
|
||||
g.setColor(new Color(0, 0, 255));
|
||||
break;
|
||||
}
|
||||
g2d.fillRoundRect(x1 + 1, y1 + 1, shipWidth - 1, shipHeight - 1, 25, 25);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(int i = 1; i < 3; ++i) {
|
||||
Player player = game.players[i-1];
|
||||
float rectangleSize = initialWidth / 4f;
|
||||
int sqrt = (int) Math.sqrt(initialHeight * initialHeight + initialWidth * initialWidth) - 10;
|
||||
for(Triplet<Integer, Integer, Boolean> move : player.getMoves()) {
|
||||
int x1 = (i == 1 ? initialWidth * 13 : initialWidth) + initialWidth * move.getMiddle();
|
||||
int y1 = initialHeight * 2 + initialHeight * move.getLeft() + 8;
|
||||
RoundRectangle2D cross1 = new RoundRectangle2D.Float(x1, y1, rectangleSize, sqrt, 15, 15);
|
||||
RoundRectangle2D cross2 = new RoundRectangle2D.Float(x1 + initialWidth - 9, y1 - 9, rectangleSize, sqrt, 15, 15);
|
||||
if(move.getRight()) {
|
||||
g.setColor(new Color(255, 0, 0));
|
||||
} else {
|
||||
g.setColor(new Color(0, 123, 255));
|
||||
}
|
||||
g2d.rotate(Math.toRadians(-45), x1, y1);
|
||||
g2d.fill(cross1);
|
||||
g2d.rotate(Math.toRadians(45), x1, y1);
|
||||
g2d.rotate(Math.toRadians(45), x1 + initialWidth - 9, y1 - 9);
|
||||
g2d.fill(cross2);
|
||||
g2d.rotate(Math.toRadians(-45), x1 + initialWidth - 9, y1 - 9);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
32
livraison/src/battleship/view/WindowListener.java
Normal file
@ -0,0 +1,32 @@
|
||||
package battleship.view;
|
||||
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
|
||||
public class WindowListener implements MouseListener {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent e) {
|
||||
|
||||
}
|
||||
}
|
4
livraison/src/battleship/view/package-info.java
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Contains terminal and windows view classes and theirs super class and interface
|
||||
*/
|
||||
package battleship.view;
|
3
src/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: battleship.Main
|
||||
|