Example #1
0
 def bla(self):
     self.status_box = StatusBox(self, array([300,100]), array([200,500]))
     self.status_box['player1_score'] = 0
     self.status_box['player2_score'] = 0
     self.players.append(FrutrisBox(self, (50, 0)))
     self.players.append(FrutrisBox(self, (500, 0)))
     self.delay = TWO_PLAYER_DELAY
     play_effect('menu_select_game_2')
Example #2
0
 def remove_blocks(self):
     """Find vanishing blocks."""
     multiplets = self.level.find_multiplets()
     if len(multiplets) > 0:
         self.counter.count(multiplets)
         self.moving_blocks = self.level.get_explosions(multiplets)
         play_effect('fruit_drop_after_vanish')
         self.update_mode = self.update_remove
     else:
         self.all_moves_finished()
Example #3
0
 def insert_new_block(self):
     """Inserts a random block at top center."""
     if self.diamonds_queued > 0:
         self.insert_diamond(randint(1, 6))
         self.diamonds_queued -= 1
         play_effect('diamond_drop')
         self.update_mode = self.update_autodrop
     else:
         self.insert_random_fruit_pair()
         self.update_mode = self.update_drop
Example #4
0
    def __init__(self):
        config.FRAME = Rect(250, 10, 640, 512)
        self.game = Game()
        self.level_counter = LEVEL_COUNTER_INIT
        play_effect('frutris')
        self.frutris_box = FrutrisBox(self.game, LEVEL)
        # frame = Frame(self.screen, Rect(660, 220, 200, 200))
        self.data = {
            'score': 0,
            'level': 1,
        }
        self.status_box = self.create_status_box()

        # Music
        self.music_counter = 50  # periodically check for expiring track
        self.current_music = ('a', 1)
        self.music = MusicPlayer()
        self.music.play_music('/home/krother/projects/frutris/frutris/music/a1.ogg')
Example #5
0
    def __init__(self, screen):
        self.level_counter = 1
        play_effect('frutris')
        self.screen = screen
        screen.clear()
        self.frame = Frame(self.screen, Rect(10, 10, 640, 512))
        self.tile_factory = TileFactory('data/tiles.conf')
        self.events = None
        self.frutris_box = FrutrisBox(self.frame, self.tile_factory, LEVEL)
        # frame = Frame(self.screen, Rect(660, 220, 200, 200))
        self.data = {
            'score': 0,
            'level': 1,
        }
        self.status_box = self.create_status_box()

        # Music
        self.music_counter = 50 # periodically check for expiring track
        self.current_music = ('a', 1)
        self.music = MusicPlayer()
        self.music.play_music('/home/krother/projects/frutris/frutris/music/a1.ogg')
Example #6
0
 def win(self):
     play_effect('winner_first')
     play_effect('winner_second')
Example #7
0
 def bla(self):
     play_effect('menu_select_game_1')
     play_effect('game_over')
     play_effect('highscores_normal')
Example #8
0
 def play_sound(self):
     if self.sound:
         play_effect(self.sound)
Example #9
0
 def play_sound(self):
     if self.sound:
         play_effect(self.sound)