예제 #1
0
        public void ParseClick(int x, int y)
        {
            //Find cell where mouse clicked and change it's state
            if (XYinGrid(x, y))
            {
                int X = (x - OffX) / CellW;
                int Y = (y - OffY) / CellH;
                ClopWar.MakeMove(X, Y);
                cx = X; cy = Y;

                OwnerForm.Invalidate();
            }
        }
예제 #2
0
 private void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
 {
     ClpDraw.ParseKey(e);
     CheckGame();
     if (e.Shift)
     {
         Clp.MakeMove(ClpDraw.Cx, ClpDraw.Cy);
     }
     CheckGame();
 }