public static ITurnResult Success(IPlayer player, IGameSquare gameSquare, string validationMessage) { return(new TurnResult(player, gameSquare) { IsMoveValid = true, ValidationMessage = validationMessage }); }
static bool IsPurchaseable(Board board, IGameSquare gameSquare, out PropertyGameSquare propertyGameSquare) { propertyGameSquare = default; if (gameSquare is PropertyGameSquare propGameSquare) { propertyGameSquare = propGameSquare; return(!IsPropertySquareOwned(board, propertyGameSquare)); } return(false); }
public void ThrowErrorOnSetSquareAlreadySetSquare() { _square = new GameSquare(); _square.Value = NoughtCrossToken.X; _square.Value = NoughtCrossToken.O; }
public void SetSquareNought() { _square = new GameSquare(); _square.Value = NoughtCrossToken.O; Assert.AreEqual(NoughtCrossToken.O, _square.Value); }
public void SquareDefaultsNull() { _square = new GameSquare(); Assert.IsNull(_square.Value); }
private TurnResult(IPlayer player, IGameSquare gameSquare = default) { Player = player; GameSquare = gameSquare; }