Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using BatchDescriptionLibrary.Enums;
- using BatchDescriptionLibrary.Structs;
- namespace BatchDescriptionLibrary.Steps
- {
- public abstract class BaseStep
- {
- public Position FirstPosition { get; private set; }
- public Position SecondPosition { get; private set; }
- public Figures Figure { get; protected set; }
- public PlayersColor FigureColor { get; private set; }
- public Enums.Actions StepAction { get; private set; }
- public Figures Target { get; private set; }
- public Position TargetPosition { get; private set; }
- public BaseStep(BoardLeters letter1, BoardNumerics numer1, BoardLeters letter2,
- BoardNumerics numer2, Figures figure, PlayersColor color,
- Enums.Actions iaction, BoardLeters lettert, BoardNumerics numert,
- Figures figuret)
- {
- FirstPosition = new Position(letter1, numer1);
- SecondPosition = new Position(letter2, numer2);
- Figure = figure;
- FigureColor = color;
- StepAction = iaction;
- Target = figuret;
- TargetPosition = new Position(lettert, numert);
- }
- public abstract string ToString { get; }
- }
- public class Step : BaseStep
- {
- public Step(BoardLeters letter1, BoardNumerics numer1, BoardLeters letter2,
- BoardNumerics numer2, Figures figure, PlayersColor color, Enums.Actions iaction)
- : base(letter1, numer1, letter2, numer2, figure, color, Enums.Actions.Step,
- BoardLeters.Void, BoardNumerics.Void, Figures.Void)
- {
- //
- }
- public override string ToString
- {
- get
- {
- return string.Format(
- "{0} : {1}{2} - {3}{4} Шаг",
- FigureColor,
- FirstPosition.Letter,
- (int)FirstPosition.Numeric,
- SecondPosition.Letter,
- (int)SecondPosition.Numeric
- );
- }
- }
- }
- public class AttackStep : BaseStep
- {
- public AttackStep(BoardLeters letter1, BoardNumerics numer1, BoardLeters letter2,
- BoardNumerics numer2, Figures figure, PlayersColor color, BoardLeters lettert,
- BoardNumerics numert, Figures figuret)
- : base(letter1, numer1, letter2, numer2, figure, color, Enums.Actions.Kill, lettert,
- numert, figuret)
- {
- //
- }
- public override string ToString
- {
- get
- {
- return string.Format( // Не доделано
- "{0} : {1}{2} - {3}{4} Шаг",
- FigureColor,
- FirstPosition.Letter,
- (int)FirstPosition.Numeric,
- SecondPosition.Letter,
- (int)SecondPosition.Numeric
- );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement