Добавила комментарии

This commit is contained in:
victinass 2024-02-19 09:33:36 +04:00
parent e89bd91679
commit e80fba02ee
3 changed files with 14 additions and 2 deletions

View File

@ -61,7 +61,7 @@ public class DrawingBattleship
/// <summary> /// <summary>
/// /// Установка границ поля
/// </summary> /// </summary>
/// <param name="width">Ширина поля</param> /// <param name="width">Ширина поля</param>
/// <param name="height">Высота поля</param> /// <param name="height">Высота поля</param>

View File

@ -38,6 +38,9 @@ public class EntityBattleship
/// </summary> /// </summary>
public double Step => Speed * 100 / Weight; public double Step => Speed * 100 / Weight;
/// <summary>
/// Инициализация полей объекта-класса линкора
/// </summary>
/// <param name="speed"></param> /// <param name="speed"></param>
/// <param name="weight"></param> /// <param name="weight"></param>
/// <param name="bodyColor"></param> /// <param name="bodyColor"></param>

View File

@ -30,7 +30,11 @@ public partial class FormBattleship : Form
pictureBoxBattleship.Image = bmp; pictureBoxBattleship.Image = bmp;
} }
/// <summary>
/// обработка нажатия кнопки "создать линкор"
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonCreate_Click(object sender, EventArgs e) private void buttonCreate_Click(object sender, EventArgs e)
{ {
Random random = new(); Random random = new();
@ -46,6 +50,11 @@ public partial class FormBattleship : Form
} }
/// <summary>
/// обработка нажатия кнопок "вверх/вниз/влево/вправо"
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonMove_Click(object sender, EventArgs e) private void buttonMove_Click(object sender, EventArgs e)
{ {
if (_drawingBattleship == null) if (_drawingBattleship == null)