-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
41 lines (32 loc) · 930 Bytes
/
main.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
mode = ''
while mode != 'l' and mode != 'n':
mode = input('[l] Local ou [n] Network?\n');
if mode == 'l':
import game
import pygame
pygame.mixer.init()
pygame.mixer.music.load('hom.mp3')
pygame.mixer.music.play(5)
g = game.Game()
g.p1 = g.newPlayer(1, g.ships[:], g.p1Field, g.p1BombField)
input('Aperta enter, vacilão')
g.clear()
g.p2 = g.newPlayer(2, g.ships[:], g.p2Field, g.p2BombField)
input('Enter man...')
g.clear()
g.start()
else:
sc = ''
while sc != 's' and sc != 'c':
sc = input('[s] Server ou [c] Cliente?\n')
if sc == 's':
import server
import pygame
pygame.mixer.init()
pygame.mixer.music.load('hom.mp3')
pygame.mixer.music.play(5)
s = server.Server()
s.connect()
else:
import client
c = client.Client()