Skip to content

Commit

Permalink
fix direction apply
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymax25 committed Jan 9, 2022
1 parent d657d1c commit e304e72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions projet/funprog-al/src/main/scala/progfun/InputLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ class InputLoader(filePath: String) {
coords(0).toInt,
coords(1).toInt
),
Direction.getFromString(coords(2)),
Direction(coords(2)),
new Point(
coords(0).toInt,
coords(1).toInt
),
Direction.getFromString(coords(2)),
Direction(coords(2)),
actions,
actions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abstract class Direction {
}

object Direction {
def getFromString(direction: String): Direction = direction match {
def apply(direction: String): Direction = direction match {
case "N" => new North()
case "S" => new South()
case "W" => new West()
Expand Down

0 comments on commit e304e72

Please sign in to comment.