mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +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()
|
print()
|
||||||
GameStatus.makeAll()
|
GameStatus.makeAll()
|
||||||
|
|
||||||
lines = []
|
lines = [GameStatus.line(ii) for ii in range(GameStatus.numLines())]
|
||||||
for line in range(GameStatus.numLines()):
|
|
||||||
txt = GameStatus.line(line)
|
|
||||||
print(txt)
|
|
||||||
lines.append(txt)
|
|
||||||
|
|
||||||
now = datetime.datetime.now()
|
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._prevLines = lines
|
||||||
GameStatus._lastChange = now
|
GameStatus._lastChange = now
|
||||||
else:
|
|
||||||
print('no change in {}'.format(now - GameStatus._lastChange))
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def deviceFor(args, host):
|
def deviceFor(args, host):
|
||||||
|
|
Loading…
Add table
Reference in a new issue