Beispiel #1
0
        public IWpfGameView CreateGameView(NumberOfPlayers players)
        {
            var view = new ChessView();

            view.ChessViewModel.Players = players;
            return(view);
        }
        public void UndoMove()
        {
            ChessView temp = new ChessView();

            if (!temp.IsEnabled)
            {
                return;
            }
            if (CanUndo)
            {
                mBoard.UndoLastMove();

                if (Players == NumberOfPlayers.One && CanUndo)
                {
                    mBoard.UndoLastMove();
                }
                RebindState();
            }
        }