Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,15 @@
100 randomize timer
110 for i = 1 to 10
120 inicio$ = "RKR"
130 pieza$ = "QNN"
140 for n = 1 to len(pieza$)
150 posic = int(rnd(len(inicio$)+1))+1
160 inicio$ = left$(inicio$,posic-1)+mid$(pieza$,n,1)+right$(inicio$,len(inicio$)-posic+1)
170 next n
180 posic = int(rnd(len(inicio$)+1))+1
190 inicio$ = left$(inicio$,posic-1)+"B"+right$(inicio$,len(inicio$)-posic+1)
200 posic = posic+1+2*int(int(rnd(len(inicio$)-posic))/2)
210 inicio$ = left$(inicio$,posic-1)+"B"+right$(inicio$,len(inicio$)-posic+1)
220 print inicio$
230 next i
240 end

View file

@ -18,4 +18,4 @@ repeat
randins "Q" 1 8 b1
randins "N" 1 8 b1
randins "N" 1 8 b1
print strjoin t$[]
print strjoin t$[] ""

View file

@ -9,9 +9,12 @@ For i As Byte = 1 To 10
Mid(pieza, n, 1) +_
Right(inicio, Len(inicio) - posic + 1)
Next n
posic = Int(Rnd*(Len(inicio) + 1)) + 1
inicio = Left(inicio, posic-1) + "B" + Right(inicio, Len(inicio) - posic + 1)
posic = posic + 1 + 2 * Int(Int(Rnd*(Len(inicio) - posic)) / 2)
posic += 1 + 2 * (Int(Rnd*(Len(inicio) - posic)) \ 2)
inicio = Left(inicio, posic-1) + "B" + Right(inicio, Len(inicio) - posic + 1)
Print inicio
Next i

View file

@ -0,0 +1,21 @@
Public Sub Main()
Randomize
For i As Integer = 1 To 10
Dim inicio As String = "RKR"
Dim pieza As String = "QNN"
Dim posic As Integer
For n As Integer = 1 To Len(pieza)
posic = Int(Rnd * (Len(inicio) + 1)) + 1
inicio = Left(inicio, posic - 1) & Mid(pieza, n, 1) & Right(inicio, Len(inicio) - posic + 1)
Next
posic = Int(Rnd * (Len(inicio) + 1)) + 1
inicio = Left(inicio, posic - 1) & "B" & Right(inicio, Len(inicio) - posic + 1)
posic += 1 + 2 * Int(Int(Rnd * (Len(inicio) - posic)) / 2)
inicio = Left(inicio, posic - 1) & "B" & Right(inicio, Len(inicio) - posic + 1)
Print inicio
Next
End

View file

@ -0,0 +1,15 @@
##
function random960: string;
begin
var start := 'RKR';
foreach var piece in 'QNN' do
Insert(piece, start, Random(start.length + 1) + 1);
var bishpos := Random(start.length + 1) + 1;
Insert('B', start, bishpos);
Insert('B', start, Range(bishpos + 1, start.Length + 1, 2).ToArray.RandomElement);
result := start;
end;
random960.Println;

View file

@ -0,0 +1,21 @@
OpenConsole()
RandomSeed(Date())
For i = 1 To 10
inicio.s = "RKR"
pieza.s = "QNN"
For n = 1 To Len(pieza)
posic = Random(Len(inicio)) + 1
inicio = Left(inicio, posic - 1) + Mid(pieza, n, 1) + Right(inicio, Len(inicio) - posic + 1)
Next n
posic = Random(Len(inicio)) + 1
inicio = Left(inicio, posic - 1) + "B" + Right(inicio, Len(inicio) - posic + 1)
posic + 1 + 2 * Int(Random(Len(inicio) - posic) / 2)
inicio = Left(inicio, posic - 1) + "B" + Right(inicio, Len(inicio) - posic + 1)
PrintN(inicio)
Next i
PrintN(#CRLF$ + "Press ENTER to exit"): Input()
CloseConsole()

View file

@ -1,9 +1,8 @@
RANDOMIZE TIMER
RANDOMIZE TIMER ' DELETE for Run BASIC, Just Basic & Liberty BASIC
FOR i = 1 TO 10
inicio$ = "RKR"
pieza$ = "QNN"
'Dim posic
FOR n = 1 TO LEN(pieza$)
posic = INT(RND * (LEN(inicio$) + 1)) + 1