예제 #1
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            CreateBoard();
            UpdateBoard(this, null);
            GameBoard.PropertyChanged += UpdateBoard;

            //CommitMove += test1;


            CommitMove += GameBoard.AtachPlayer(new Action(() => { }) /*do nothing, to be replaceed*/, ChessColor.White);
            //GameBoard.AtachPlayer(new Action(() => { })/*do nothing, to be replaceed*/, ChessColor.Black);

            ChessBot.Board       = GameBoard;
            ChessBot.CommitMove += GameBoard.AtachPlayer(ChessBot.MoveRequest, ChessColor.Black);

            GameBoard.Begin();

            //temp

            //VisualChessPiece p = new VisualChessPiece(new Uri("pack://application:,,,/textures/Chess_bdt60.png"));
            //ChessGrid.Children.Add(p);
            //p.Tile = TileMap[0][0];
        }