コード例 #1
0
ファイル: Ship3.cs プロジェクト: zDainy/Sea-Battleship
 private void Ship_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) //no
 {
     WindowConfig.ShipState = WindowConfig.State.Ship3;
     IsPlaced = false;
     for (int i = 0; i < Length; i++)
     {
         PlayField.DeleteCell(Grid.GetColumn(Images[i]), Grid.GetRow(Images[i]), playField);
     }
 }
コード例 #2
0
ファイル: Ship3.cs プロジェクト: zDainy/Sea-Battleship
        private void Ship_MouseRightButtonDown(object sender, MouseButtonEventArgs e) //no
        {
            int x = Grid.GetColumn(Images[0]);
            int y = Grid.GetRow(Images[0]);

            for (int i = 0; i < Length; i++)
            {
                PlayField.DeleteCell(Grid.GetColumn(Images[i]), Grid.GetRow(Images[i]), playField);
            }
            ChangeOrientation();
            Place(x, y, playField);
        }