³ò ~ÂiFcs ddkTddkZdZeeƒZdZeeZdZeZ d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„ZeƒdS(sDraw an O in the given squareiÿÿÿÿ(t*Nii–ic s~xwtdtƒD]f}ttd|tƒtt|tƒƒitƒtt|tdƒt|ttƒƒitƒqWdS(Nii( tranget BOARDSIZEtitLinetPointtPPSt WINDOWSIZEtdrawtwin( RRRRRRRRR ((s TicTacToe2.pysdrawGrids0cs)tt|tdt|tdƒSdS(scoordinates of center of squareiN(RRtcoltrow(R R RR((s TicTacToe2.pys rectCenterscs!tt|tt|tƒSdS(s'coordinates of top left of inset X or ON(RRR tINSETR (R R RRR ((s TicTacToe2.pys rectUpperLeftscs)tt|dtt|dtƒSdS(s+coordinates of bottom right of inset X or OiN(RRR R R (R R RRR ((s TicTacToe2.pysrectLowerRightscs%tt|dtt|tƒSdS(s(coordinates of top right of inset X or OiN(RRR R R (R R RRR ((s TicTacToe2.pysrectUpperRight!scs%tt|tt|dtƒSdS(s*coordinates of bottom left of inset X or OiN(RRR R R (R R RRR ((s TicTacToe2.pys rectLowerLeft%sc sTtt||ƒt||ƒƒitƒtt||ƒt||ƒƒitƒdS(sDraw an X in the given squareN( Rt rectUpperLeftR R trectLowerRightRR t rectLowerLefttrectUpperRight( R R RR RRR RR((s TicTacToe2.pysdrawX+s(cs/tt||ƒtdtƒitƒddS(sDraw an O in the given squareiN(tCirclet rectCenterR R RR RR (R R RRRR RR ((s TicTacToe2.pysdrawO0scstdƒ}|djo&t|ƒattƒattantdttƒa t ƒt ddƒt ddƒt idƒt iƒdS(Ns&Enter board size (Press Enter for 3): tsTicTacToe version 2iiii(t raw_inputtuserSizetevalRRt BOARDRANGERRtGraphWinR tdrawGridtdrawXtdrawOttimetsleeptclose(RRRRRRRRRR RRRRRR((s TicTacToe2.pysmain4s       (tgraphicsRRRRRRR tNoneR RRR RRRRRtmain(RRRRRRRR R R RRR RRRRRR!((s TicTacToe2.pyss"