public void YourMove(Try <Match> tryMatch, IMatchGrain matchGrain) => tryMatch.Match( exception => ShowError(exception, confirm: true), match => MovePiece( match, move => matchGrain .MovePiece(move.PiecePosition, move.NewPosition, this.userNameOption) .GetAwaiter() .GetResult() .Match( exception => { ShowError(exception, confirm: true); this.YourMove(match, matchGrain); return(Unit()); }, newMatch => { this.matchScenario.ShowScenario(newMatch); return(Unit()); })));
public Task <Unit> AddMatchGrain(IMatchGrain matchGrain) { this.matchesGrain.Add(matchGrain); return(Task(Unit())); }
public Task Bet(IMatchGrain match, decimal amt) { return(Task.CompletedTask); }