From 8966075c2464382b79e95697a9ff3945ab0c8db2 Mon Sep 17 00:00:00 2001 From: Lee Richardson Date: Wed, 18 Apr 2018 19:51:59 +0100 Subject: [PATCH] Fixes merge issue. (#18) --- Sharpasonne/GameActions/EngineState.cs | 14 +++++++++----- Sharpasonne/GameActions/PlaceTileGameAction.cs | 16 ---------------- 2 files changed, 9 insertions(+), 21 deletions(-) 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; } - } }