Exemple #1
0
 TurnState(
     DisboardGame ctx,
     BoardContext board,
     TurnContext turn
     ) : base(ctx)
 {
     Board = board;
     Turn  = turn;
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        static TurnState StartTurn(DisboardGame ctx, BoardContext board, TurnContext turn)
        {
            TurnState next = new TurnState(
                ctx: ctx,
                board: board,
                turn: turn
                );

            next.PrintTurn();
            return(next);
        }