home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCE: Add map coloring.
[plomrogue]
/
client
/
windows.py
diff --git
a/client/windows.py
b/client/windows.py
index 4177bed7cfd4a47722f4b3ff85b2226568daa993..3966d0c4d20312b9cc99b8f746ac8a67928f59d8 100644
(file)
--- a/
client/windows.py
+++ b/
client/windows.py
@@
-1,3
+1,8
@@
+# This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+# or any later version. For details on its copyright, license, and warranties,
+# see the file NOTICE in the root directory of the PlomRogue source package.
+
+
import math
import curses
import math
import curses
@@
-103,7
+108,8
@@
def win_log(self):
number_of_lines = 0
for line in world_data["log"]:
number_of_lines += math.ceil(len(line) / win_size[1])
number_of_lines = 0
for line in world_data["log"]:
number_of_lines += math.ceil(len(line) / win_size[1])
- padding_size = win_size[1] - (len(line) % win_size[1])
+ mod = len(line) % win_size[1]
+ padding_size = 0 if mod == 0 else win_size[1] - mod
winmap += line + (padding_size * " ")
if number_of_lines < win_size[0]:
winmap = (" " * win_size[1] * (win_size[0] - number_of_lines)) + winmap
winmap += line + (padding_size * " ")
if number_of_lines < win_size[0]:
winmap = (" " * win_size[1] * (win_size[0] - number_of_lines)) + winmap