-
Notifications
You must be signed in to change notification settings - Fork 0
/
func_other_header.py
executable file
·66 lines (51 loc) · 3.83 KB
/
func_other_header.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/python3
# print header you see at the top of each page
# it uses termcolor to display which status we are at
# this is a ugly hack because pip3.7 is not happy at life
import sys
import os
import func_clear_screen
sys.path.append('/usr/lib/python3.6/site-packages/')
from termcolor import colored
def header(status, season, game, defscore, atascore):
"""This function allows same basic info to be passed in & at the top of the screen you will see a status, its really to imrpove visiability,acceptable inputs of status are:
i=Intro
s=Season
p=Playoff's
est=End of Season -Training
esd=End of Season -Draft
eg=End of game
season,game,defscore,atascore are expected to be ints but can are dealt with as strings
"""
if status == "i":
func_clear_screen.clear_screen()
print(colored('Intro', 'red'), colored('>>>', 'white'), colored('Season', 'white'), colored('>>>', 'white'), colored("Play Off's", 'white'), colored('>>>', 'white'), colored('End of Season -Training', 'white'),colored('>>>', 'white'),colored('End of Season -Draft', 'white'),colored('>>>','white'),colored('End of game', 'white'))
elif status == "s":
print(colored('Intro', 'white'), colored('>>>', 'white'), colored('Season', 'red'), colored('>>>', 'white'), colored("Play Off's", 'white'), colored('>>>', 'white'), colored('End of Season -Training', 'white'),colored('>>>', 'white'),colored('End of Season -Draft', 'white'),colored('>>>','white'),colored('End of game', 'white'))
elif status == "p":
print(colored('Intro', 'white'), colored('>>>', 'white'), colored('Season', 'white'), colored('>>>', 'white'), colored("Play Off's", 'red'), colored('>>>', 'white'), colored('End of Season -Training', 'white'),colored('>>>', 'white'),colored('End of Season -Draft', 'white'),colored('>>>','white'),colored('End of game', 'white'))
elif status == "est":
print(colored('Intro', 'white'), colored('>>>', 'white'), colored('Season', 'white'), colored('>>>', 'white'), colored("Play Off's", 'white'), colored('>>>', 'white'), colored('End of Season -Training', 'red'),colored('>>>', 'white'),colored('End of Season -Draft', 'white'),colored('>>>','white'),colored('End of game', 'white'))
elif status == "esd":
print(colored('Intro', 'white'), colored('>>>', 'white'), colored('Season', 'white'), colored('>>>', 'white'), colored("Play Off's", 'white'), colored('>>>', 'white'), colored('End of Season -Training', 'white'),colored('>>>', 'white'),colored('End of Season -Draft', 'red'),colored('>>>','white'),colored('End of game', 'white'))
elif status == "eg":
print(colored('Intro', 'white'), colored('>>>', 'white'), colored('Season', 'white'), colored('>>>', 'white'), colored("Play Off's", 'white'), colored('>>>', 'white'), colored('End of Season -Training', 'white'),colored('>>>', 'white'),colored('End of Season -Draft', 'white'),colored('>>>','white'),colored('End of game', 'red'))
else:
print("Oh dear something went wrong you passed a status of=",status)
return
print("Season ", season)
#print("Season %s Game %s" % (season, game))
print("First XI Defensive score ", defscore)
print("First XI Attacking score ", atascore)
print("##################################")
if __name__=="__main__":
# to unit test output
import os
func_clear_screen.clear_screen()
header(status="i", season=1, game=1, defscore=20, atascore=30)
header(status="s", season=1, game=1, defscore=20, atascore=30)
header(status="p", season=1, game=1, defscore=20, atascore=30)
header(status="est", season=1, game=1, defscore=20, atascore=30)
header(status="esd", season=1, game=1, defscore=20, atascore=30)
header(status="eg", season=1, game=1, defscore=20, atascore=30)
header(status="x", season=1, game=1, defscore=20, atascore=30)