def __init__(selfwincentersize)"""create view of diee gdie(mywinpoint( , ) creates die centered at ( , having sides of length ""first define some standard values self win win self background "whitecolor of die face self foreground "blackcolor of the pips self psize size radius of each pip hsize size half of size offset hsize distance from center to outer pips create square for the face cxcy center getx()center gety( point(cx-hsizecy-hsizep point(cx+hsizecy+hsizerect rectangle( , rect draw(winrect setfill(self backgroundcreate circles for standard pip locations self pips self __makepip(cx-offsetcy-offset)self __makepip(cx-offsetcy)self __makepip(cx-offsetcy+offset)self __makepip(cxcy)self __makepip(cx+offsetcy-offset)self __makepip(cx+offsetcy)self __makepip(cx+offsetcy+offsetcreate table for which pips are on for each value self ontable [][ ][ , ][ , , ][ , , , ][ , , , , ][ , , , , , self setvalue( def __makepip(selfxy)"""internal helper method to draw pip at ( , )""pip circle(point( , )self psizepip setfill(self background