Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion terminal_games/arcade.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys
import time
from arcade_utils import clear_screen, get_key, load_stats, draw_retro_box, beep, C_RESET, C_BOLD, C_RED, C_GREEN, C_YELLOW, C_CYAN, C_WHITE, C_MAGENTA
from arcade_utils import clear_screen, get_key, load_stats, draw_retro_box, beep, C_RESET, C_BOLD, C_RED, C_GREEN, C_YELLOW, C_CYAN, C_WHITE, C_MAGENTA, C_BLUE
from sudoku import play_sudoku
from minesweeper import play_minesweeper
try:
Expand Down
2 changes: 1 addition & 1 deletion terminal_games/arcade_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def draw_retro_box(width, title, content_lines, color=C_CYAN, title_color=C_YELL
# But standard print is easier. Let's trust the padding calc for now.
print(indent + f"║{l_text}║")

print(indent + f"╚" + "═" * (width - 2) + "╝{C_RESET}")
print(indent + f"╚" + "═" * (width - 2) + f"╝{C_RESET}")

def show_popup(msg, color=C_CYAN, delay=2):
clear_screen()
Expand Down
4 changes: 2 additions & 2 deletions terminal_games/minesweeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def print_board(board, revealed, flagged, cursor, elapsed, mines, exploded=None,

border_color = C_RED if flash_red else C_CYAN

print(indent + f"{border_color}╔" + "═══" * cols + "═╗{C_RESET}")
print(indent + f"{border_color}╔" + "═══" * cols + f"═╗{C_RESET}")

for r in range(rows):
line = indent + f"{border_color}║{C_RESET} "
Expand All @@ -62,7 +62,7 @@ def print_board(board, revealed, flagged, cursor, elapsed, mines, exploded=None,
else: char = f"{style}{C_WHITE}■{C_RESET} "
line += char + " "
print(line + f"{border_color}║{C_RESET}")
print(indent + f"{border_color}╚" + "═══" * cols + "═╝{C_RESET}")
print(indent + f"{border_color}╚" + "═══" * cols + f"═╝{C_RESET}")

controls = "ARROWS: Move | ENTER: Reveal | F: Flag | Q: Exit"
ctrl_indent = (term_width - len(controls)) // 2
Expand Down
2 changes: 1 addition & 1 deletion terminal_games/tetris.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import time
import os
import random
from arcade_utils import clear_screen, get_key, draw_retro_box, beep, show_popup, update_stats, load_stats, animated_flash, print_big_title, C_RESET, C_BOLD, C_RED, C_GREEN, C_YELLOW, C_CYAN, C_WHITE, C_MAGENTA, C_BLACK
from arcade_utils import clear_screen, get_key, draw_retro_box, beep, show_popup, update_stats, load_stats, animated_flash, print_big_title, C_RESET, C_BOLD, C_RED, C_GREEN, C_YELLOW, C_CYAN, C_WHITE, C_MAGENTA, C_BLACK, C_BLUE

WIDTH = 10
HEIGHT = 20
Expand Down