Move colorization to the display layer
Color output isn't necessarily always going to be a terminal output thing, and terminals don't always support the same escape codes (e.g. on Windows). Thus, all colorization efforts are done in the Display rather than in the Game. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -2,10 +2,11 @@ import argparse
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from agame.color import colorize
|
||||
from agame.display import ANSIDisplay
|
||||
from agame.game import Game
|
||||
|
||||
# TODO - conditional import for this based on OS
|
||||
from agame.display import ANSIDisplay
|
||||
|
||||
|
||||
# Parse args
|
||||
parser = argparse.ArgumentParser(
|
||||
|
||||
Reference in New Issue
Block a user