python - How to make a class that can run multi-threading program? -
i'm making spelling word game. in word fall sky , if players type in correct word, word disappears.
i've realized ncurses library , self defined function.
now need rewrite 1 self defined class.
but it's hard figure out how realized 1 class in 2 threadings needed! 1 word falling sky, , player typing.
do have ideals realize it?
you not need multiple threads this. instead, can use select()
wait data read (from keyboard) on stdin_fileno
timeout (upon can advance next "frame" of animation).
Comments
Post a Comment