slotUI/SlotCli.py

changeset 99
434d60dc9b12
parent 97
9a01c57147db
child 100
039ab094f79b
equal deleted inserted replaced
98:8c1f249b2144 99:434d60dc9b12
283 # is there something in the rx buffer? 283 # is there something in the rx buffer?
284 rx = self.box.readline() 284 rx = self.box.readline()
285 if (rx != "") or self.test: 285 if (rx != "") or self.test:
286 self.scr.addstr(17,0, 286 self.scr.addstr(17,0,
287 "Last RX: %19s" % rx, curses.color_pair(2)) 287 "Last RX: %19s" % rx, curses.color_pair(2))
288 self.scr.redrawwin()
288 self.scr.refresh() 289 self.scr.refresh()
289 # we have received something 290 # we have received something
290 try: 291 try:
291 data = rx.split(":") 292 data = rx.split(":")
292 if rx[:2] == "L:": 293 if rx[:2] == "L:":
413 trigger_sound("win") 414 trigger_sound("win")
414 # get the one with position 1 415 # get the one with position 1
415 for slot in self.slots: 416 for slot in self.slots:
416 if slot["position"] == 1: 417 if slot["position"] == 1:
417 slot["status"] = "WINNER!" 418 slot["status"] = "WINNER!"
419 self.render_slots()
418 self.sysclk_last = self.sysclk 420 self.sysclk_last = self.sysclk
419 421
420 422
421 423
422 self.scr.addstr(17,31, 424 self.scr.addstr(17,31,

mercurial