from random import random, randint

from PodSix.RDC import *

SCREENSIZE = (1024, 768)

class Square(RDCEntity):
	def __init__(self):
		self.width = 100
		self.height = 100
		self.left = random() * (SCREENSIZE[0] - self.width)
		self.top = random() * (SCREENSIZE[1] - self.height)
	
	# if we collide with someone
	def Collide(self, who):
		print self, "collided with", who
	
	def SetGroup(self, group, friends):
		print self, " is in group ", group
		print "friends:", friends
	
	# functions for returning bounding box sides
	def GetLeft(self):
		return self.left
	
	def GetRight(self):
		return self.left + self.width
	
	def GetTop(self):
		return self.top
	
	def GetBottom(self):
		return self.top + self.height

def TestRDC():
	squares = [Square() for s in range(15)]
	rdc = RDC(RDCEntity).DoRDC(squares)

TestRDC()

