Skip to content

Commit

Permalink
Fixes merge issue. (overengineering#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeARichardson authored Apr 18, 2018
1 parent c6534bf commit 8966075
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
14 changes: 9 additions & 5 deletions Sharpasonne/GameActions/EngineState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ namespace Sharpasonne.GameActions
{
public class EngineState : IEngine
{
public EngineState(Board board, IImmutableDictionary<Type, IImmutableList<IRule<IGameAction>>> 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<Type, IImmutableList<IRule<IGameAction>>> Rules { get; }
public Board Board { get; }
public Players Players { get; }
public int CurrentPlayerTurn { get; }
public IImmutableDictionary<Type, IImmutableList<IRule<IGameAction>>> Rules { get; }
}
}
16 changes: 0 additions & 16 deletions Sharpasonne/GameActions/PlaceTileGameAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type, IImmutableList<IRule<IGameAction>>> Rules { get; }
}
}

0 comments on commit 8966075

Please sign in to comment.