Added more readonly kewords

This commit is contained in:
Lukasz Baldyga committed 2020-11-15 05:47:13 +00:00
1 parent 3a9d92477b
commit 33c20bdaf6
13 files changed
+21 -21

No files matched your search

@@ -12,7 +12,7 @@ namespace Advanced_Software_Engineering_Tests {
/// </summary>
[TestClass]
public class CommandTester {
private Random rand = new Random();
private readonly Random rand = new Random();
/// <summary>
/// Automatically tests:
@@ -11,8 +11,8 @@ namespace Advanced_Software_Engineering_Tests {
/// </summary>
[TestClass]
public class SettingsAndHelperFunctionsTester {
private string alphabet = "abcdefghijklmnopqrstuvwxzy";
private Random rand = new Random();
private readonly string alphabet = "abcdefghijklmnopqrstuvwxzy";
private readonly Random rand = new Random();
/// <summary>
/// Random strip spaces test
@@ -5,7 +5,7 @@
/// </summary>
public class Circle : IVerb {
private readonly Drawer drawer;
private double scale;
private readonly double scale;
/// <summary>
/// Circle constructor creates the Circle IVerb.
@@ -4,7 +4,7 @@
/// The Clear IVerb class.
/// </summary>
public class Clear : IVerb {
private Drawer drawer;
private readonly Drawer drawer;
/// <summary>
/// Create the clear IVerb
@@ -4,8 +4,8 @@
/// Fill IVerb class
/// </summary>
public class Fill : IVerb {
private Drawer drawer;
private bool enable;
private readonly Drawer drawer;
private readonly bool enable;
/// <summary>
/// Fill enables or disables the fill insider drawer
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The FillColor IVerb class
/// </summary>
public class FillColor : IVerb {
private Drawer drawer;
private Color color;
private readonly Drawer drawer;
private readonly Color color;
/// <summary>
/// Create the FillColor instance
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// MoveTo IVerb class
/// </summary>
public class MoveTo : IVerb {
private Drawer drawer;
private Point moveToPoint;
private readonly Drawer drawer;
private readonly Point moveToPoint;
/// <summary>
/// Creates a MoveTo instance
@@ -6,8 +6,8 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The PenColor IVerb class
/// </summary>
public class PenColor : IVerb {
private Drawer drawer;
private Color color;
private readonly Drawer drawer;
private readonly Color color;
/// <summary>
/// Creates a PenColor instance
@@ -6,7 +6,7 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The Quadrilateral IVerb class
/// </summary>
public class Quadrilateral : IVerb {
private IVerb IVerb;
private readonly IVerb IVerb;
/// <summary>
/// Creates a Quadrilateral instances
@@ -11,11 +11,11 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// Correct
/// </todo>
public class Rectangle : IVerb {
private Drawer drawer;
private PointF[] points;
private readonly Drawer drawer;
private readonly PointF[] points;
private double width;
private double height;
private readonly double width;
private readonly double height;
/// <summary>
/// Create a rectangle instance. Makes sure that
@@ -4,7 +4,7 @@
/// Setsets the pen to the initial position.
/// </summary>
public class ResetPen : IVerb {
private Drawer drawer;
private readonly Drawer drawer;
/// <summary>
/// Creates the ResetPen IVerb
@@ -4,7 +4,7 @@
/// The Square IVerb class
/// </summary>
public class Square : IVerb {
private IVerb IVerb;
private readonly IVerb IVerb;
/// <summary>
/// A new Squre instance. Draws squares using <see cref="RegularPolygon"/>
@@ -6,7 +6,7 @@ namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
/// The Triangle IVerb class
/// </summary>
public class Triangle : IVerb {
private IVerb IVerb;
private readonly IVerb IVerb;
/// <summary>
/// Creates a new Triangle instance using <see cref="RegularPolygon"/>.