home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f90a635
)
New client: Reorganize code.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 7 Nov 2015 20:47:22 +0000
(21:47 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 7 Nov 2015 20:47:22 +0000
(21:47 +0100)
client_prototype.py
patch
|
blob
|
history
diff --git
a/client_prototype.py
b/client_prototype.py
index 815ae7eaed3d7bc10fde1530b197edf232d9825d..c828f7dee0ab584124630f52ca71fe56a17b2d20 100644
(file)
--- a/
client_prototype.py
+++ b/
client_prototype.py
@@
-214,10
+214,9
@@
def cursed_main(stdscr):
draw_screen()
cursed_main.redraw = False
char = stdscr.getch()
- if (char >= 0):
- if chr(char) in commands:
- commands[chr(char)]()
- cursed_main.redraw = True
+ if char >= 0 and chr(char) in commands:
+ commands[chr(char)]()
+ cursed_main.redraw = True
new_data_from_server = io["file_in"].read()
ping_test(len(new_data_from_server) > 0)
read_into_message_queue(new_data_from_server)