GridManager.FindCode C# (CSharp) Method

FindCode() private method

private FindCode ( TileContent, contentIn ) : Point
contentIn TileContent,
return Point
    private Point FindCode( TileContent contentIn )
    {
        // Find the requested code and return the point.

        foreach ( Point point in AllSquares() )
        {
            if ( squares[ point.x, point.y ].ContentCode == contentIn)
            {
                return new Point( point.x, point.y );
            }
        }
        return new Point(-1, -1);
    }