Private
Public Access
Documented Square
This commit is contained in:
1 parent
243c955b2a
commit
4441f441c0
1 file changed
+22
-2
+22
-2
@@ -5,20 +5,40 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
|
||||
class Square : Verb {
|
||||
/// <summary>
|
||||
/// The Square Verb class
|
||||
/// </summary>
|
||||
public class Square : Verb {
|
||||
|
||||
Verb verb;
|
||||
|
||||
/// <summary>
|
||||
/// A new Squre instance. Draws squares using <see cref="RegularPolygon"/>
|
||||
/// </summary>
|
||||
/// <param name="drawer">drawer</param>
|
||||
/// <param name="scale">size of the square</param>
|
||||
public Square(Drawer drawer, double scale) {
|
||||
verb = new RegularPolygon(drawer, 4, scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A new Squre instance. Draws squares using <see cref="RegularPolygon"/>
|
||||
/// </summary>
|
||||
/// <param name="drawer">drawer</param>
|
||||
/// <param name="scale">size of the square</param>
|
||||
/// <param name="offset">rotation offset in degrees</param>
|
||||
public Square(Drawer drawer, double scale, double offset) {
|
||||
verb = new RegularPolygon(drawer, 4, scale, offset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the regular polygon (square)
|
||||
/// </summary>
|
||||
public void ExecuteVerb() => verb.ExecuteVerb();
|
||||
|
||||
/// <summary>
|
||||
/// Gets description of how it will draw the regular polygon (square)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetDescription() => verb.GetDescription();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user