# # file: tic-tac-toe_begin.py # # The beginning of the tic-tac-toe program # # from graphics import * def main(): win = GraphWin("Tic-Tac-Toe game",320,240) win.setBackground('white') # set Background to white win.setCoords(0,0,3,3) # drawing horizontal lines Line(Point(0,1),Point(3,1)).draw(win) Line(Point(0,2),Point(3,2)).draw(win) # drawing vertical lines Line(Point(1,0),Point(1,3)).draw(win) Line(Point(2,0),Point(2,3)).draw(win) T = Text(Point(1.5,0.5),"Click anywhere to close the window") T.draw(win) c=win.getMouse() print("X={0:0f}, and Y={1:0f}".format(c.getX(),c.getY())) win.close() main()