public override string Action(ref MapGame mapGame, string textAction) { mapGame.hero.Damage += ADD_DAMAGE; mapGame.hero.attacksTechniques.Add(new HeavyAttack()); mapGame.ClearMapsCell(); Move(ref mapGame, textAction); return(mapGame.CenterViewMap()); }
/// <summary> /// Обработка перемещения /// </summary> /// <param name="textAction">комманда от клиента</param> protected void Move(ref MapGame mapGame, string textAction) { if (textAction == "d") { mapGame.GameHor += 1; } if (textAction == "a") { mapGame.GameHor -= 1; } if (textAction == "w") { mapGame.GameVert -= 1; } if (textAction == "s") { mapGame.GameVert += 1; } }
public override string Action(ref MapGame mapGame, string textAction) { Move(ref mapGame, textAction); return(mapGame.CenterViewMap()); }
public string Action(ref MapGame mapGame, string textAction) { throw new GameEndException("Thanks for the game, Wanderer"); }
public abstract string Action(ref MapGame mapGame, string textAction);