-
Notifications
You must be signed in to change notification settings - Fork 0
/
cicfighters.py
53 lines (46 loc) · 2.02 KB
/
cicfighters.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
#encoding = utf-8
#/************************************************************/
#/* */
#/* CIC Fighters: */
#/* Jogo de luta com os professores do CIC =) */
#/* */
#/* Uso: python cicfighter.py */
#/* Ou para modo em tela cheia: python cicfighter.py -f */
#/* */
#/* Controles: */
#/* P1 */
#/* movimento: w, a, s, d */
#/* botoes: y - soco, u - chute, i - especial */
#/* */
#/* P2 */
#/* movimento: Cima, baixo, esquerda e direita */
#/* botoes: NUM7 - soco, NUM8 - chute, NUM9 - especial */
#/* */
#/* ESC para sair */
#/* */
#/************************************************************/
import os, sys
import getopt
from GameEngine import *
def usage():
"""Imprime informacoes de uso"""
print "Uso: cicfighter.py"
print
print "Opcoes:"
print " -f | --fullscreen : Modo em tela cheia"
print " -h | --help : Esta tela"
if __name__ == "__main__":
try:
opts, args = getopt.getopt(sys.argv[1:], "fh", ["fullscreen","help"])
except getopt.GetoptError:
usage()
sys.exit(1)
fullscreen = False
for opt, arg in opts:
if opt in ('-f', '--fullscreen'):
fullscreen = True
if opt in ('-h', '--help'):
usage()
sys.exit(1)
Engine = GameEngine(fullscreen)
Engine.run()