diff options
| author | Fuwn <[email protected]> | 2025-10-16 20:23:12 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-10-16 20:23:12 -0700 |
| commit | c9d655807d0046be1fa2cd19991354b703c55c87 (patch) | |
| tree | ac14221c639baf208c01cc11ee01649d9eef05b7 /MorgSimulator/MovementStrategy/MovementStrategyOozes.cs | |
| download | cst276-c9d655807d0046be1fa2cd19991354b703c55c87.tar.xz cst276-c9d655807d0046be1fa2cd19991354b703c55c87.zip | |
feat: Implement Assignment 1 functionality
Diffstat (limited to 'MorgSimulator/MovementStrategy/MovementStrategyOozes.cs')
| -rw-r--r-- | MorgSimulator/MovementStrategy/MovementStrategyOozes.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/MorgSimulator/MovementStrategy/MovementStrategyOozes.cs b/MorgSimulator/MovementStrategy/MovementStrategyOozes.cs new file mode 100644 index 0000000..217d175 --- /dev/null +++ b/MorgSimulator/MovementStrategy/MovementStrategyOozes.cs @@ -0,0 +1,12 @@ +namespace MorgSimulator +{ + public class MovementStrategyOozes : IMovementStrategy + { + public void Move(Morg morg, (int x, int y) newLocation) + { + System.Console.WriteLine($"Morg {morg.Id} Oozes from ({morg.Location.x},{morg.Location.y}) to ({newLocation.x},{newLocation.y})"); + + morg.Location = newLocation; + } + } +} |