コード例 #1
0
 public Game(Board board, ComputerLogic computerLogic, WinConditions winConditions, UI ui)
 {
     this.board         = board;
     this.computerLogic = computerLogic;
     this.winConditions = winConditions;
     this.ui            = ui;
 }
コード例 #2
0
 public UserInterface()
 {
     this.xoList = new string[9];
     for (int i = 0; i < xoList.Length; i++)
     {
         xoList[i] = " ";
     }
     this.logic         = new ComputerLogic(xoList);
     this.display       = new Display();
     this.gameContinues = true;
 }
コード例 #3
0
        static void Main(string[] args)
        {
            Board         board         = new Board();
            WinConditions winConditions = new WinConditions();
            ComputerLogic computerLogic = new ComputerLogic(winConditions);
            BoardBuilder  boardBuilder  = new BoardBuilder();
            IO            io            = new IO();
            ValidateInput validateInput = new ValidateInput();
            UI            ui            = new UI(boardBuilder, io, validateInput);
            Game          game          = new Game(board, computerLogic, winConditions, ui);

            game.StartGame();
        }