private void PokemonAttack(IPokemon attackingPokemon, IPokemon targetPokemon, int chosenMove) { IMove move = attackingPokemon.Moves[chosenMove]; if (ConsoleBattleInfoMove.MoveDoesNotHavePowerPointsLeft(move)) { PromptTrainerForPokemonMove(); return; } ConsoleBattleInfoPokemon.ShowPokemonUsedMove(attackingPokemon, move.GetType().Name); if (TypeComparer.PokemonTypeDoesNotMakeContactWithMove(targetPokemon.Types, move)) { ConsoleUtils.ShowMessageAndWaitOneSecond($"It didn't affect {targetPokemon.GetType().Name}!"); } else { ProcessAttack(attackingPokemon, targetPokemon, move); } ConsoleUtils.ClearScreen(); }
public bool Beats(IMove other) { return(other.GetType() == typeof(Rock)); }
public bool Beats(IMove other) { return(other.GetType() == typeof(Scissors)); }
public bool WinAgainst(IMove move) => !move.GetType().IsEquivalentTo(typeof(Scissors));
public bool WinAgainst(IMove move) => !move.GetType().IsEquivalentTo(typeof(Paper));