예제 #1
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            var geometry = new SquareGridGeometry(BoardSize, BoardSize, this.Width, this.Height, 5);
            var cell     = geometry.GetCellCoordinates(e.X, e.Y);

            if (cell.HasValue)
            {
                this.OnAction?.Invoke(new GameAction(cell.Value));
            }
        }
예제 #2
0
        protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
        {
            var geometry = new SquareGridGeometry(BoardSize, BoardSize, this.Width, this.Height, 5);
            var cell     = geometry.GetCellCoordinates(e.X, e.Y);

            if (cell.HasValue)
            {
                //this.RaiseFieldSelect(cell.Value.ToGameAction());
            }
        }