From 49ad4e2437694c586cebec354996976a14fc2075 Mon Sep 17 00:00:00 2001 From: Paul Hameteman Date: Tue, 14 Oct 2025 21:29:08 +0200 Subject: [PATCH] R: fix antipattern --- TECHDEBT.md | 1 + src/main/kotlin/org/example/Rover.kt | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TECHDEBT.md b/TECHDEBT.md index 31c2521..b5ad355 100644 --- a/TECHDEBT.md +++ b/TECHDEBT.md @@ -4,6 +4,7 @@ - [x] dead code - [x] magic strings/numbers - [x] bad naming + - [x] antipattern - [ ] scopes # RPP diff --git a/src/main/kotlin/org/example/Rover.kt b/src/main/kotlin/org/example/Rover.kt index c2f4e51..0fea9c3 100644 --- a/src/main/kotlin/org/example/Rover.kt +++ b/src/main/kotlin/org/example/Rover.kt @@ -44,9 +44,7 @@ class Rover { val position: String get() = "${state.positionX} ${state.positionY} ${state.direction}" - fun pos(): String { - return position - } + fun pos(): String = position private var state = RoverState() }