TurnState( DisboardGame ctx, BoardContext board, TurnContext turn ) : base(ctx) { Board = board; Turn = turn; }
static public TurnState New(DisboardGame ctx, IReadOnlyList <DisboardPlayer> players) { new XanthFactory().OnHelp(ctx.Channel); var board = BoardContext.New(players); var turn = TurnContext.New(board); var next = StartTurn(ctx: ctx, board: board, turn: turn); return(next); }
public static TurnState New(DisboardGame ctx, IReadOnlyList <DisboardPlayer> players) { new YachtFactory().OnHelp(ctx.Channel); var board = BoardContext.New(players); var turn = TurnContext.New(players.First()); var next = StartTurn(ctx, board, turn); return(next); }
static TurnState StartTurn(DisboardGame ctx, BoardContext board, TurnContext turn) { TurnState next = new TurnState( ctx: ctx, board: board, turn: turn ); next.PrintTurn(); return(next); }
protected GameState(DisboardGame ctx) => this.ctx = ctx;