fb:porticula NoPaste
Wortmischer 1
Uploader: | Sebastian |
Datum/Zeit: | 01.07.2008 23:43:33 |
'Wortmischer - Altes Programm wiedergefunden :-)
'ToDo: Nur benachbarte oder zumindest nahe stehende Buchstaben vertauschen, um die
' Lesbarkeit zu gewährleisten.
Declare Function Zufallszahl (ByVal Von As Integer, ByVal Bis As Integer) As Integer
RANDOMIZE TIMER*(10^5)
DIM AS INTEGER i, b, GrBs=0, Tausche, x, y, j
DIM AS STRING Eingabe, Text, Neu, Z, Wort, Kern, temp, WortAlt, WortNeu, Satz(10)
Satz(0) = "4672616E7A206A61677420696D206B6F6D706C65747420766572776168726C6F7374656E205461786920717565722064757263682042617965726E2E"
Satz(1) = "4B6166666565206B616E6E20736F776F686C207761726D20616C732061756368206B616C7420696E20466F726D20766F6E204569736B61666665652067657472756E6B656E2077657264656E2E"
Satz(2) = "42756E746520426C756D656E20626C8168656E2062657374656E7320696D20536F6D6D65722C2077846872656E642064696520536F6E6E652073636865696E742E"
Satz(3) = "496368206D94636874652064696573656E2054657070696368206E69636874206B617566656E2C2062697474652E"
Satz(4) = "466573742067656D617565727420696E2064657220457264656E2073746568742064696520466F726D20617573204C65686D2067656272616E6E742E"
Satz(5) = "41746F6D656E657267696520697374206C846E677374206E6963687420736F20756D77656C74667265756E646C6963682C20776965206D616E63682065696E65722064656E6B742E"
Satz(6) = "5A7765692044696E67652073696E6420756E656E646C6963682C2064617320556E6976657273756D20756E6420646965206D656E7363686C696368652044756D6D686569742C2061626572206265692064656D20556E6976657273756D2062696E20696368206D6972206E6F6368206E696368742067616E7A207369636865722E"
Satz(7) = "45732067696274206E69636874732047757465732C206573207365692064656E6E206D616E207475742065732E"
Satz(8) = "426C61756B7261757420626C6569627420426C61756B7261757420756E642042726175746B6C65696420626C656962742042726175746B6C65696420756E6420506CE47474627265747420626C6569627420506C84747462726574742E"
Satz(9) = "496D206469636874656E204669636874656E6469636B69636874207761636873656E206469636B65204669636874656E20646963687420616E2064696368742E"
Satz(10) = "446572204461746976206973742064656D2047656E69746976207365696E20546F642E"
FOR j = 0 TO 10
Neu = "": Wort = "": Eingabe = ""
FOR i = 1 TO LEN(Satz(j))-1 STEP 2
Eingabe += CHR(VAL("&H"+MID(Satz(j),i,2)))
NEXT i
Text = LCASE(Eingabe)
FOR i = 1 TO LEN(Text)
Z = MID(Text,i,1)
b = ASC(Z)
IF ((b >= 97) AND (b <= 122)) THEN
IF Z <> MID(Eingabe,i,1) THEN GrBs = 1
Wort += Z
ELSE
IF (LEN(Wort) > 0) AND (LEN(Wort)) < 4 THEN
If GrBs = 1 Then
Neu += UCASE(LEFT(Wort,1))+MID(Wort,2)
ELSE
Neu += Wort
END IF
Wort = ""
ELSEIF (LEN(Wort) > 3) THEN
DO
WortAlt = Wort
Kern = MID(Wort,2,LEN(Wort)-2)
FOR Tausche = 1 TO (LEN(Kern)+10)
x = Zufallszahl (1,LEN(Kern))
y = Zufallszahl (1,LEN(Kern))
IF (x <> y) THEN
temp = MID(Kern,x,1)
MID(Kern,x,1) = MID(Kern,y,1)
MID(Kern,y,1) = temp
END IF
NEXT Tausche
If GrBs = 1 Then
WortNeu = UCASE(LEFT(Wort,1))+Kern+RIGHT(Wort,1)
ELSE
WortNeu = LEFT(Wort,1)+Kern+RIGHT(Wort,1)
END IF
LOOP UNTIL WortNeu <> WortAlt
Neu += WortNeu
Wort = ""
END IF
Neu += Z
GrBs = 0
END IF
NEXT i
PRINT Neu
NEXT j
SLEEP
END
Function Zufallszahl (ByVal Von As Integer, ByVal Bis As Integer) As Integer
RETURN INT(RND * (Bis-Von+1))+Von
End Function