/// <summary> /// Start be queen /// </summary> public void BeQueen() { CheckerImpl = new QueenChImpl(PlayerMoveDirection) { Cell = CheckerImpl.Cell }; CheckerGraphicalImplementation?.BeQueen(); }
/// <summary> /// Stop be queen /// </summary> public void UnBeQueen() { CheckerImpl = new SimpleChImpl(PlayerMoveDirection) { Cell = CheckerImpl.Cell }; CheckerGraphicalImplementation.UnBeQueen(); }
/// <summary> /// Constructor of checker /// </summary> /// <param name="cell">Cell, where the checker located</param> /// <param name="playerMoveDirection">Direction of moves</param> /// <param name="graphicalImplementation">Graphical implementation of checker</param> protected Checker(Cell cell, PlayerMoveDirection playerMoveDirection, CheckerGraphicalImplementation graphicalImplementation) { if (graphicalImplementation != null) { CheckerGraphicalImplementation = graphicalImplementation; CheckerGraphicalImplementation.SpriteClick += CheckerClick; CheckerGraphicalImplementation.SpriteClick += () => Click?.Invoke(); } CheckerImpl = new SimpleChImpl(playerMoveDirection); Cell = cell; // cell.Checker = this; }