Skip to content

Instantly share code, notes, and snippets.

@happyDemon
Created March 4, 2017 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happyDemon/1e7323e0cd1b356dbf377dc62921e348 to your computer and use it in GitHub Desktop.
Save happyDemon/1e7323e0cd1b356dbf377dc62921e348 to your computer and use it in GitHub Desktop.
Vue.js explained through Pokemon #5
calculateDamage(attackName) {
const attack = this.local.pokemon.attacks[attackName];
const damage = new Damage(attack, this.local.pokemon, this.opponent.pokemon);
return damage.power(this.otherPokemon);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment