R: Fix linter
This commit is contained in:
parent
a56304bc77
commit
4e3d9177af
1 changed files with 14 additions and 12 deletions
|
|
@ -7,14 +7,16 @@ enum class Heading(val symbol: Char) {
|
|||
WEST('W'),
|
||||
;
|
||||
|
||||
fun turnLeft() = when (this) {
|
||||
fun turnLeft(): Heading =
|
||||
when (this) {
|
||||
EAST -> NORTH
|
||||
NORTH -> WEST
|
||||
WEST -> SOUTH
|
||||
SOUTH -> EAST
|
||||
}
|
||||
|
||||
fun turnRight() = when (this) {
|
||||
fun turnRight(): Heading =
|
||||
when (this) {
|
||||
EAST -> SOUTH
|
||||
SOUTH -> WEST
|
||||
WEST -> NORTH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue