mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
don't print duplicate status line
This commit is contained in:
parent
e2414ff3bd
commit
713ce151e9
1 changed files with 5 additions and 9 deletions
|
@ -482,18 +482,14 @@ class Device():
|
|||
print()
|
||||
GameStatus.makeAll()
|
||||
|
||||
lines = []
|
||||
for line in range(GameStatus.numLines()):
|
||||
txt = GameStatus.line(line)
|
||||
print(txt)
|
||||
lines.append(txt)
|
||||
|
||||
lines = [GameStatus.line(ii) for ii in range(GameStatus.numLines())]
|
||||
now = datetime.datetime.now()
|
||||
if not lines == GameStatus._prevLines:
|
||||
if lines == GameStatus._prevLines:
|
||||
print('no change in {}'.format(now - GameStatus._lastChange))
|
||||
else:
|
||||
for line in lines: print(line)
|
||||
GameStatus._prevLines = lines
|
||||
GameStatus._lastChange = now
|
||||
else:
|
||||
print('no change in {}'.format(now - GameStatus._lastChange))
|
||||
|
||||
@staticmethod
|
||||
def deviceFor(args, host):
|
||||
|
|
Loading…
Add table
Reference in a new issue