public IGameOperationResult FinishCurrentRound(EstimationValue consensus, string player) { if (player != this.Initiator) { return(new Failure <string>("A round can only be finished by the game's initiator")); } var currentRound = this.rounds.LastOrDefault(); if (currentRound == null) { return(new Failure <string>("No round is in progress")); } currentRound.Finish(consensus); return(Success.Instance); }
public Estimation(EstimationValue value, string player, DateTimeOffset timestamp) { this.Value = value; this.Player = player; this.Timestamp = timestamp; }
public Estimation(EstimationValue value, string player) : this(value, player, DateTimeOffset.Now) { }
internal void Finish(EstimationValue consensus) { this.FinishedAt = DateTimeOffset.Now; this.Consensus = consensus; }