diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-10-02 22:03:25 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-10-02 22:03:25 +0200 |
| commit | 7e80b9cc8535973be68a1444843ecfc81d3ff355 (patch) | |
| tree | 043c1901e25b00268f7aded60f6c2b9d4a70a6f7 /order.go | |
| parent | 129d4d173b7c55e7a24ed49c2f50b50c56192253 (diff) | |
fix(move): Keep current path during move if it still applies
Diffstat (limited to 'order.go')
| -rw-r--r-- | order.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,8 @@ package main -import "golang.org/x/exp/slog" +import ( + "golang.org/x/exp/slog" +) type Order interface { Update(e *Entity, g *Game) @@ -36,7 +38,7 @@ func Patrol(e *Entity, destination Point) Order { if e.Selection.IsEnabled && e.Position.IsEnabled && e.Move.IsEnabled && e.Order.IsEnabled { if e.Selection.Value.IsSelected { origin := e.Position.Value - slog.Info("patroling between", slog.String("origin", origin.String()), slog.String("destination", destination.String())) + slog.Info("patrolling between", slog.String("origin", origin.String()), slog.String("destination", destination.String())) e.Order.Value = &PatrolOrder{origin: origin, destination: destination} } } |
