Ejemplo n.º 1
0
        protected void Redbutton_Click(object sender, EventArgs e)
        {
            if (client.GetPlayerId() == 2)
            {
                return;
            }
            Button button = sender as Button;

            if (playerMove.IsEmpty())
            {
                CKPoint point = (CKPoint)button.Tag;
                playerMove.BuildMove(point);
                System.Diagnostics.Debug.WriteLine("Point: " + point.GetRow() + "," + point.GetColumn());

                // Color boarder
                Button piece = (Button)sender;
                piece.FlatAppearance.BorderSize  = 1;
                piece.FlatAppearance.BorderColor = Color.White;
            }
            // identify which button was clicked and perform necessary actions
        }