|
2 | 2 | from AbsShip import AbsShip
|
3 | 3 | from ShipStarbase import ShipStarbase
|
4 | 4 | from Quadrant import Quadrant
|
| 5 | +import Glyphs |
5 | 6 |
|
6 | 7 | class ShipEnterprise(AbsShip):
|
7 | 8 |
|
@@ -120,26 +121,27 @@ def long_range_scan(self, game):
|
120 | 121 | game.display(Quips.jibe_damage('Long Ranged Scanners'))
|
121 | 122 | game.display()
|
122 | 123 | return
|
123 |
| - sb = "" |
| 124 | + |
124 | 125 | pw_sector = game.game_map.sector
|
125 |
| - if pw_sector < 5: |
126 |
| - pw_sector = 6 |
127 |
| - elif pw_sector > 59: |
128 |
| - pw_sector = 59 |
129 |
| - dots = None |
130 |
| - for peek in range(pw_sector-5, pw_sector + 6): |
| 126 | + if pw_sector < 4: |
| 127 | + pw_sector = 5 |
| 128 | + elif pw_sector > 60: |
| 129 | + pw_sector = 60 |
| 130 | + lines = [] |
| 131 | + for peek in range(pw_sector-4, pw_sector + 5): |
131 | 132 | quad = game.game_map.scan_quad(peek)
|
132 |
| - lines = \ |
133 |
| - (f"| Sector: {quad.number:>02}", |
134 |
| - f"Enemies: {quad.klingons:>02}", |
135 |
| - f"Bases: {quad.starbases:>02}", |
136 |
| - f"Stars: {quad.stars:>03} |") |
137 |
| - str_ = ' | '.join(lines) |
138 |
| - dots = '-' * len(str_) + "\n" |
139 |
| - sb += dots |
140 |
| - sb += str_ |
141 |
| - game.display(sb) |
142 |
| - sb = "" |
| 133 | + lines.append(f"SEC: {quad.number:>03}") |
| 134 | + lines.append(f"{Glyphs.KLINGON}: {quad.klingons:>03}") |
| 135 | + lines.append(f"{Glyphs.STARBASE}: {quad.starbases:>03}") |
| 136 | + lines.append(f"{Glyphs.STAR}: {quad.stars:>03}") |
| 137 | + dots = ' +' + ('-' * 35) + '+' |
| 138 | + game.display(dots) |
| 139 | + game.display(' | LONG RANGE SCAN |') |
143 | 140 | game.display(dots)
|
| 141 | + for ss in range(0,(len(lines)-1),12): |
| 142 | + for offs in range(4): |
| 143 | + line = f' | {lines[ss+offs]:<9} | {lines[ss+4+offs]:<9} | {lines[ss+8+offs]:<9} |' |
| 144 | + game.display(line) |
| 145 | + game.display(dots) |
144 | 146 | game.display()
|
145 | 147 |
|
0 commit comments