コード例 #1
0
        public IWpfGameView CreateGameView(NumberOfPlayers players)
        {
            var view = new ChessView();

            view.ChessViewModel.Players = players;
            return(view);
        }
コード例 #2
0
        public void UndoMove()
        {
            ChessView temp = new ChessView();

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

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