Source

outofdesert / outofdesert / main.py


import pygame
from pygame.locals import *



class Sprite(pygame.sprite.DirtySprite):
    def start(self):
        # when it gets to 1.0 the game is complete, 0.0 fail.
        self.indicator = 0.5
        self.elapsed_time = 0.0
        self.image = None
        self.rect = None

    def update(self, *args):
        pass
    #def draw(self):
    #    return []

class Group(pygame.sprite.LayeredDirty):
    def start(self):
        pass

    #def update(self, *args):
    #    pass

    #def draw(self):
    #    return []


class Game(Group):
    def start(self):
        # when it gets to 1.0 the game is complete, 0.0 fail.
        self.indicator = 0.5


class Hero(Sprite):
    def start(self):
        pass

class Person(Sprite):
    def start(self):
        pass

class Indicator(Sprite):
    def start(self):
        pass

class Floor(Sprite):
    def start(self):
        pass

class Duck(Sprite):
    def start(self):
        pass





def main():
    """ your app starts here
    """
    SCREEN_SIZE = 640,480
    pygame.display.init()
    screen = pygame.display.set_mode(SCREEN_SIZE)
    #dirty = [pygame.display.get_surface().get_size()]
    dirty = []
    going = True
    g = Game()
    while going:
        events = pygame.event.get()
        for e in events:
            if e.type == QUIT or e.type == KEYDOWN and e.key == K_ESCAPE:
                going = False
        dirty = g.draw(screen)
        pygame.display.update(dirty)