Public Class Koordinaten
        Public con_count As Double = 10
        Public sec_count As Double = 10
        Public sub_count As Double = 5

        Public Function AltX2NeuX(ByVal x As Integer) As Integer
            Return x + 250
        End Function

        Public Function AltY2NeuY(ByVal y As Integer) As Integer
            Dim yy As Integer
            If y > 0 Then
                yy = Math.Abs(250 - y)
            End If
            If y < 0 Then
                yy = 250 + Math.Abs(y)
            End If
            If y = 0 Then
                yy = 250
            End If
            Return yy
        End Function

        Public Function NeuX2AltX(ByVal x As Integer) As Integer
            Return x - 250
        End Function

        Public Function NeuY2AltY(ByVal y As Integer) As Integer
            Dim yy As Integer
            If y > 250 Then
                yy = (y - 250) * -1
            End If
            If y < 250 Then
                yy = Math.Abs(y - 250)
            End If
            If y = 250 Then
                yy = 0
            End If
            Return yy
        End Function

        Public Function CoordToX(ByVal k As Integer, ByVal s As Integer, ByVal f As Integer) As Integer
            Dim a As Double
            a = (k Mod 10) * 50 + (s Mod 10) * 5 + (f Mod 5)
            Return a
        End Function
        Public Function CoordToY(ByVal k As Integer, ByVal s As Integer, ByVal f As Integer) As Integer
            Dim a As Double
            a = Math.Floor(k \ 10) * 50 + Math.Floor(s \ 10) * 5 + Math.Floor(f \ 5)
            Return a
        End Function

        Public Function XYToKontinentCoord(ByVal x As Integer, ByVal y As Integer) As Integer
            Dim a As Double
            Dim xx As Double = x * 2
            Dim yy As Double = y * 2
            a = Math.Floor(yy / 100) * 10 + Math.Floor(xx / 100)
            Return a
        End Function

        Public Function XYToSektorCoord(ByVal x As Integer, ByVal y As Integer) As Integer
            Dim a As Double
            Dim xx As Double = x * 2
            Dim yy As Double = y * 2
            a = (Math.Floor(yy / 10) Mod 10) * 10 + (Math.Floor(xx / 10) Mod 10)
            Return a
        End Function

        Public Function XYToFeldCoord(ByVal x As Integer, ByVal y As Integer) As Integer
            Dim a As Double
            Dim xx As Double = x * 2
            Dim yy As Double = y * 2
            a = (yy Mod 10) / 0.4 + (xx Mod 10) / 2
            Return a
        End Function

    End Class