rewrite brainfuck ook and add encoding for them

This commit is contained in:
2025-08-08 23:48:32 +02:00
parent b2adc2a73c
commit 9cda38d35e
3 changed files with 51 additions and 83 deletions

View File

@@ -272,11 +272,17 @@ def auswahl_verarbeiten():
elif "ADFGVX dekodieren" in auswahl:
st.session_state.output_text = tools.adfgvx_dekodieren(text, additional_parameter)
st.session_state.map_data = None
elif "Brainfuck-Interpreter" in auswahl:
st.session_state.output_text = tools.brainfuck_interpreter(text)
elif "Brainfuck -> Text" in auswahl:
st.session_state.output_text = tools.brainfuck_to_text(text)
st.session_state.map_data = None
elif "Ook-Interpreter" in auswahl:
st.session_state.output_text = tools.ook_interpreter(text)
elif "Text -> Brainfuck" in auswahl:
st.session_state.output_text = tools.text_to_brainfuck(text)
st.session_state.map_data = None
elif "Ook -> Text" in auswahl:
st.session_state.output_text = tools.ook_to_text(text)
st.session_state.map_data = None
elif "Text -> Ook" in auswahl:
st.session_state.output_text = tools.text_to_ook(text)
st.session_state.map_data = None
# Standardwerte im Session State initialisieren
@@ -375,8 +381,10 @@ option = st.sidebar.radio("hidden_label",
":green[ADFGX dekodieren]",
":green[ADFGVX kodieren]",
":green[ADFGVX dekodieren]",
":green-badge[Brainfuck-Interpreter]",
":green-badge[Ook-Interpreter]",
":green-badge[Brainfuck -> Text]",
":green-badge[Text -> Brainfuck]",
":green-badge[Ook -> Text]",
":green-badge[Text -> Ook]",
),
key='option',
on_change=auswahl_verarbeiten,