ž KยกS™ c@sปddlTddlZdaetƒadZetadZda dd„Z dd „Z d d „Z d d „Z dd„Zdd„Zdd„Zdd„Zdd„ZeƒdS(i(u*Nii–icCs~xwtdtƒD]f}ttd|tƒtt|tƒƒjtƒtt|tdƒt|ttƒƒjtƒqWdS(Nii(urangeu BOARDSIZEuLineuPointuPPSu WINDOWSIZEudrawuwin(ui((u.\TicTacToe2.pyudrawGrids0udrawGridcCs%tt|tdt|tdƒS(ucoordinates of center of squarei(uPointuPPS(urowucol((u.\TicTacToe2.pyu rectCentersu rectCentercCstt|tt|tƒS(u'coordinates of top left of inset X or O(uPointuPPSuINSET(urowucol((u.\TicTacToe2.pyu rectUpperLeftsu rectUpperLeftcCs%tt|dtt|dtƒS(u+coordinates of bottom right of inset X or Oi(uPointuPPSuINSET(urowucol((u.\TicTacToe2.pyurectLowerRightsurectLowerRightcCs!tt|dtt|tƒS(u(coordinates of top right of inset X or Oi(uPointuPPSuINSET(urowucol((u.\TicTacToe2.pyurectUpperRight!surectUpperRightcCs!tt|tt|dtƒS(u*coordinates of bottom left of inset X or Oi(uPointuPPSuINSET(urowucol((u.\TicTacToe2.pyu rectLowerLeft%su rectLowerLeftcCsTtt||ƒt||ƒƒjtƒtt||ƒt||ƒƒjtƒdS(uDraw an X in the given squareN(uLineu rectUpperLefturectLowerRightudrawuwinu rectLowerLefturectUpperRight(urowucol((u.\TicTacToe2.pyudrawX+s(udrawXcCs+tt||ƒtdtƒjtƒdS(uDraw an O in the given squareiN(uCircleu rectCenteruPPSuINSETudrawuwin(urowucol((u.\TicTacToe2.pyudrawO0sudrawOcCs‹tdƒ}|dkr=t|ƒattƒattantdttƒat ƒt ddƒt ddƒt j dƒtjƒdS(Nu&Enter board size (Press Enter for 3): uuTicTacToe version 2iiii(uinputuintu BOARDSIZEurangeu BOARDRANGEuPPSu WINDOWSIZEuGraphWinuwinudrawGridudrawXudrawOutimeusleepuclose(uuserSize((u.\TicTacToe2.pyumain4s        umain(u zellegraphicsutimeu BOARDSIZEurangeu BOARDRANGEuPPSu WINDOWSIZEuINSETuNoneuwinudrawGridu rectCenteru rectUpperLefturectLowerRighturectUpperRightu rectLowerLeftudrawXudrawOumain(((u.\TicTacToe2.pyus"