-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutility.py
More file actions
55 lines (49 loc) · 1.19 KB
/
utility.py
File metadata and controls
55 lines (49 loc) · 1.19 KB
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
def helpCheck( arguments ):
#{
#print( type(arguments) )
for item in arguments:
#{
#print ( item )
if ( item.lower() == "help" ):
#{
return False
#}
elif ( item.lower() == "version" or item.lower() == "copyright" ):
#{
print( "(C) 2014 by Divinus01 \nVersion: 1.02.00 \nGNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 \nFor further information see LICENCE" )
return False
#}
#}
return True
#}
def startGame( game, max_y, max_x, stdscr ):
#{
if ( game.lower( ) == "shanghai" ):
#{
build_shanghai.build( stdscr, max_y, max_x )
game_shanghai.start( stdscr )
#}
#}
def init_colors( ):
#{
colors = [ ]
colors.append( None )
u.init_pair( 1, u.COLOR_YELLOW, u.COLOR_BLACK )
u.init_pair( 2, u.COLOR_GREEN, u.COLOR_BLACK )
u.init_pair( 3, u.COLOR_RED, u.COLOR_BLACK )
colors.append( u.color_pair( 1 ) )
colors.append( u.color_pair( 2 ) )
colors.append( u.color_pair( 3 ) )
return colors
#}
def init( ):
#{
global lines_sum_shanghai
import shanghai.lines_sum_shanghai as lines_sum_shanghai
global build_shanghai
import shanghai.build_shanghai as build_shanghai
global game_shanghai
import shanghai.game_shanghai as game_shanghai
global u
import unicurses as u
#}