from esp_hadouken.levels.Level import *
from void.Void import *

class Circulor(Level):

    def __init__(self, parent):
        Level.__init__(self, parent)

    def set_void(self):
        self.void = Void(self)
from random import randint
from operator import sub

from pygame import draw

from esp_hadouken.GameChild import *

class Wave(GameChild):

    def __init__(self, parent, orientation, bottom):
        GameChild.__init__(self, parent)
        self.orientation = orientation
        self.bottom = bottom
        self.edge = 0 if orientation == parent.orient_left else \
                    parent.get_width()
        self.set_base_length()
        self.update()

    def set_base_length(self):
        self.base_length = randint(*self.parent.parent.base_range)

    def get_top(self):
        return self.vertices[0][1]

    def get_bottom(self):
        return self.vertices[1][1]

    def update(self):
        self.bottom += self.parent.parent.scroll_speed
        self.set_height()
        self.set_vertices()
        self.draw()

    def get_pos(self):
        return float(self.bottom) / self.parent.get_height()

    def set_height(self):
        height_r = self.parent.parent.height_range
        self.height = self.get_pos() * -sub(*height_r) + height_r[0]

    def set_vertices(self):
        height = self.height
        edge = self.edge
        base_length = self.base_length
        bottom = self.bottom
        peak_x = height if self.orientation == self.parent.orient_left else \
                 edge - height
        base_top = edge, bottom - base_length
        base_bottom = edge, bottom
        peak = peak_x, bottom - base_length / 2
        self.vertices = base_top, base_bottom, peak

    def draw(self):
        parent = self.parent
        draw.polygon(parent, parent.parent.opaque_color, self.vertices)
from esp_hadouken import levels

from Waves import *

class Void(levels.Void.Void):

    def __init__(self, parent):
        levels.Void.Void.__init__(self, parent)
        self.read_configuration()
        self.waves = Waves(self)

    def read_configuration(self):
        config = self.get_configuration()
        prefix = "circulor-level-"
        self.height_range = config[prefix + "height-range"]
        self.base_range = config[prefix + "base-range"]
        self.scroll_speed = config[prefix + "scroll-speed"]
        self.padding = config[prefix + "void-padding"]

    def update_area(self):
        self.waves.update()
from pygame import Surface, Rect

from esp_hadouken.GameChild import *
from Wave import *

class Waves(GameChild, Surface):

    orient_left, orient_right = range(2)

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.init_surface()
        self.set_background()
        self.generate_waves()

    def init_surface(self):
        parent = self.parent
        width = parent.get_width()
        padding = parent.padding
        bandit_height = parent.parent.bandit.rect.h
        height = parent.get_height() - sum(padding) - bandit_height
        rect = Rect(0, padding[0] + bandit_height, width, height)
        Surface.__init__(self, rect.size)
        self.convert()
        self.rect = rect

    def set_background(self):
        background = Surface(self.get_size())
        background.fill(self.parent.transparent_color)
        background.convert()
        self.background = background

    def generate_waves(self):
        self.waves = waves = []
        while not waves or waves[0].get_bottom() < 0:
            self.add_wave()

    def add_wave(self):
        waves = self.waves
        if not waves:
            bottom = self.get_height()
            orientation = self.orient_right
        else:
            bottom = waves[0].get_top()
            orientation = not waves[0].orientation
        waves.insert(0, Wave(self, orientation, bottom))

    def update(self):
        self.set_clip()
        self.clear()
        self.update_waves()
        self.draw()

    def set_clip(self):
        parent = self.parent
        y = parent.get_clip().top - parent.padding[0] - \
            parent.parent.bandit.rect.h
        Surface.set_clip(self, Rect((0, y), parent.get_clip().size))

    def clear(self):
        self.blit(self.background, (0, 0))

    def update_waves(self):
        waves = self.waves
        if waves[0].get_bottom() > 0:
            self.add_wave()
        for wave in waves:
            if wave.get_top() > self.get_height():
                waves.remove(wave)
            else:
                wave.update()

    def draw(self):
        self.parent.blit(self, self.rect)
from esp_hadouken.pgfw.GameChild import GameChild
from esp_hadouken.overworld.Background import Background
from esp_hadouken.overworld.wall.Wall import Wall
from esp_hadouken.Toy import Toy
from esp_hadouken.dot.Dot import Dot

class Overworld(GameChild):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.display_surface = self.get_display_surface()
        self.delegate = self.get_delegate()
        self.load_configuration()
        self.set_children()
        self.subscribe(self.respond)
        self.place_toy()
        self.reset()
        self.deactivate()

    def load_configuration(self):
        config = self.get_configuration("overworld")
        self.toy_position = config["toy-position"]
        self.audio_path = self.get_resource("overworld", "audio-path")
        self.dot_position = config["dot-position"]

    def set_children(self):
        self.background = Background(self)
        self.toy = Toy(self)
        self.wall = Wall(self)
        self.dot = Dot(self)

    def respond(self, event):
        compare = self.delegate.compare
        if compare(event, "reset-game"):
            self.deactivate()
            self.reset()
        elif compare(event, "main-menu-selection", option="play"):
            self.activate()

    def deactivate(self):
        self.active = False

    def activate(self):
        self.active = True
        self.start_music()

    def start_music(self):
        self.get_audio().play_bgm(self.audio_path)

    def place_toy(self):
        rect = self.toy.rect
        rect.top = self.toy_position
        rect.centerx = self.display_surface.get_rect().centerx

    def reset(self):
        self.place_dot()

    def place_dot(self):
        rect = self.dot.rect
        rect.top = self.dot_position
        rect.centerx = self.display_surface.get_rect().centerx

    def update(self):
        if self.active:
            self.background.update()
            self.toy.update()
            self.wall.update()
            self.dot.update()
3.14.253.27
3.14.253.27
3.14.253.27
 
March 22, 2020

The chicken nugget business starter kit is now available online! Send me any amount of money through Venmo or PayPal, and I will mail you a package which will enable you to start a chicken nugget business of your own, play a video game any time you want, introduce a new character into your Animal Crossing village, and start collecting the chicken nugget trading cards.

The kit includes:

  • jellybean
  • instruction manual
  • limited edition trading card

By following the instructions you'll learn how to cook your own chicken or tofu nugget and be well on your way to financial success. I'm also throwing in one randomly selected card from the limited edition trading card set. Collect them, trade them, and if you get all eighteen and show me your set, I will give you an exclusive video game product.

All orders are processed within a day, so you can have your kit on your doorstep as quickly as possible. Don't sleep on this offer! Click the PayPal button or send a Venmo payment of any amount to @ohsqueezy, and in a matter of days you'll be counting money and playing video games.

PayPal me