Data update

This commit is contained in:
Ingy döt Net 2024-10-16 18:07:41 -07:00
parent 81fd053722
commit 52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions

View file

@ -8,7 +8,7 @@ model
int y, x ← 0
for each text symbol in symbols
me.grid[y][x] ← symbol
me.map[symbol] ← int%int(y => x).named("y", "x")
me.map[symbol] ← int%int(y x).named("y", "x")
x++
if x æ side
x ← 0
@ -16,8 +16,8 @@ model
end
end
end
fun asText = text by block
text result = ""
fun asText text by block
text result
for int y ← 0; y < me.grid.length; y++
for int x ← 0; x < me.grid[y].length; x++
result.append(" " + me.grid[y][x])
@ -64,19 +64,19 @@ model
end
type Main
List pairs ← Pair[
text%PolybiusSquare("ATTACKATDAWN" => PolybiusSquare(5, "ABCDEFGHIKLMNOPQRSTUVWXYZ")).named("sample", "square"),
text%PolybiusSquare("FLEEATONCE" => PolybiusSquare(5, "BGWKZQPNDSIOAXEFCLUMTHYVR")).named("sample", "square"),
text%PolybiusSquare("ATTACKATDAWN" => PolybiusSquare(5, "BGWKZQPNDSIOAXEFCLUMTHYVR")).named("sample", "square"),
text%PolybiusSquare("The invasion will start on the first of January".upper().replace(" ", "") =>
text%PolybiusSquare("ATTACKATDAWN" PolybiusSquare(5, "ABCDEFGHIKLMNOPQRSTUVWXYZ")).named("sample", "square"),
text%PolybiusSquare("FLEEATONCE" PolybiusSquare(5, "BGWKZQPNDSIOAXEFCLUMTHYVR")).named("sample", "square"),
text%PolybiusSquare("ATTACKATDAWN" PolybiusSquare(5, "BGWKZQPNDSIOAXEFCLUMTHYVR")).named("sample", "square"),
text%PolybiusSquare("The invasion will start on the first of January".upper().replace(" ", "")
PolybiusSquare(6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")).named("sample", "square")]
for each Pair pair in pairs
writeLine("Using Polybius square:")
write(pair.square)
BifidCipher cipher ← BifidCipher(pair.square)
write("Encrypting '" + pair.sample + "'")
write("Encrypting '", pair.sample, "'")
text encrypted ← cipher.encrypt(pair.sample)
write(" => '" + encrypted + "'")
write(" ⇒ '", encrypted, "'")
text decrypted ← cipher.decrypt(encrypted)
writeLine(" => '" + decrypted + "'")
writeLine(" ⇒ '", decrypted, "'")
writeLine()
end