game-battleship
Version:
A battleship program
85 lines (45 loc) • 2.88 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Home</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">Home</h1>
<h3> </h3>
<section>
<article><h1>Project Title</h1><p>BattleShip is a turn-based two-player game that simulates a war between ships on an ocean.
Each player gets their own battle area with a certain number of ships placed in non-overlapping positions. The ships
might be of different sizes. Note, players cannot see each others ship's location.</p>
<h3>Prerequisites</h3><p> The code is compatible with node version >=8.12.0</p>
<h2>How to use</h2><pre class="prettyprint source"><code>The entry point to the souce code is src/main.js. So either we can directly run this file from node or can also be executed via npm. Both are explained below.</code></pre><h3>via node</h3><pre class="prettyprint source"><code>node <path to the entry point> <input file path>
e.g. node src\main.js .\..\..\thoughtWorks\draw.txt</code></pre><h3>via npm</h3><pre class="prettyprint source"><code>or we can run it from npm script as :
npm start <input file path>
e.g. npm start .\..\..\thoughtWorks\draw.txt</code></pre><h3>Output</h3><p>The output of the program would be printed to the console itself in the same manner as expected.</p>
<h2>Running the tests</h2><p>Unit test cases can be executed via the below command from the same directory:</p>
<p>npm test</p>
<h2>Documentation</h2><p>The code documentation can be accessed from the url:
<a href="./out/index.html">Documenation</a></p>
<p>Or it can be directly accesed from the below location:</p>
<p>out/index.html. Just open this file.</p></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>