private void Form1_MouseUp(object sender, MouseEventArgs e) { // check if the game has started if (!GameStarting) { foreach (Ship ship in ships) { if (ship.Draggering) { ship.IsInThePlatform(e.X, e.Y, platAlly); ship.Draggering = false; } } } }