Skip to content

Instantly share code, notes, and snippets.

Avatar

matheusgomes28

View GitHub Profile
@matheusgomes28
matheusgomes28 / classes.py
Created Jul 18, 2013
Simple Python game. This game was created to simulate some (not all) laws of physics and mathematics such as gravity, forces, vectors etc... Free to use and modify!
View classes.py
import pygame, sys
import pygame.gfxdraw
pygame.init()
class Obstacle(object):
""" The Obstacle class defines simple methods and properties of
obstacle objects such as rectangles and circles"""
def __init__(self, center, WIDTH, HEIGHT):
self.center = pygame.math.Vector2(center)