I hereby claim:
- I am pathunstrom on github.
- I am pathunstrom (https://keybase.io/pathunstrom) on keybase.
- I have a public key whose fingerprint is 8FF9 3F4E C447 55EC 4658 BDCC A57E A7A4 86D2 644F
To claim this, I am signing this object:
import logging | |
import ppb.engine | |
from ppb.event import Quit, Tick | |
from ppb.components.models import GameObject | |
from ppb.components.controls import Publisher | |
import ppb.hw as hardware | |
hardware.choose("pygame") | |
logging.basicConfig(level=logging.INFO) |
I hereby claim:
To claim this, I am signing this object:
function convertToRoman(num) { | |
function addSymbols(carrier, val, symbol) { | |
var returnString = carrier[0]; | |
var startingValue = carrier[1]; | |
for ( ; startingValue >= val; startingValue -= val) { | |
returnString += symbol; | |
} | |
return [returnString, startingValue]; | |
} | |
def newEnemy(style): | |
spawn = random.randint(1, SPAWNRATE) | |
coin = random.randint(0, 10) | |
if style == "z" and spawn >= zomSpawn: | |
new_enemy = config.enemies["z"].copy() | |
new_enemy["sight"] = zomSight | |
elif style == "s" and spawn >= skelSpawn: | |
new_enemy = config.enemies["s"].copy() | |
new_enemy["sight"] = skelSight | |
else: |
def enemy_update(enemy, containers): | |
player = containers["player"] | |
enemies = containers["enemies"] | |
attacks = containers["attacks"] | |
if not enemy['awake']: | |
shuffle = random.randint(1, 10) | |
move_object(shuffle, enemy["rect"], enemy["speed"]) |
def fizzbuzz_generator(): | |
value = yield | |
while True: | |
rv = "" | |
if not value % 3: | |
rv += "Fizz" | |
if not value % 5: | |
rv += "Buzz" | |
value = yield rv or value |
class BaseGameObject(DirtySprite): | |
group = None | |
image_path = None | |
image = None | |
def __init__(self, scene, position=(0, 0)): | |
cls = self.__class__ | |
if cls.group is None: | |
cls.group = cls.__name__ | |
super().__init__(scene.groups[cls.group], scene.groups["render"]) |
"""Everything should be alphabetical in it's group.""" | |
# Group imports by where they come from | |
# Standard Lib | |
import os | |
# PyPI/third party | |
import requests | |
# Local |
import pygame | |
from itertools import cycle | |
import math | |
RESOLUTION = (800, 800) | |
BITS = 16 | |
MAX_SAMPLE = 2**(BITS - 1) - 1 | |
LEFT_FREQUENCY = 0 | |
RIGHT_FREQUENCY = 450 |
import pygame | |
from itertools import cycle | |
import math | |
RESOLUTION = (800, 800) | |
BITS = 16 | |
MAX_SAMPLE = 2**(BITS - 1) - 1 | |
LEFT_FREQUENCY = 0 | |
RIGHT_FREQUENCY = 262 |