Fixed order of op
This commit is contained in:
parent
05046965a6
commit
8a81ac1e54
2
oberon
2
oberon
|
@ -96,8 +96,8 @@ def play_game(gid):
|
|||
v2 = (json.dumps(play['board']), state['turn_number'] + 1, play['winner'], gid)
|
||||
res2 = db_do(q2, v2, True)
|
||||
if play['winner']:
|
||||
msg_path = '/home/{}/.oberon'.format(enemy)
|
||||
enemy = state['p1'] if state['p1'] != username else state['p2']
|
||||
msg_path = '/home/{}/.oberon'.format(enemy)
|
||||
writemode = 'a' if fileexists(msg_path) else 'w'
|
||||
with open(msg_path, writemode) as f:
|
||||
f.write('{} defeated you in {} game {}\n'.format(username, state['game_type'], gid))
|
||||
|
|
Loading…
Reference in New Issue