Beispiel #1
0
from states.root           import RootMessageState
from states.root           import RootInputDialogState
from states.game           import GameState
from states.init_game      import InitGameState
from states.ingame_menu    import IngameMenuState
from states.round          import GameRoundState
from states.menu           import MainMenuState
from states.reinforcements import ReinforcementState
from states.attack	   import AttackState
from states.move	   import MovementState
from states.risk_attack    import RiskAttackState

import os
import os.path

_log = get_log (__name__)

class JagsatApp (GameApp):

    NAME = 'jagsat'
    
    OPTIONS = GameApp.OPTIONS + \
"""
Game options:
  -m, --map <file>    Map file to load.
      --music-on      Enable music.
      --music-off     Disable music.
  -s, --state <state> Initial state.
      --ratio-hack    Enable hack for the Asus tablet.
"""
    
Beispiel #2
0
#    - Guillem Medina
#    - Sarah Lindstrom
#    - Aksel Junkkila
#    - Thomas Forss
#

from base.log import get_log
from core import task
from itertools import cycle

import theme
import random

from PySFML import sf

_log = get_log(__name__)


class state:
    idle, playing = range(0, 2)


class MusicPlayer(task.Task):
    def __init__(self,
                 audio=None,
                 playlist=theme.background_music,
                 shuffle=True,
                 loop=True,
                 *a,
                 **k):
        super(MusicPlayer, self).__init__(*a, **k)