diff --git a/Battleship/Battleship/Battleship.csproj b/Battleship/Battleship/Battleship.csproj
index b57c89e..13ee123 100644
--- a/Battleship/Battleship/Battleship.csproj
+++ b/Battleship/Battleship/Battleship.csproj
@@ -8,4 +8,19 @@
enable
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
\ No newline at end of file
diff --git a/Battleship/Battleship/Direction.cs b/Battleship/Battleship/Direction.cs
new file mode 100644
index 0000000..ddbac72
--- /dev/null
+++ b/Battleship/Battleship/Direction.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Battleship
+{
+ ///
+ /// Направление перемещения
+ ///
+ internal enum Direction
+ {
+ Up = 1,
+ Down = 2,
+ Left = 3,
+ Right = 4
+ }
+
+}
diff --git a/Battleship/Battleship/DrawningBattleship.cs b/Battleship/Battleship/DrawningBattleship.cs
new file mode 100644
index 0000000..2217080
--- /dev/null
+++ b/Battleship/Battleship/DrawningBattleship.cs
@@ -0,0 +1,194 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Battleship
+{
+ ///
+ /// Класс, отвечающий за прорисовку и перемещение объекта-сущности
+ ///
+ internal class DrawningBattleship
+ {
+ ///
+ /// Класс-сущность
+ ///
+ public EntityBattleship Battleship { get; private set; }
+ ///
+ /// Левая координата отрисовки боевого корабля
+ ///
+ private float _startPosX;
+ ///
+ /// Верхняя кооридната отрисовки боевого корабля
+ ///
+ private float _startPosY;
+ ///
+ /// Ширина окна отрисовки
+ ///
+ private int? _pictureWidth = null;
+ ///
+ /// Высота окна отрисовки
+ ///
+ private int? _pictureHeight = null;
+ ///
+ /// Ширина отрисовки боевого корабля
+ ///
+ private readonly int _battleshipWidth = 80;
+ ///
+ /// Высота отрисовки боевого корабля
+ ///
+ private readonly int _battleshipHeight = 50;
+ ///
+ /// Инициализация свойств
+ ///
+ /// Скорость
+ /// Вес боевого корабля
+ /// Цвет корпуса
+ public void Init(int speed, float weight, Color bodyColor)
+ {
+ Battleship = new EntityBattleship();
+ Battleship.Init(speed, weight, bodyColor);
+ }
+ ///
+ /// Установка позиции боевого корабля
+ ///
+ /// Координата X
+ /// Координата Y
+ /// Ширина картинки
+ /// Высота картинки
+ public void SetPosition(int x, int y, int width, int height)
+ {
+ // TODO checks
+ if (x < 0 || y < 0 || width < x + _battleshipWidth || height < y + _battleshipHeight)
+ {
+ _pictureHeight = null;
+ _pictureWidth = null;
+ return;
+ }
+ _startPosX = x;
+ _startPosY = y;
+ _pictureWidth = width;
+ _pictureHeight = height;
+ }
+ ///
+ /// Изменение направления пермещения
+ ///
+ /// Направление
+ public void MoveTransport(Direction direction)
+ {
+ if (!_pictureWidth.HasValue || !_pictureHeight.HasValue)
+ {
+ return;
+ }
+ switch (direction)
+ {
+ // вправо
+ case Direction.Right:
+ if (_startPosX + _battleshipWidth + Battleship.Step < _pictureWidth)
+ {
+ _startPosX += Battleship.Step;
+ }
+ break;
+ //влево
+ case Direction.Left:
+ if (_startPosX - Battleship.Step > 0)
+ {
+ _startPosX -= Battleship.Step;
+ }
+ break;
+ //вверх
+ case Direction.Up:
+ if (_startPosY - Battleship.Step > 0)
+ {
+ _startPosY -= Battleship.Step;
+ }
+ break;
+ //вниз
+ case Direction.Down:
+ if (_startPosY + _battleshipHeight + Battleship.Step < _pictureHeight)
+ {
+ _startPosY += Battleship.Step;
+ }
+ break;
+ }
+ }
+ ///
+ /// Отрисовка боевого корабля
+ ///
+ ///
+ public void DrawTransport(Graphics g)
+ {
+ if (_startPosX < 0 || _startPosY < 0
+ || !_pictureHeight.HasValue || !_pictureWidth.HasValue)
+ {
+ return;
+ }
+ Pen pen = new(Color.Black);
+ //границы боевого корабля
+ g.DrawEllipse(pen, _startPosX + 60, _startPosY + 10, 10, 10);
+ g.DrawRectangle(pen, _startPosX + 20, _startPosY + 10, 20, 10);
+ g.DrawRectangle(pen, _startPosX - 4, _startPosY + 4, 4, 10);
+ g.DrawRectangle(pen, _startPosX - 4, _startPosY + 16 , 4, 10);
+ g.DrawRectangle(pen, _startPosX + 40, _startPosY + 4, 10, 20);
+ g.DrawRectangle(pen, _startPosX , _startPosY, 70, 30);
+ PointF point_triangle_1 = new PointF(_startPosX + 70, _startPosY);
+ PointF point_triangle_2 = new PointF(_startPosX + 90, _startPosY + 15);
+ PointF point_triangle_3 = new PointF(_startPosX + 70, _startPosY + 30);
+ PointF[] assembled_triangle =
+ {
+ point_triangle_1,
+ point_triangle_2,
+ point_triangle_3,
+ point_triangle_1
+ };
+ g.DrawPolygon(pen, assembled_triangle);
+
+ //задние балки
+ Brush brBlack = new SolidBrush(Color.Black);
+ g.FillRectangle(brBlack, _startPosX -4, _startPosY + 4, 4, 10);
+ g.FillRectangle(brBlack, _startPosX - 4, _startPosY + 16, 4, 10);
+
+ //палуба корабля
+ Brush br = new SolidBrush(Battleship?.BodyColor ?? Color.Black);
+ g.FillRectangle(br, _startPosX, _startPosY, 70, 30);
+ g.FillPolygon(br, assembled_triangle);
+
+ //отсек корабля
+ Brush brGray = new SolidBrush(Color.Gray);
+ g.FillEllipse(brGray, _startPosX + 60, _startPosY + 10, 10, 10);
+ g.FillRectangle(brGray, _startPosX + 20, _startPosY + 10, 20, 10);
+ g.FillRectangle(brGray, _startPosX + 40, _startPosY + 4, 10, 20);
+
+ //выделяем рамкой палубу
+ g.DrawEllipse(pen, _startPosX + 60, _startPosY + 10, 10, 10);
+ g.DrawRectangle(pen, _startPosX + 20, _startPosY + 10, 20, 10);
+ g.DrawRectangle(pen, _startPosX + 40, _startPosY + 4, 10, 20);
+
+ }
+ ///
+ /// Смена границ формы отрисовки
+ ///
+ /// Ширина картинки
+ /// Высота картинки
+ public void ChangeBorders(int width, int height)
+ {
+ _pictureWidth = width;
+ _pictureHeight = height;
+ if (_pictureWidth <= _battleshipWidth || _pictureHeight <= _battleshipHeight)
+ {
+ _pictureWidth = null;
+ _pictureHeight = null;
+ return;
+ }
+ if (_startPosX + _battleshipWidth > _pictureWidth)
+ {
+ _startPosX = _pictureWidth.Value - _battleshipWidth;
+ }
+ if (_startPosY + _battleshipHeight > _pictureHeight)
+ {
+ _startPosY = _pictureHeight.Value - _battleshipHeight;
+ }
+ }
+ }
+}
diff --git a/Battleship/Battleship/EntityBattleship.cs b/Battleship/Battleship/EntityBattleship.cs
new file mode 100644
index 0000000..ddcb788
--- /dev/null
+++ b/Battleship/Battleship/EntityBattleship.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Battleship
+{
+ ///
+ /// Класс-сущность "Боевой корабль"
+ ///
+ internal class EntityBattleship
+ {
+ ///
+ /// Скорость
+ ///
+ public int Speed { get; private set; }
+ ///
+ /// Вес
+ ///
+ public float Weight { get; private set; }
+ ///
+ /// Цвет кузова
+ ///
+ public Color BodyColor { get; private set; }
+ ///
+ /// Шаг перемещения боевого корабля
+ ///
+ public float Step => Speed * 100 / Weight;
+ ///
+ /// Инициализация полей объекта-класса боевого корабля
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void Init(int speed, float weight, Color bodyColor)
+ {
+ Random rnd = new();
+ Speed = speed <= 0 ? rnd.Next(50, 150) : speed;
+ Weight = weight <= 0 ? rnd.Next(40, 70) : weight;
+ BodyColor = bodyColor;
+ }
+ }
+}
diff --git a/Battleship/Battleship/Form1.Designer.cs b/Battleship/Battleship/Form1.Designer.cs
deleted file mode 100644
index 2ac1a17..0000000
--- a/Battleship/Battleship/Form1.Designer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace Battleship
-{
- partial class Form1
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
- this.Text = "Form1";
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/Battleship/Battleship/Form1.cs b/Battleship/Battleship/Form1.cs
deleted file mode 100644
index 9338bc7..0000000
--- a/Battleship/Battleship/Form1.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Battleship
-{
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/Battleship/Battleship/FormBattleship.Designer.cs b/Battleship/Battleship/FormBattleship.Designer.cs
new file mode 100644
index 0000000..299bcfd
--- /dev/null
+++ b/Battleship/Battleship/FormBattleship.Designer.cs
@@ -0,0 +1,177 @@
+namespace Battleship
+{
+ partial class FormBattleship
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.pictureBoxBattleship = new System.Windows.Forms.PictureBox();
+ this.statusStripBattleship = new System.Windows.Forms.StatusStrip();
+ this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripStatusLabeBodylColor = new System.Windows.Forms.ToolStripStatusLabel();
+ this.buttonCreate = new System.Windows.Forms.Button();
+ this.buttonDown = new System.Windows.Forms.Button();
+ this.buttonUp = new System.Windows.Forms.Button();
+ this.buttonRight = new System.Windows.Forms.Button();
+ this.buttonLeft = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBattleship)).BeginInit();
+ this.statusStripBattleship.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // pictureBoxBattleship
+ //
+ this.pictureBoxBattleship.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pictureBoxBattleship.Location = new System.Drawing.Point(0, 0);
+ this.pictureBoxBattleship.Name = "pictureBoxBattleship";
+ this.pictureBoxBattleship.Size = new System.Drawing.Size(800, 450);
+ this.pictureBoxBattleship.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.pictureBoxBattleship.TabIndex = 0;
+ this.pictureBoxBattleship.TabStop = false;
+ this.pictureBoxBattleship.Resize += new System.EventHandler(this.PictureBoxBattleship_Resize);
+ //
+ // statusStripBattleship
+ //
+ this.statusStripBattleship.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripStatusLabelSpeed,
+ this.toolStripStatusLabelWeight,
+ this.toolStripStatusLabeBodylColor});
+ this.statusStripBattleship.Location = new System.Drawing.Point(0, 428);
+ this.statusStripBattleship.Name = "statusStripBattleship";
+ this.statusStripBattleship.Size = new System.Drawing.Size(800, 22);
+ this.statusStripBattleship.TabIndex = 1;
+ this.statusStripBattleship.Text = "statusStrip1";
+ //
+ // toolStripStatusLabelSpeed
+ //
+ this.toolStripStatusLabelSpeed.Name = "toolStripStatusLabelSpeed";
+ this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(65, 17);
+ this.toolStripStatusLabelSpeed.Text = "Скорость: ";
+ //
+ // toolStripStatusLabelWeight
+ //
+ this.toolStripStatusLabelWeight.Name = "toolStripStatusLabelWeight";
+ this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(32, 17);
+ this.toolStripStatusLabelWeight.Text = "Вес: ";
+ //
+ // toolStripStatusLabeBodylColor
+ //
+ this.toolStripStatusLabeBodylColor.Name = "toolStripStatusLabeBodylColor";
+ this.toolStripStatusLabeBodylColor.Size = new System.Drawing.Size(36, 17);
+ this.toolStripStatusLabeBodylColor.Text = "Цвет:";
+ //
+ // buttonCreate
+ //
+ this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.buttonCreate.Location = new System.Drawing.Point(12, 397);
+ this.buttonCreate.Name = "buttonCreate";
+ this.buttonCreate.Size = new System.Drawing.Size(75, 23);
+ this.buttonCreate.TabIndex = 2;
+ this.buttonCreate.Text = "Создание";
+ this.buttonCreate.UseVisualStyleBackColor = true;
+ this.buttonCreate.Click += new System.EventHandler(this.ButtonCreate_Click);
+ //
+ // buttonDown
+ //
+ this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonDown.BackgroundImage = global::Battleship.Properties.Resources.BatteleshipDown;
+ this.buttonDown.Location = new System.Drawing.Point(731, 390);
+ this.buttonDown.Name = "buttonDown";
+ this.buttonDown.Size = new System.Drawing.Size(30, 30);
+ this.buttonDown.TabIndex = 3;
+ this.buttonDown.UseVisualStyleBackColor = true;
+ this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonUp
+ //
+ this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonUp.BackgroundImage = global::Battleship.Properties.Resources.BattleshipUp;
+ this.buttonUp.Location = new System.Drawing.Point(732, 361);
+ this.buttonUp.Name = "buttonUp";
+ this.buttonUp.Size = new System.Drawing.Size(30, 30);
+ this.buttonUp.TabIndex = 4;
+ this.buttonUp.UseVisualStyleBackColor = true;
+ this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonRight
+ //
+ this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonRight.BackgroundImage = global::Battleship.Properties.Resources.BattleshipRight;
+ this.buttonRight.Location = new System.Drawing.Point(758, 390);
+ this.buttonRight.Name = "buttonRight";
+ this.buttonRight.Size = new System.Drawing.Size(30, 30);
+ this.buttonRight.TabIndex = 5;
+ this.buttonRight.UseVisualStyleBackColor = true;
+ this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // buttonLeft
+ //
+ this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonLeft.BackgroundImage = global::Battleship.Properties.Resources.BattleshipLeft;
+ this.buttonLeft.Location = new System.Drawing.Point(706, 390);
+ this.buttonLeft.Name = "buttonLeft";
+ this.buttonLeft.Size = new System.Drawing.Size(30, 30);
+ this.buttonLeft.TabIndex = 6;
+ this.buttonLeft.UseVisualStyleBackColor = true;
+ this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click);
+ //
+ // FormBattleship
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoSize = true;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.buttonLeft);
+ this.Controls.Add(this.buttonRight);
+ this.Controls.Add(this.buttonUp);
+ this.Controls.Add(this.buttonDown);
+ this.Controls.Add(this.buttonCreate);
+ this.Controls.Add(this.statusStripBattleship);
+ this.Controls.Add(this.pictureBoxBattleship);
+ this.Name = "FormBattleship";
+ this.Text = "Военный корабль ";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBattleship)).EndInit();
+ this.statusStripBattleship.ResumeLayout(false);
+ this.statusStripBattleship.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private PictureBox pictureBoxBattleship;
+ private StatusStrip statusStripBattleship;
+ private ToolStripStatusLabel toolStripStatusLabelSpeed;
+ private ToolStripStatusLabel toolStripStatusLabelWeight;
+ private ToolStripStatusLabel toolStripStatusLabeBodylColor;
+ private Button buttonCreate;
+ private Button buttonDown;
+ private Button buttonUp;
+ private Button buttonRight;
+ private Button buttonLeft;
+ }
+}
\ No newline at end of file
diff --git a/Battleship/Battleship/FormBattleship.cs b/Battleship/Battleship/FormBattleship.cs
new file mode 100644
index 0000000..00d8b54
--- /dev/null
+++ b/Battleship/Battleship/FormBattleship.cs
@@ -0,0 +1,76 @@
+namespace Battleship
+{
+ public partial class FormBattleship : Form
+ {
+ private DrawningBattleship _battleship;
+
+ public FormBattleship()
+ {
+ InitializeComponent();
+ }
+
+ ///
+ ///
+ ///
+ private void Draw()
+ {
+ Bitmap bmp = new(pictureBoxBattleship.Width, pictureBoxBattleship.Height);
+ Graphics gr = Graphics.FromImage(bmp);
+ _battleship?.DrawTransport(gr);
+ pictureBoxBattleship.Image = bmp;
+ }
+ ///
+ /// ""
+ ///
+ ///
+ ///
+
+ private void ButtonCreate_Click(object sender, EventArgs e)
+ {
+ Random rnd = new();
+ _battleship = new DrawningBattleship();
+ _battleship.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)));
+ _battleship.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxBattleship.Width, pictureBoxBattleship.Height);
+ toolStripStatusLabelSpeed.Text = $": {_battleship.Battleship.Speed}";
+ toolStripStatusLabelWeight.Text = $": {_battleship.Battleship.Weight}";
+ toolStripStatusLabeBodylColor.Text = $": {_battleship.Battleship.BodyColor.Name}";
+ Draw();
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ private void ButtonMove_Click(object sender, EventArgs e)
+ {
+ //
+ string name = ((Button)sender)?.Name ?? string.Empty;
+ switch (name)
+ {
+ case "buttonUp":
+ _battleship?.MoveTransport(Direction.Up);
+ break;
+ case "buttonDown":
+ _battleship?.MoveTransport(Direction.Down);
+ break;
+ case "buttonLeft":
+ _battleship?.MoveTransport(Direction.Left);
+ break;
+ case "buttonRight":
+ _battleship?.MoveTransport(Direction.Right);
+ break;
+ }
+ Draw();
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ private void PictureBoxBattleship_Resize(object sender, EventArgs e)
+ {
+ _battleship?.ChangeBorders(pictureBoxBattleship.Width, pictureBoxBattleship.Height);
+ Draw();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Battleship/Battleship/FormBattleship.resx b/Battleship/Battleship/FormBattleship.resx
new file mode 100644
index 0000000..dd36fec
--- /dev/null
+++ b/Battleship/Battleship/FormBattleship.resx
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Battleship/Battleship/Program.cs b/Battleship/Battleship/Program.cs
index 48b33ea..4d0e539 100644
--- a/Battleship/Battleship/Program.cs
+++ b/Battleship/Battleship/Program.cs
@@ -11,7 +11,7 @@ namespace Battleship
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
- Application.Run(new Form1());
+ Application.Run(new FormBattleship());
}
}
}
\ No newline at end of file
diff --git a/Battleship/Battleship/Properties/Resources.Designer.cs b/Battleship/Battleship/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..1d42706
--- /dev/null
+++ b/Battleship/Battleship/Properties/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace Battleship.Properties {
+ using System;
+
+
+ ///
+ /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
+ ///
+ // Этот класс создан автоматически классом StronglyTypedResourceBuilder
+ // с помощью такого средства, как ResGen или Visual Studio.
+ // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
+ // с параметром /str или перестройте свой проект VS.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Battleship.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Перезаписывает свойство CurrentUICulture текущего потока для всех
+ /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap BatteleshipDown {
+ get {
+ object obj = ResourceManager.GetObject("BatteleshipDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap BattleshipLeft {
+ get {
+ object obj = ResourceManager.GetObject("BattleshipLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap BattleshipRight {
+ get {
+ object obj = ResourceManager.GetObject("BattleshipRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap BattleshipUp {
+ get {
+ object obj = ResourceManager.GetObject("BattleshipUp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/Battleship/Battleship/Form1.resx b/Battleship/Battleship/Properties/Resources.resx
similarity index 82%
rename from Battleship/Battleship/Form1.resx
rename to Battleship/Battleship/Properties/Resources.resx
index 1af7de1..87749b4 100644
--- a/Battleship/Battleship/Form1.resx
+++ b/Battleship/Battleship/Properties/Resources.resx
@@ -117,4 +117,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\Resources\BatteleshipDown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\BattleshipLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\BattleshipRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\BattleshipUp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/Battleship/Battleship/Resources/BatteleshipDown.png b/Battleship/Battleship/Resources/BatteleshipDown.png
new file mode 100644
index 0000000..cfe2d6c
Binary files /dev/null and b/Battleship/Battleship/Resources/BatteleshipDown.png differ
diff --git a/Battleship/Battleship/Resources/BattleshipLeft.png b/Battleship/Battleship/Resources/BattleshipLeft.png
new file mode 100644
index 0000000..e13f448
Binary files /dev/null and b/Battleship/Battleship/Resources/BattleshipLeft.png differ
diff --git a/Battleship/Battleship/Resources/BattleshipRight.png b/Battleship/Battleship/Resources/BattleshipRight.png
new file mode 100644
index 0000000..ff11d26
Binary files /dev/null and b/Battleship/Battleship/Resources/BattleshipRight.png differ
diff --git a/Battleship/Battleship/Resources/BattleshipUp.png b/Battleship/Battleship/Resources/BattleshipUp.png
new file mode 100644
index 0000000..79b43d1
Binary files /dev/null and b/Battleship/Battleship/Resources/BattleshipUp.png differ