fCraft.Life2d.SetStateToRandom C# (CSharp) Method

SetStateToRandom() public method

public SetStateToRandom ( ) : void
return void
        public void SetStateToRandom()
        {
            Random r = new Random();
            for ( int i = 0; i < _a.GetLength( 0 ); ++i )
                for ( int j = 0; j < _a.GetLength( 1 ); ++j )
                    _a[i, j] = r.NextDouble() < 0.3 ? Normal : Nothing;
        }