From 7e80b9cc8535973be68a1444843ecfc81d3ff355 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 2 Oct 2023 22:03:25 +0200 Subject: fix(move): Keep current path during move if it still applies --- order.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'order.go') diff --git a/order.go b/order.go index 13c1b09..6836954 100644 --- a/order.go +++ b/order.go @@ -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} } } -- cgit v1.3