Exemplo n.º 1
0
def main():
    print "Starting server..."
    options.read_configuration()
    socket = get_socket()
    while True:
        print "Waiting for clients on TCP port " + globals.port
        sock, addr = socket.accept()
        Connect(sock, addr).start()
Exemplo n.º 2
0
def main():
    print "Starting server..."
    options.read_configuration()
    socket = get_socket()
    while True:
        print "Waiting for clients on TCP port " + globals.port
        sock, addr = socket.accept()
        Connect(sock, addr).start()
            animation_running.run()
            if len(globals.attack_started) and len(globals.cards_attacking) == False:
                if not globals.cli:
                    player.switch_position()
        pygame.display.flip()
        clock.tick(50)



pygame.init()
globals.screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption('Wizards Magic')
clock = pygame.time.Clock()

#read configuration file
options.read_configuration()
if globals.music == "Y":
    thread.start_new_thread(load_and_start_bg_music,())
menu.menu_main()

globals.event_handler = eventhandler.Event_handler()
globals.point = eventhandler.Point()
globals.gameinformationpanel = gameinformation.GameInformationPanel()
globals.cardinfo = cardinfo.CardInfo()

globals.screen.blit(globals.background, (0, 0))

pygame.display.flip()
# noinspection PyPackageRequirements
while 1:
    for event in pygame.event.get():
Exemplo n.º 4
0
            animation_running.run()
            if not (len(wzglobals.attack_started)
                    and len(wzglobals.cards_attacking)):
                if not wzglobals.cli:
                    player.switch_position()
        pygame.display.flip()
        clock.tick(50)


pygame.init()
wzglobals.screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption('Wizards Magic')
clock = pygame.time.Clock()

# read configuration file
options.read_configuration()
if wzglobals.music == "Y":
    music_thread = threading.Thread(target=load_and_start_bg_music)
    music_thread.start()
menu.menu_main()

wzglobals.event_handler = eventhandler.Event_handler()
wzglobals.point = eventhandler.Point()
wzglobals.gameinformationpanel = gameinformation.GameInformationPanel()
wzglobals.cardinfo = cardinfo.CardInfo()

wzglobals.screen.blit(wzglobals.background, (0, 0))

pygame.display.flip()
# noinspection PyPackageRequirements
while 1:
Exemplo n.º 5
0
from options import read_configuration


current_folder = os.path.dirname(os.path.abspath(__file__))
__author__ = "chubakur"
__date__ = "$13.02.2011 18:46:32$"


LANGDIR = os.path.join(current_folder, 'languages')

try:
    t = gettext.translation(
        'cards', LANGDIR, languages=[wzglobals.language]
    )
except AttributeError:
    read_configuration()
    t = gettext.translation(
        'cards', LANGDIR, languages=[wzglobals.language]
    )
try:
    # Python 2
    _ = t.ugettext
except AttributeError:
    # Python 3
    _ = t.gettext
t.install()


pygame.font.init()
font = pygame.font.Font(None, 25)
Exemplo n.º 6
0
import life_cards_deck
import water_cards_deck
import wzglobals

from options import read_configuration

current_folder = os.path.dirname(os.path.abspath(__file__))
__author__ = "chubakur"
__date__ = "$13.02.2011 18:46:32$"

LANGDIR = os.path.join(current_folder, 'languages')

try:
    t = gettext.translation('cards', LANGDIR, languages=[wzglobals.language])
except AttributeError:
    read_configuration()
    t = gettext.translation('cards', LANGDIR, languages=[wzglobals.language])
try:
    # Python 2
    _ = t.ugettext
except AttributeError:
    # Python 3
    _ = t.gettext
t.install()

pygame.font.init()
font = pygame.font.Font(None, 25)


class CastLabel(pygame.sprite.Sprite):
    def __init__(self):