correct interactive key mapping

Signed-off-by: Thomas Schmid <tom@lfence.de>
This commit is contained in:
Thomas 2021-07-27 22:54:43 +02:00
parent 3ebdfc93e5
commit 9640e28b48
1 changed files with 5 additions and 4 deletions

View File

@ -74,16 +74,16 @@ def interactive(an, config):
print_pos = lambda x,y: print(f"x:{x} y:{y}")
while True:
if keyboard.is_pressed("w"):
if keyboard.is_pressed("a"):
x = x + 1
print_pos(x,y)
if keyboard.is_pressed("s"):
if keyboard.is_pressed("d"):
x = x - 1
print_pos(x,y)
if keyboard.is_pressed("a"):
if keyboard.is_pressed("w"):
y = y - 1
print_pos(x,y)
if keyboard.is_pressed("d"):
if keyboard.is_pressed("s"):
y = y + 1
print_pos(x,y)
if keyboard.is_pressed(" "):
@ -94,6 +94,7 @@ def interactive(an, config):
if c >= len(color_keys):
c = 0
print(f"color: {color_keys[c]}")
set_color(an, COLORS[color_keys[c]])