This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
GGS/games/tic-tac-toe/point.py

12 lines
346 B
Python

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))