コード例 #1
0
ファイル: Turret.cs プロジェクト: TeamLeoTolstoy/Leo
 public Turret(PositionOfElement position)
     : base(position, ConsoleColor.Blue, Image)
 {
     this.Damage = TurretDamage;
     this.PriceOfTower = TurretPrice;
     this.Range = TurretRange;
 }
コード例 #2
0
ファイル: Tower.cs プロジェクト: TeamLeoTolstoy/Leo
 public Tower(PositionOfElement positionOfElement, ConsoleColor fColor, char[,] image)
 {
     this.PositionOfElement = positionOfElement;
     this.ElementImage = image;
     this.ForegroundColor = fColor;
     this.BackgroundColor = ConsoleColor.Black;
 }
コード例 #3
0
ファイル: AdvancedTurret.cs プロジェクト: TeamLeoTolstoy/Leo
 public AdvancedTurret(PositionOfElement position)
     : base(position, ConsoleColor.Yellow, Image)
 {
     this.Damage = AdvTurretDamage;
     this.PriceOfTower = AdvTurretPrice;
     this.Range = AdvTurretRange;
 }
コード例 #4
0
ファイル: Player.cs プロジェクト: TeamLeoTolstoy/Leo
 public Player(PositionOfElement positionOfPlayer)
 {
     this.ElementImage = new char[1, 1] { { 'O' } };
     this.PositionOfElement = positionOfPlayer;
     this.ForegroundColor = ConsoleColor.Red;
     this.BackgroundColor = ConsoleColor.Black;
     this.ScoreOfPlayer = new Score();
 }
コード例 #5
0
ファイル: Base.cs プロジェクト: TeamLeoTolstoy/Leo
 public Base(PositionOfElement positionOfElement)
 {
     this.ElementImage = new char[3, 4]
     {
         { '#', '#', '#', '#' },
         { 'b', 'a', 's', 'e' },
         { '#', '#', '#', '#' },
     };
     this.PositionOfElement = positionOfElement;
     this.ForegroundColor = ConsoleColor.Gray;
     this.BackgroundColor = ConsoleColor.Black;
 }
コード例 #6
0
ファイル: Path.cs プロジェクト: TeamLeoTolstoy/Leo
 public static PositionOfElement GetNextPosition(PositionOfElement currentPosition)
 {
     int currentIndex = PathOfPoints.IndexOf(currentPosition);
     if (currentIndex + 1 < PathOfPoints.Count)
     {
         return PathOfPoints[currentIndex + 2];
     }
     else
     {
         throw new IndexOutOfRangeException("End of path!");
     }
 }