home · contact · privacy
Widen Square view, too.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 6 Nov 2020 03:13:50 +0000 (04:13 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 6 Nov 2020 03:13:50 +0000 (04:13 +0100)
new2/rogue_chat_curses.py
new2/rogue_chat_nocanvas_monochrome.html

index 1ae5fa24b6a3e94e867ab297bce6962af3a7d860..9eb99c89354b9402aeddc28f857c0f1b01cd91d5 100755 (executable)
@@ -384,15 +384,14 @@ class TUI:
                     indent = 0 if indent else 1
             else:
                 for line in map_lines_split:
-                    map_lines += [''.join(line)]
+                    map_lines += [' '.join(line)]
             window_center = YX(int(self.size.y / 2),
                                int(self.window_width / 2))
             player = self.game.get_thing(self.game.player_id, False)
             center = player.position
             if self.mode.shows_info:
                 center = self.explorer
-            if type(self.game.map_geometry) == MapGeometryHex:
-                center = YX(center.y, center.x * 2)
+            center = YX(center.y, center.x * 2)
             offset = center - window_center
             if type(self.game.map_geometry) == MapGeometryHex and offset.y % 2:
                 offset += YX(0, 1)
index 16fd8342eedb6afdda1c172d60076f8a72bf2c26..e983c357cb2a943969d637ec16590f49a844ba54 100644 (file)
@@ -8,7 +8,7 @@ movement: <select id="movement_keys" name="movement_keys" >
 <option value="alphabetic" selected>w/a/s/d (square grid) or e,d,c,x,s,w (hex grid)</option>
 <option value="arrow_or_numpad">arrow keys (square grid) or numpad (hex grid)</option>
 </select>
-rows: <input id="n_rows" type="number" step=4 min=10 value=24 />
+rows: <input id="n_rows" type="number" step=4 min=8 value=24 />
 cols: <input id="n_cols" type="number" step=4 min=20 value=80 />
 command character: <select id="command_char"" >
 <option value=":" selected>:</option>
@@ -440,7 +440,7 @@ let tui = {
     let map_lines = []
     if (game.map_geometry == 'Square') {
         for (let line_split of map_lines_split) {
-            map_lines.push(line_split.join(''));
+            map_lines.push(line_split.join(' '));
         };
     } else if (game.map_geometry == 'Hex') {
         let indent = 0
@@ -459,9 +459,7 @@ let tui = {
     if (tui.mode.shows_info) {
         center_position = [explorer.position[0], explorer.position[1]];
     }
-    if (game.map_geometry == 'Hex') {
-        center_position[1] = center_position[1] * 2;
-    };
+    center_position[1] = center_position[1] * 2;
     let offset = [center_position[0] - window_center[0],
                   center_position[1] - window_center[1]]
     if (game.map_geometry == 'Hex' && offset[0] % 2) {