public AdvancedAI( Game target, AISetting setting ):base( target ){ Depth = setting.Depth; Width = setting.Width; CheckLimit = setting.CheckLimit; FloorHeight = setting.FloorHeight; FireRate = setting.FireRate; FutureMin = setting.FutureMin; Setting = setting; CheckBlocks = new List<int>[CheckHeight, Game.Sum-1][]; for( int i = 0; i < CheckHeight; i++ ) for( int j = 0; j < (Game.Sum - 1); j++ ){ var row = new List<int>(); for( int k = 0; k < i * HeightSpan; k++ ) row.Add( Game.Sum + 1 ); row.Add( j + 1 ); CheckBlocks[i,j] = new List<int>[1]{ row }; } CheckList = new bool[Game.StepNum][]; for( int i = 0; i < Game.StepNum; i++ ){ var list = CheckList[i] = new bool[ Game.Sum - 1 ]; int l = i + CheckLimit; if( l > Game.StepNum ) l = Game.StepNum; for( int j = i; j < l; j++ ){ var b = Game.DefaultBlocks[ j ].Data; for( int x = 0; x < Game.Size; x++ ) for( int y = 0; y < Game.Size; y++ ){ var c = b[x,y]; if( 0 < c && c < Game.Sum ) list[c - 1] = true; } } } }
public ChainAI( Game target, AISetting setting ):base( target, setting ){ FixedDepth = setting.FixedDepth; FixedWidth = setting.FixedWidth; FixedLimit = setting.FixedLimit; HaiteiMode = setting.HaiteiMode; }