Added the boardgame tic-tac-toe without winning conditions, written entirely in Python.

This commit is contained in:
Kallfaktorn 2011-01-28 01:21:12 +01:00
parent 0590fa6ca1
commit affcb739b4
28 changed files with 448 additions and 0 deletions

View file

@ -0,0 +1,12 @@
from rectangle import Rectangle
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
def inside(self, rectangle):
return ((self.x >= rectangle.x)
and (self.x <= (rectangle.x + rectangle.width))
and (self.y >= rectangle.y)
and (self.y <= rectangle.y + rectangle.height))