game-battleship
Version:
A battleship program
483 lines (124 loc) • 5.58 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Area</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Area</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>Area<span class="signature">(type, dimension, ships)</span><span class="type-signature"></span></h2>
<div class="class-description">Area</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="Area"><span class="type-signature"></span>new Area<span class="signature">(type, dimension, ships)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">This defines the type of the ship "P" & "Q"</td>
</tr>
<tr>
<td class="name"><code>dimension</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Represnts the dimension of the area</td>
</tr>
<tr>
<td class="name"><code>ships</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Represnts the ships for a player</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="shipArea.js.html">shipArea.js</a>, <a href="shipArea.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="decrementShipCount"><span class="type-signature"></span>decrementShipCount<span class="signature">()</span><span class="type-signature"> → {null}</span></h4>
<div class="description">
Function to decremen the ship count
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="shipArea.js.html">shipArea.js</a>, <a href="shipArea.js.html#line54">line 54</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
returns nothing
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">null</span>
</dd>
</dl>
<h4 class="name" id="isAreaDestroyed"><span class="type-signature"></span>isAreaDestroyed<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
Function to check if the area is destroyed
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="shipArea.js.html">shipArea.js</a>, <a href="shipArea.js.html#line46">line 46</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
returns true if area is destroyed else false
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Area.html">Area</a></li><li><a href="Player.html">Player</a></li><li><a href="Ship.html">Ship</a></li></ul><h3>Global</h3><ul><li><a href="global.html#battle">battle</a></li><li><a href="global.html#fileReader">fileReader</a></li><li><a href="global.html#parseCoordinates">parseCoordinates</a></li><li><a href="global.html#validateArgs">validateArgs</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Feb 19 2019 14:14:50 GMT+0530 (India Standard Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>