types.js 793 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. 'use strict';
  2. const Constants = {
  3. // Server requests status
  4. request: {
  5. IDLE: 'idle',
  6. REQUESTED: 'requested',
  7. SUCCESS: 'success',
  8. ERROR: 'ERROR'
  9. },
  10. // Positions of heroes in game
  11. POS_PILE: 'pile',
  12. POS_HAND: 'hand',
  13. POS_DISCARD: 'discard',
  14. POS_CAMP: 'camp',
  15. POS_BATTLE_LEFT: 'battle_left',
  16. POS_BATTLE_CENTER: 'battle_center',
  17. POS_BATTLE_RIGHT: 'battle_right',
  18. // Possible hero actions in game
  19. HERO_RECRUIT: 'recruit',
  20. HERO_DEPLOY: 'deploy',
  21. HERO_MOVE: 'move',
  22. HERO_ABILITY: 'ability',
  23. HERO_DISMISS: 'dismiss',
  24. HERO_DISCARD: 'discard',
  25. // Possible actions for player in game
  26. PLAYER_SUPPLY: 'supply'
  27. };
  28. Constants.install = function(Vue) {
  29. Vue.prototype.$types = key => {
  30. return Constants[key];
  31. };
  32. };
  33. export default Constants;