diff --git a/Battleship/Battleship/DrawningBattleship.cs b/Battleship/Battleship/DrawningBattleship.cs
index c0c8d7a..524c6ba 100644
--- a/Battleship/Battleship/DrawningBattleship.cs
+++ b/Battleship/Battleship/DrawningBattleship.cs
@@ -48,5 +48,9 @@ namespace Battleship.DrawningObjects
g.DrawRectangle(pen, _startPosX + 75, _startPosY + 70, 40, 10);
}
}
+ public void SetAddColor(Color color)
+ {
+ ((EntityBattleship)EntityShip).AdditionalColor = color;
+ }
}
}
diff --git a/Battleship/Battleship/DrawningShip.cs b/Battleship/Battleship/DrawningShip.cs
index 6a56b76..ef435bf 100644
--- a/Battleship/Battleship/DrawningShip.cs
+++ b/Battleship/Battleship/DrawningShip.cs
@@ -224,6 +224,14 @@ namespace Battleship.DrawningObjects
break;
}
}
+ public void SetColor(Color color)
+ {
+ if(EntityShip == null)
+ {
+ return;
+ }
+ EntityShip.BodyColor = color;
+ }
}
}
diff --git a/Battleship/Battleship/EntityBattleship.cs b/Battleship/Battleship/EntityBattleship.cs
index f3cd02c..6175764 100644
--- a/Battleship/Battleship/EntityBattleship.cs
+++ b/Battleship/Battleship/EntityBattleship.cs
@@ -10,7 +10,7 @@ namespace Battleship.Entities
internal class EntityBattleship: EntityShip
{
- public Color AdditionalColor { get; private set; }
+ public Color AdditionalColor { get; set; }
///
/// Признак (опция) наличия башни
///
@@ -40,7 +40,7 @@ namespace Battleship.Entities
Section = section;
}
- internal void setAdditionalColor(Color color)
+ public void setAdditionalColor(Color color)
{
AdditionalColor = color;
}
diff --git a/Battleship/Battleship/EntityShip.cs b/Battleship/Battleship/EntityShip.cs
index db19207..ea7eef1 100644
--- a/Battleship/Battleship/EntityShip.cs
+++ b/Battleship/Battleship/EntityShip.cs
@@ -19,7 +19,7 @@ namespace Battleship.Entities
///
/// Основной цвет
///
- public Color BodyColor { get; private set; }
+ public Color BodyColor { get; set; }
///
/// Дополнительный цвет (для опциональных элементов)
///
@@ -38,7 +38,7 @@ namespace Battleship.Entities
BodyColor = bodyColor;
}
- internal void setBodyColor(Color color)
+ public void setBodyColor(Color color)
{
BodyColor = color;
}