Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public Estimation(EstimationValue value, string player, DateTimeOffset timestamp)
 {
     this.Value     = value;
     this.Player    = player;
     this.Timestamp = timestamp;
 }
Ejemplo n.º 3
0
 public Estimation(EstimationValue value, string player)
     : this(value, player, DateTimeOffset.Now)
 {
 }
Ejemplo n.º 4
0
 internal void Finish(EstimationValue consensus)
 {
     this.FinishedAt = DateTimeOffset.Now;
     this.Consensus  = consensus;
 }