コード例 #1
0
        private void FigureSelectionCommandExecute(string figureType)
        {
            _cell.TransformFigureOnCel(figureType, _cell.Figure.IsWhite);

            IsPawnTransformationPopup = false;
            RaisePropertyChanged("IsPawnTransformationPopup");
            InvokePawnTransformationDoneEvent();
        }
コード例 #2
0
        private void InputInformationExecute(object source, InputDataEventArgs args)
        {
            CellViewModel fromCell = Cells.Single(rec => rec.Cell == args.FromCell);
            CellViewModel toCell   = Cells.Single(rec => rec.Cell == args.ToCell);

            _makeTurnFromInputController = true;
            if (!MakeTurnExecute(fromCell, toCell))
            {
                throw new ChessGameException("Input with synchronisation error.");
            }

            if (args.FigureName != null)
            {
                toCell.TransformFigureOnCel(args.FigureName, toCell.Figure.IsWhite);
            }

            RaisePropertyChanged("IsWaiting");
        }