Last active
August 29, 2015 14:06
-
-
Save jason-curtis/3dfaa704e9da5bd08e44 to your computer and use it in GitHub Desktop.
trash talk colorize function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from components.cards import Color | |
from components.style import redify, blueify | |
trash_talked = set() | |
def _trash_talk(color, *messages): | |
colorize = redify if color == Color.red else blueify | |
full_message = ' '.join(map(str, messages)) | |
if full_message in trash_talked: | |
return | |
trash_talked.add(full_message) | |
print colorize(full_message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment