Update READMEs and documentation (#6)
parent
c78612ab88
commit
e22f722092
@ -0,0 +1,51 @@
|
|||||||
|
# Battleship
|
||||||
|
## EECS 448 - Project 1
|
||||||
|
|
||||||
|
This is a basic battleship game created as our submission for project 1 for EECS 448 at the University of Kansas.
|
||||||
|
|
||||||
|
## Structure Info
|
||||||
|
This project has been wired up to use Vue.js to help organize components of the game.
|
||||||
|
|
||||||
|
These components are defined in files that end in the `.component.js` extension, and are located in the `src/components/` directory.
|
||||||
|
|
||||||
|
The entry point for the project is the `index.html`. This file contains the basic logic for loading Vue, and adding the game board to the page.
|
||||||
|
|
||||||
|
Obviously, we'll flesh out the look-and-feel as we go along. This is just a basic starter for now.
|
||||||
|
|
||||||
|
## How to Run
|
||||||
|
The easiest way to run this project is by creating a basic static web server using Python. This is super simple:
|
||||||
|
|
||||||
|
1. Open a terminal or command prompt to the root of this project (i.e. the directory this file is in).
|
||||||
|
2. Start the server: `python -m http.server`
|
||||||
|
|
||||||
|
This will start a web server on port 8000. You can then run the game by navigating to http://localhost:8000/ from a web browser.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
You can [preview it here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/EECS-448-Battleship/project-1/master/documentation/generated/index.html). Otherwise, it is generated by JSDoc in the `documentation/generated` directory.
|
||||||
|
|
||||||
|
### Re-generating the documentation
|
||||||
|
To regenerate the docs, you need Node.js and the Yarn package manager installed. Then, just:
|
||||||
|
|
||||||
|
```shell script
|
||||||
|
cd documentation
|
||||||
|
./generate.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Third-Party Libraries
|
||||||
|
The files in the `lib/` are external libraries used in this project.
|
||||||
|
|
||||||
|
- Vue.js
|
||||||
|
- A front-end framework. Used under the terms of the MIT license.
|
||||||
|
- https://github.com/vuejs/vue
|
||||||
|
- VuES6.js
|
||||||
|
- A kind-of crappy loader for defining Vue components using ES6 classes.
|
||||||
|
- Also used under the terms of the MIT license.
|
||||||
|
- https://code.garrettmills.dev/garrettmills/vues6
|
||||||
|
- Sound effects obtained from https://www.zapsplat.com and used with permission.
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
- Lucas Brakenridge
|
||||||
|
- Javier Barea Lara
|
||||||
|
- Garrett Mills
|
||||||
|
- Evan Powell
|
||||||
|
- Alec Horlick-Mills
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
yarn install
|
yarn install
|
||||||
./node_modules/.bin/jsdoc --destination ./generated --recurse ../src
|
./node_modules/.bin/jsdoc --destination ./generated --readme ./README.md --recurse ../src
|
||||||
|
@ -1,182 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>JSDoc: Class: InvalidAdvanceStateError</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: InvalidAdvanceStateError</h1>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
|
|
||||||
<h2><span class="attribs"><span class="type-signature"></span></span>InvalidAdvanceStateError<span class="signature">()</span><span class="type-signature"></span></h2>
|
|
||||||
|
|
||||||
<div class="class-description">Error thrown when the program tries to advance the state, but it is
|
|
||||||
invalid.</div>
|
|
||||||
|
|
||||||
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<div class="container-overview">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Constructor</h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="InvalidAdvanceStateError"><span class="type-signature"></span>new InvalidAdvanceStateError<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_errors.js.html">module/errors.js</a>, <a href="module_errors.js.html#line13">line 13</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="subsection-title">Extends</h3>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Error</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="GameBoardComponent.html">GameBoardComponent</a></li><li><a href="GameStateService.html">GameStateService</a></li><li><a href="GridCellComponent.html">GridCellComponent</a></li><li><a href="InvalidAdvanceStateError.html">InvalidAdvanceStateError</a></li><li><a href="InvalidMissileFireAttemptError.html">InvalidMissileFireAttemptError</a></li><li><a href="InvalidShipPlacementError.html">InvalidShipPlacementError</a></li><li><a href="ScoreBoardComponent.html">ScoreBoardComponent</a></li><li><a href="Sound.html">Sound</a></li><li><a href="TopLevelComponent.html">TopLevelComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#appUrl">appUrl</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#GameState">GameState</a></li><li><a href="global.html#GridCellState">GridCellState</a></li><li><a href="global.html#instructions">instructions</a></li><li><a href="global.html#isShipCell">isShipCell</a></li><li><a href="global.html#isValidTargetCell">isValidTargetCell</a></li><li><a href="global.html#Player">Player</a></li><li><a href="global.html#ShipType">ShipType</a></li></ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<br class="clear">
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Sat Sep 12 2020 16:27:46 GMT-0500 (Central Daylight Time)
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
|
||||||
<script src="scripts/linenumber.js"> </script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,181 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>JSDoc: Class: InvalidMissileFireAttemptError</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: InvalidMissileFireAttemptError</h1>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
|
|
||||||
<h2><span class="attribs"><span class="type-signature"></span></span>InvalidMissileFireAttemptError<span class="signature">()</span><span class="type-signature"></span></h2>
|
|
||||||
|
|
||||||
<div class="class-description">Error thrown when a missile is fired at an invalid cell.</div>
|
|
||||||
|
|
||||||
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<div class="container-overview">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Constructor</h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="InvalidMissileFireAttemptError"><span class="type-signature"></span>new InvalidMissileFireAttemptError<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_errors.js.html">module/errors.js</a>, <a href="module_errors.js.html#line19">line 19</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="subsection-title">Extends</h3>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Error</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="GameBoardComponent.html">GameBoardComponent</a></li><li><a href="GameStateService.html">GameStateService</a></li><li><a href="GridCellComponent.html">GridCellComponent</a></li><li><a href="InvalidAdvanceStateError.html">InvalidAdvanceStateError</a></li><li><a href="InvalidMissileFireAttemptError.html">InvalidMissileFireAttemptError</a></li><li><a href="InvalidShipPlacementError.html">InvalidShipPlacementError</a></li><li><a href="ScoreBoardComponent.html">ScoreBoardComponent</a></li><li><a href="Sound.html">Sound</a></li><li><a href="TopLevelComponent.html">TopLevelComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#appUrl">appUrl</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#GameState">GameState</a></li><li><a href="global.html#GridCellState">GridCellState</a></li><li><a href="global.html#instructions">instructions</a></li><li><a href="global.html#isShipCell">isShipCell</a></li><li><a href="global.html#isValidTargetCell">isValidTargetCell</a></li><li><a href="global.html#Player">Player</a></li><li><a href="global.html#ShipType">ShipType</a></li></ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<br class="clear">
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Sat Sep 12 2020 16:27:46 GMT-0500 (Central Daylight Time)
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
|
||||||
<script src="scripts/linenumber.js"> </script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,182 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>JSDoc: Class: InvalidShipPlacementError</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: InvalidShipPlacementError</h1>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
|
|
||||||
<h2><span class="attribs"><span class="type-signature"></span></span>InvalidShipPlacementError<span class="signature">()</span><span class="type-signature"></span></h2>
|
|
||||||
|
|
||||||
<div class="class-description">Placeholder class for an error that is thrown when a ship is placed
|
|
||||||
in an invalid position.</div>
|
|
||||||
|
|
||||||
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<div class="container-overview">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Constructor</h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="InvalidShipPlacementError"><span class="type-signature"></span>new InvalidShipPlacementError<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_errors.js.html">module/errors.js</a>, <a href="module_errors.js.html#line6">line 6</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="subsection-title">Extends</h3>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Error</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="GameBoardComponent.html">GameBoardComponent</a></li><li><a href="GameStateService.html">GameStateService</a></li><li><a href="GridCellComponent.html">GridCellComponent</a></li><li><a href="InvalidAdvanceStateError.html">InvalidAdvanceStateError</a></li><li><a href="InvalidMissileFireAttemptError.html">InvalidMissileFireAttemptError</a></li><li><a href="InvalidShipPlacementError.html">InvalidShipPlacementError</a></li><li><a href="ScoreBoardComponent.html">ScoreBoardComponent</a></li><li><a href="Sound.html">Sound</a></li><li><a href="TopLevelComponent.html">TopLevelComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#appUrl">appUrl</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#GameState">GameState</a></li><li><a href="global.html#GridCellState">GridCellState</a></li><li><a href="global.html#instructions">instructions</a></li><li><a href="global.html#isShipCell">isShipCell</a></li><li><a href="global.html#isValidTargetCell">isValidTargetCell</a></li><li><a href="global.html#Player">Player</a></li><li><a href="global.html#ShipType">ShipType</a></li></ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<br class="clear">
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Sat Sep 12 2020 16:27:46 GMT-0500 (Central Daylight Time)
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
|
||||||
<script src="scripts/linenumber.js"> </script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,479 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>JSDoc: Class: Sound</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: Sound</h1>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
|
|
||||||
<h2><span class="attribs"><span class="type-signature"></span></span>Sound<span class="signature">(src)</span><span class="type-signature"></span></h2>
|
|
||||||
|
|
||||||
<div class="class-description">A thin wrapper for sound effects.</div>
|
|
||||||
|
|
||||||
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<article>
|
|
||||||
<div class="container-overview">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Constructor</h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="Sound"><span class="type-signature"></span>new Sound<span class="signature">(src)</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Construct the sound.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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>src</code></td>
|
|
||||||
|
|
||||||
|
|
||||||
<td class="type">
|
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td class="description last">URL of the file</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_sounds.js.html">module/sounds.js</a>, <a href="module_sounds.js.html#line11">line 11</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="subsection-title">Members</h3>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="sound"><span class="type-signature"></span>sound<span class="type-signature"> :HTMLAudioElement</span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
The sound element.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h5>Type:</h5>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class="param-type">HTMLAudioElement</span>
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_sounds.js.html">module/sounds.js</a>, <a href="module_sounds.js.html#line16">line 16</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3 class="subsection-title">Methods</h3>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="play"><span class="type-signature">(async) </span>play<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Start playing the sound.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_sounds.js.html">module/sounds.js</a>, <a href="module_sounds.js.html#line28">line 28</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Pause the sound.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="module_sounds.js.html">module/sounds.js</a>, <a href="module_sounds.js.html#line40">line 40</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</article>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="GameBoardComponent.html">GameBoardComponent</a></li><li><a href="GameStateService.html">GameStateService</a></li><li><a href="GridCellComponent.html">GridCellComponent</a></li><li><a href="InvalidAdvanceStateError.html">InvalidAdvanceStateError</a></li><li><a href="InvalidMissileFireAttemptError.html">InvalidMissileFireAttemptError</a></li><li><a href="InvalidShipPlacementError.html">InvalidShipPlacementError</a></li><li><a href="ScoreBoardComponent.html">ScoreBoardComponent</a></li><li><a href="Sound.html">Sound</a></li><li><a href="TopLevelComponent.html">TopLevelComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#appUrl">appUrl</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#GameState">GameState</a></li><li><a href="global.html#GridCellState">GridCellState</a></li><li><a href="global.html#instructions">instructions</a></li><li><a href="global.html#isShipCell">isShipCell</a></li><li><a href="global.html#isValidTargetCell">isValidTargetCell</a></li><li><a href="global.html#Player">Player</a></li><li><a href="global.html#ShipType">ShipType</a></li></ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<br class="clear">
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Sat Sep 12 2020 16:27:46 GMT-0500 (Central Daylight Time)
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
|
||||||
<script src="scripts/linenumber.js"> </script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue