private void StoppedDraggingShip(object sender, MouseEventArgs e) { Ship TargetShip = sender as Ship; // Check if we Can Place the ship Point ShipLocation = PlayingField.GetElementLocation(TargetShip); }
private void PlaceShip(Point p, Ship s) { playingField.Children.Add(s); PlayingField.SetElementPosition(s, p); }
private void playingField_PositionChanged(object sender, MouseEventArgs e) { PlayingField P = sender as PlayingField; PlayingField.SetElementPosition(P.Children[0], P.CurrentGridPosition); }