Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
471 B
1
Indexable
Never
// FIGHTER

import Energy from '../Energy';
import SimpleFighter from './SimpleFighter';

interface Fighter extends SimpleFighter {
  defense: number;
  energy?: Energy;

  special?(enemy: SimpleFighter | Fighter): void;
  levelUp(): void;
}

export default Fighter;

// SIMPLEFIGHTER

interface SimpleFighter {
  lifePoints: number;
  strength: number;
  attack(enemy: SimpleFighter): void;
  receiveDamage(attackPoints: number): number;
}

export default SimpleFighter;
Leave a Comment