server_src_client-server-shared_def_constants.js.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Source: server/src/client-server-shared/def/constants.js</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Source: server/src/client-server-shared/def/constants.js</h1>
  17. <section>
  18. <article>
  19. <pre class="prettyprint source linenums"><code>import * as typedefs from 'def/typedefs';
  20. /**
  21. * @namespace constants
  22. */
  23. // Positions of heroes in game
  24. /**
  25. * @constant
  26. * @type {typedefs.HeroPosition}
  27. * @default
  28. * @memberof constants
  29. */
  30. export const JOJO = 'camp';
  31. export const Constants = {
  32. // Server requests status
  33. REQ_IDLE: 'idle',
  34. REQ_REQUESTED: 'requested',
  35. REQ_SUCCESS: 'success',
  36. REQ_ERROR: 'error',
  37. // Positions of heroes in game
  38. /**
  39. * @constant
  40. * @type {typedefs.HeroPosition}
  41. * @default
  42. * @memberof constants
  43. */
  44. POS_PILE: 'pile',
  45. POS_HAND: 'hand',
  46. POS_DISCARD: 'discard',
  47. POS_CAMP: 'camp',
  48. POS_BATTLE_LEFT: 'battle_left',
  49. POS_BATTLE_CENTER: 'battle_center',
  50. POS_BATTLE_RIGHT: 'battle_right',
  51. // Possible hero actions in game
  52. HERO_RECRUIT: 'recruit',
  53. HERO_DEPLOY: 'deploy',
  54. HERO_MOVE: 'move',
  55. HERO_ABILITY: 'ability',
  56. HERO_DISMISS: 'dismiss',
  57. HERO_DISCARD: 'discard',
  58. HERO_REPLACE: 'replace',
  59. // Possible actions for player in game
  60. PLAYER_SUPPLY: 'supply',
  61. PLAYER_PASS: 'pass'
  62. };
  63. Constants.install = function(Vue) {
  64. Vue.prototype.$types = key => {
  65. return Constants[key];
  66. };
  67. };
  68. </code></pre>
  69. </article>
  70. </section>
  71. </div>
  72. <nav>
  73. <h2><a href="index.html">12 Heroes</a></h2><h3>Modules</h3><ul><li><a href="module-GameStore%2520-%2520vuex%2520store%2520part%2520with%2520game%2520data.html">GameStore - vuex store part with game data</a></li></ul><h3>Namespaces</h3><ul><li><a href="constants.html">constants</a></li></ul><h3>Global</h3><ul><li><a href="global.html#Typedefs">Typedefs</a></li></ul>
  74. </nav>
  75. <br class="clear">
  76. <footer>
  77. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Mon May 18 2020 22:36:59 GMT+0200 (Central European Summer Time)
  78. </footer>
  79. <script> prettyPrint(); </script>
  80. <script src="scripts/linenumber.js"> </script>
  81. </body>
  82. </html>