public GMCorners(IRule r, IBoardManager b, IPlayerManager p) { rule = r; playerManager = p; boardManager = b; Endgame = false; }
private void Awake() { playerManager = pch.PlayerManager; boardManager = pch.BoardManager; gameMode = pch.GameMode; ai = pch.ai; }
public UserController(IUserManager user, IBoardManager board, IColumnManager column, IFocusManager focus) { _board = board; _column = column; _focus = focus; _user = user; }
public GiveSyncFunction( IBoardManager boardManager, IPusher pusher) { _boardManager = boardManager; _pusher = pusher; }
/// <summary> /// The Engine of the Game. /// </summary> internal void Engine() { this.board = new Board(MAX_ROWS, MAX_COLUMNS, MAX_MINES); this.boardScanner = new BoardScanner(this.board); this.boardManager = new BoardManager(this.board, this.boardScanner); this.board.Accept(new MineSetter(new RandomGenerator())); this.GameData.Renderer.PrintGameBoard(this.board); while (true) { this.GameData.Renderer.Write( "\nChoose and press Enter:\n" + "'" + PlayerCommand.ReturnKey + "'" + " to return to the menu or\nEnter row and column separated by a space: \n"); // getting player input as object var command = new PlayerCommand(Console.ReadLine()); if (command.IsBadInput) { this.GameData.Renderer.Write(command.Message); } else { if (command.IsReturnKey || this.IsGameOver(command.Row, command.Col)) { this.Run(); } } } }
public CreateBoardItemFunction( IPusher pusher, IBoardManager boardManager) { _pusher = pusher; _boardManager = boardManager; }
public JoinBoardFunction( IPusher pusher, IBoardManager boardManager) { _pusher = pusher; _boardManager = boardManager; }
public FocusController(IUserManager user, IBoardManager board, IColumnManager column, IFocusManager focus, GitHiredDBContext context) { _board = board; _column = column; _focus = focus; _user = user; _context = context; }
public static IAIStrategy Provide(BoardCell aiCell, IBoardManager boardManager, AIDifficulty difficulty) { return(difficulty switch { AIDifficulty.EASY => new EasyAIStrategy(aiCell, boardManager), AIDifficulty.MEDIUM => new MediumAIStrategy(aiCell, boardManager), AIDifficulty.HARD => new HardAIStrategy(aiCell, boardManager), _ => throw new System.NotSupportedException(), });
private bool ErrorPosition(string position, IBoardManager boardManager) { if (!boardManager.GetPosition(position).GetFigure()) { Errors.Push($"Вы выбрали пустую клетку"); return(true); } return(false); }
public Player(string name, IBoardManager boardManager) { this.Name = name; boardManager.CreateBoard(this); this.boardManager = boardManager; this.Events = new List <PlayerEvent>(); }
internal Context(string inputText, ref IBoardManager boardManager) { inputText = inputText.ToUpper(); ErrorInputTextСhecking e = new ErrorInputTextСhecking(inputText, ref boardManager); if (e.IsHaveErrors()) { _errors = e.GetErrors(); _isAllRight = false; return; } StartPosition = inputText.Split(':')[0]; EndPosition = inputText.Split(':')[1]; _isAllRight = true; }
public ErrorInputTextСhecking(string inputText, ref IBoardManager boardManager) { Errors = new Stack <string>(); if (inputText.Equals("")) { Errors.Push("Впишите команду"); return; } string[] positions = inputText.Split(':'); ErrorCountPosition(inputText); if (ErrorСheckingPositions(positions)) { return; } if (ErrorPosition(positions[0], boardManager)) { return; } ErrorMove(boardManager.GetPosition(inputText.Split(':')[0]), boardManager.GetPosition(inputText.Split(':')[1])); }
public void Setup() { roomManagerInstance = new RoomManager(); room = new RoomHub(); player1 = new Player { ConnectionId = Guid.NewGuid().ToString(), PlayerInGame = new PlayerInGame() { Name = Guid.NewGuid().ToString(), Side = PlayerSide.Blue, CardsInHand = new List <ICard>(), Deck = CardHelpers.GetAllTierOneCards() } }; player2 = new Player { ConnectionId = Guid.NewGuid().ToString(), PlayerInGame = new PlayerInGame() { Name = Guid.NewGuid().ToString(), Side = PlayerSide.Red, CardsInHand = new List <ICard>(), Deck = CardHelpers.GetAllTierOneCards() } }; room.Player1 = player1; room.Player2 = player2; boardManager = BoardManagerObject.CreateBoardManager(player1.PlayerInGame, player2.PlayerInGame); room = new RoomHub { BoardManager = boardManager, Player1 = player1, Player2 = player2 }; }
public GameManager( IBoardPrinter boardPrinter, IBoardManager boardManager, IBoardGenerator boardGenerator, IActionParser actionParser, IScoreManager scoreManager, User.User user) { _boardPrinter = boardPrinter; _boardManager = boardManager; _boardGenerator = boardGenerator; _actionParser = actionParser; _scoreManager = scoreManager; _user = user; _menuOptions = new StringBuilder() .AppendLine("--------------------------") .AppendLine("SELECT AN OPTION:") .AppendLine("S X Y - Select a cell in the x,y position") .AppendLine("F X Y - Flag a cell in the x,y position") .AppendLine("E - Exit the game") .AppendLine() .ToString(); }
public AIPlayer(BoardCell aiCell, IBoardManager boardManager, AIDifficulty difficulty) : base(aiCell, boardManager) { aiStrategy = AIStrategyProvider.Provide(aiCell, boardManager, difficulty); }
public BaseAIStrategy(BoardCell aiCell, IBoardManager boardManager) { AICell = aiCell; BoardManager = boardManager; }
public ChatCommandHandler(IBroadcastService broadcastService, IBoardManager boardManager) { this.broadcastService = broadcastService; this.boardManager = boardManager; }
public CardController() { _cardManager = ObjectFactory.GetInstance<ICardManager>(); _boardManager = ObjectFactory.GetInstance<IBoardManager>(); }
public PlayerStatsCommandHandler(IBoardManager boardManager, IBroadcastService broadcastService) { this.boardManager = boardManager; this.broadcastService = broadcastService; }
public BoardController(IBoardManager board, IColumnManager column, IFocusManager focus) { _board = board; _column = column; _focus = focus; }
public HardAIStrategy(BoardCell aiCell, IBoardManager boardManager) : base(aiCell, boardManager) { // do nothing }
public ShootGameCommandHandler(IBoardManager boardManager, IBroadcastService broadcastService, IBoardActions boardActions) { this.boardManager = boardManager; this.broadcastService = broadcastService; this.boardActions = boardActions; }
public StartGameCommandHandler(IBoardManager boardManager, IBroadcastService broadcastService) { this.boardManager = boardManager; this.broadcastService = broadcastService; }
public CreateBoardFunction(IBoardManager boardManager) { _boardManager = boardManager; }
internal TicTacToeGame() { this._players = new List<Player>(MaximumNumberOfPlayers); this._boardManager = new BoardManager(); }
public Player(BoardCell playerCell, IBoardManager boardManager) { BoardManager = boardManager; PlayerCell = playerCell; }
public GameManager(IGameConfiguration gameConfiguration, IBoardManager boardManager) { _gameConfiguration = gameConfiguration; _boardManager = boardManager; }
public GameManager(IFactory <Brick> brickFactory, IBoardManager boardManager, Action gameEndAction) { _brickFactory = brickFactory; _boardManager = boardManager; _gameEndAction = gameEndAction; }
public PlayerManager(IBoardManager boardManager) { this.boardManager = boardManager; this.players = new List <IPlayer>(); }
public GameController(IBoardManager boardManager) { _boardManager = boardManager; }
public void Setup(IBoardManager boardManager) { _boardManager = boardManager; }