Beispiel #1
0
    public BattleshipsService(Battleships game, string playerId)
    {
        _gameStarter = new GameStarter(game);

        _gameJoiner = new GameJoiner(game);

        _gameResigner = new GameResigner(game);

        _gameRestarter = new GameRestarter(game);

        _gamePlayerGetter = new GamePlayerGetter <BattleshipsPlayerModel>(game);

        _gameMover = new GameMover <BattleshipsPosition>(game);

        _playerId = playerId;

        _game = game;
    }
    public ConnectFourService(ConnectFour game, string playerId)
    {
        _gameStarter = new GameStarter(game);

        _gameJoiner = new GameJoiner(game);

        _gameResigner = new GameResigner(game);

        _gameRestarter = new GameRestarter(game);

        _gamePlayerGetter = new GamePlayerGetter <ConnectFourPlayer>(game);

        _gameStateGetter = new GameStateGetter <ConnectFourGameState>(game);

        _gameMover = new GameMover <int>(game);

        _playerId = playerId;
    }
Beispiel #3
0
    public ChessService(Chess game, string playerId)
    {
        _gameStarter = new GameStarter(game);

        _gameJoiner = new GameJoiner(game);

        _gameResigner = new GameResigner(game);

        _gameRestarter = new GameRestarter(game);

        _gamePlayerGetter = new GamePlayerGetter <ChessPlayer>(game);

        _gameStateGetter = new GameStateGetter <ChessGameState>(game);

        _gameMover = new GameMover <Move>(game);

        _playerId = playerId;

        _game = game;
    }