Skip to content

Commit

Permalink
Fix some styling
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzuber committed Feb 17, 2020
1 parent 8e9c75d commit 42d08a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chs/engine/stockfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def normalize(self, cp):
if cp is None:
return None
raw_score = 2 / (1 + math.exp(-0.004 * cp)) - 1
return round(100 * raw_score)
return round(raw_score, 1)

def done(self):
try:
Expand Down
2 changes: 1 addition & 1 deletion chs/ui/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_meta_section(self, board, fen, rank, game_over):
text = '{}{}'.format(Colors.ORANGE, self.string_of_game_over(game_over))
return '{}{}'.format(padding, text)
else:
return '{}{}wp:{}% cp:{}'.format(padding, Colors.DULL_GRAY, self._score, self._cp)
return '{}{}{} cp:{}'.format(padding, Colors.DULL_GRAY, str(self._score).ljust(11), self._cp)
if rank == 3:
return '{}{}┗━━━━━━━━━━━━━━━━━━━┛'.format(padding_alt, Colors.DULL_GRAY)
if rank == 4:
Expand Down

0 comments on commit 42d08a9

Please sign in to comment.