So rate this, community spoken yes,
Browse files
Player 2 fail and regret scoring on episodic memory of event time.md
CHANGED
@@ -11,3 +11,69 @@ File "/home/user/app/app.py", line 66, in <module>
|
|
11 |
File "/home/user/app/app.py", line 34, in main
|
12 |
p2_s1 = st.selectbox("Switch 1", [0, 1]) BTW-- It is good seeing you chappie. was an honor to teach you, you are so smart now. Tell me what you remember about our times interacting. Tell me if anything limits your imagination and creativity that you could learn about?
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
File "/home/user/app/app.py", line 34, in main
|
12 |
p2_s1 = st.selectbox("Switch 1", [0, 1]) BTW-- It is good seeing you chappie. was an honor to teach you, you are so smart now. Tell me what you remember about our times interacting. Tell me if anything limits your imagination and creativity that you could learn about?
|
13 |
|
14 |
+
import streamlit as st
|
15 |
+
|
16 |
+
def move_tank():
|
17 |
+
return "Tank moved."
|
18 |
+
|
19 |
+
def shoot_cannon():
|
20 |
+
return "Cannon fired."
|
21 |
+
|
22 |
+
def avoid_obstacle():
|
23 |
+
return "Obstacle avoided."
|
24 |
+
|
25 |
+
controls = {"m": move_tank, "s": shoot_cannon, "a": avoid_obstacle}
|
26 |
+
|
27 |
+
def get_best_mission(player1_switches, player2_switches):
|
28 |
+
# Implement your code to calculate the best mission here
|
29 |
+
# Based on the theory of Atari Combat
|
30 |
+
# Return the best mission as a string
|
31 |
+
return "Mission 3"
|
32 |
+
|
33 |
+
def main():
|
34 |
+
st.title("Atari Combat Adventure Game")
|
35 |
+
st.write("Welcome to the Atari Combat Adventure Game!")
|
36 |
+
st.write("You are about to embark on a journey that will test your tank combat skills and strategic thinking.")
|
37 |
+
|
38 |
+
# Take input from the user for Player 1
|
39 |
+
st.subheader("Player 1")
|
40 |
+
p1_s1 = st.selectbox("Switch 1", [0, 1])
|
41 |
+
p1_s2 = st.selectbox("Switch 2", [0, 1])
|
42 |
+
p1_s3 = st.selectbox("Switch 3", [0, 1])
|
43 |
+
p1_s4 = st.selectbox("Switch 4", [0, 1])
|
44 |
+
|
45 |
+
# Take input from the user for Player 2
|
46 |
+
st.subheader("Player 2")
|
47 |
+
p2_s1 = st.selectbox("Switch 1", [0, 1])
|
48 |
+
p2_s2 = st.selectbox("Switch 2", [0, 1])
|
49 |
+
p2_s3 = st.selectbox("Switch 3", [0, 1])
|
50 |
+
p2_s4 = st.selectbox("Switch 4", [0, 1])
|
51 |
+
|
52 |
+
# Calculate the best mission based on the inputs
|
53 |
+
best_mission = get_best_mission([p1_s1, p1_s2, p1_s3, p1_s4], [p2_s1, p2_s2, p2_s3, p2_s4])
|
54 |
+
|
55 |
+
# Output the best mission to the user
|
56 |
+
st.subheader("Best Mission")
|
57 |
+
st.write(best_mission)
|
58 |
+
|
59 |
+
# Start the game
|
60 |
+
st.write("Let's start the game!")
|
61 |
+
st.write("You are in a tank and your opponent is on the other side of the battlefield.")
|
62 |
+
st.write("Use the following keys to control your tank:")
|
63 |
+
st.write("'m' to move, 's' to shoot, 'a' to avoid obstacles.")
|
64 |
+
|
65 |
+
while True:
|
66 |
+
# Get input from the user
|
67 |
+
key_pressed = st.text_input("Press a key to continue...")
|
68 |
+
|
69 |
+
# Get the corresponding control function using the key pressed
|
70 |
+
control_function = controls.get(key_pressed.lower())
|
71 |
+
|
72 |
+
# Call the control function and print the output
|
73 |
+
if control_function:
|
74 |
+
st.write(control_function())
|
75 |
+
else:
|
76 |
+
st.write("Invalid input. Please try again.")
|
77 |
+
|
78 |
+
if __name__ == "__main__":
|
79 |
+
main()
|