protected void Mouse_Leave(object sender, System.EventArgs t)
 {
     if (IfPlayerActive.EventHandler(color))
     {
         (sender as PictureBox).Cursor = System.Windows.Forms.Cursors.Default;
     }
 }
 protected void Mouse_Move(object sender, MouseEventArgs e)
 {
     if (dragndrop == true)
     {
         (sender as PictureBox).Top  += e.Y - loc.Y;
         (sender as PictureBox).Left += e.X - loc.X;
     }
     else
     {
         if (IfPlayerActive.EventHandler(color))
         {
             (sender as PictureBox).Cursor = System.Windows.Forms.Cursors.Hand;
         }
     }
 }
        protected void Mouse_Click(object sender, MouseEventArgs e)
        {
            if (IfPlayerActive.EventHandler(color) && !dragndrop)
            {
                dragndrop = true;
                (sender as PictureBox).BringToFront();
                loc = e.Location;
                (sender as PictureBox).Cursor = System.Windows.Forms.Cursors.Hand;
                return;
            }

            int x_change = Math.Abs(((x - 23) / 80 - ((sender as PictureBox).Left + (e.X - loc.X) + 7) / 80));
            int y_change = Math.Abs(((y - 46) / 80 - ((sender as PictureBox).Top + (e.Y - loc.Y) - 16) / 80));

            if (dragndrop && CheckCell.EventHandler(((sender as PictureBox).Left + (e.X - loc.X) + 7) / 80, ((sender as PictureBox).Top + (e.Y - loc.Y) - 16) / 80) && (x_change <= 1 && y_change <= 1 || Math.Abs(x_change - y_change) != 1))
            {
                dragndrop = false;
                (sender as PictureBox).Cursor = System.Windows.Forms.Cursors.Default;
                Change_Coords(((sender as PictureBox).Left + (e.X - loc.X) + 7) / 80 * 80 + 30, ((sender as PictureBox).Top + (e.Y - loc.Y) - 16) / 80 * 80 + 53);
                return;
            }
        }