Skip to content

Instantly share code, notes, and snippets.

View matheusgomes28's full-sized avatar
🏠
Working from home

matheusgomes28

🏠
Working from home
View GitHub Profile
@matheusgomes28
matheusgomes28 / classes.py
Created July 18, 2013 00:13
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!
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)