Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chs/ui/board.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chess
import pwd
import getpass
import os

from chs.client.ending import GameOver
Expand Down Expand Up @@ -210,7 +210,7 @@ def get_meta_section(self, board, fen, rank, game_over):

def get_user(self, is_computer=False):
title = '{}BOT {}'.format(Colors.ORANGE, Colors.RESET) if is_computer else ''
name = 'stockfish {}'.format(self._level) if is_computer else pwd.getpwuid(os.getuid()).pw_name
name = 'stockfish {}'.format(self._level) if is_computer else getpass.getuser()
return '{}● {}{}{}{}'.format(Colors.DULL_GREEN, title, Colors.LIGHT, name, Colors.RESET)

def get_bar_section(self, rank):
Expand Down