Skip to content

Commit f657439

Browse files
committed
TurtleGraphics getters are now functions
1 parent 6cb7456 commit f657439

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/scala/hevs/graphics/TurtleGraphics.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class TurtleGraphics(width: Int, height: Int, windowName: String) extends FunGra
101101
/**
102102
* @return The location of the turtle
103103
*/
104-
def getPosition = new Point(round(x), round(y))
104+
def getPosition() = new Point(round(x), round(y))
105105

106106
/**
107107
* Sets the width of the pen
@@ -116,7 +116,7 @@ class TurtleGraphics(width: Int, height: Int, windowName: String) extends FunGra
116116
* @return The current turtle angle (in degrees)
117117
* Angle 0 is east (right). A positive angle is clockwise.
118118
*/
119-
def getTurtleAngle: Double = this.angle * 180.0 / Math.PI
119+
def getTurtleAngle(): Double = this.angle * 180.0 / Math.PI
120120

121121
/**
122122
* Turn the direction of writing with the specified angle
@@ -167,7 +167,7 @@ class TurtleGraphics(width: Int, height: Int, windowName: String) extends FunGra
167167
*
168168
* @return The current turtle angle in radians
169169
*/
170-
def getTurtleAngleRad: Double = this.angle
170+
def getTurtleAngleRad(): Double = this.angle
171171

172172
def setMouseMotionManager(mouseMotionListener: MouseMotionListener): Unit = {
173173
this.mainFrame.addMouseMotionListener(mouseMotionListener)

0 commit comments

Comments
 (0)