コード例 #1
0
ファイル: Ai.cs プロジェクト: winterdl/Gomoku-ia
        public override void brain_restart()
        {
            for (int x = 0; x < this.width; x++)
            {
                for (int y = 0; y < this.height; y++)
                {
                    this.board[x, y] = 0;
                }
            }

            this.InitMoves();
            this.heuristicAnalysis = new HeuristicAnalysis(this.width, this.height);

            Console.WriteLine("OK");
        }
コード例 #2
0
ファイル: Ai.cs プロジェクト: winterdl/Gomoku-ia
        public override void brain_init()
        {
            if (this.width < 5 || this.height < 5)
            {
                Console.WriteLine("ERROR size of the board");
                return;
            }

            if (this.width > MaxBoard || this.height > MaxBoard)
            {
                Console.WriteLine("ERROR Maximal board size is " + MaxBoard);
                return;
            }

            this.InitMoves();
            this.heuristicAnalysis = new HeuristicAnalysis(this.width, this.height);
            Console.WriteLine("OK");
        }