diff --git a/Sharpasonne/GameActions/EngineState.cs b/Sharpasonne/GameActions/EngineState.cs index 11796df..0c011aa 100644 --- a/Sharpasonne/GameActions/EngineState.cs +++ b/Sharpasonne/GameActions/EngineState.cs @@ -7,13 +7,17 @@ namespace Sharpasonne.GameActions { public class EngineState : IEngine { - public EngineState(Board board, IImmutableDictionary>> rules) + public EngineState(Board board, IEngine engine) { - Board = board; - Rules = rules; + this.Board = board; + this.Rules = engine.Rules; + this.Players = engine.Players; + this.CurrentPlayerTurn = engine.CurrentPlayerTurn; } - public Board Board { get; } - public IImmutableDictionary>> Rules { get; } + public Board Board { get; } + public Players Players { get; } + public int CurrentPlayerTurn { get; } + public IImmutableDictionary>> Rules { get; } } } \ No newline at end of file diff --git a/Sharpasonne/GameActions/PlaceTileGameAction.cs b/Sharpasonne/GameActions/PlaceTileGameAction.cs index 7dacf70..fcd88cf 100644 --- a/Sharpasonne/GameActions/PlaceTileGameAction.cs +++ b/Sharpasonne/GameActions/PlaceTileGameAction.cs @@ -19,20 +19,4 @@ public IEngine Perform(IEngine engine) return new EngineState(board, engine); } } - - public class EngineState : IEngine - { - public EngineState(Board board, IEngine engine) - { - this.Board = board; - this.Rules = engine.Rules; - this.Players = engine.Players; - this.CurrentPlayerTurn = engine.CurrentPlayerTurn; - } - - public Board Board { get; } - public Players Players { get; } - public int CurrentPlayerTurn { get; } - public IImmutableDictionary>> Rules { get; } - } }