pip setfill(self backgroundturn the appropriate pips back on for in self ontable[value]self pips[isetfill(self foregroundwe need to modify the dieview class by adding setcolor method this method will be used to change the color that is used for drawing the pips as you can see in the code for setvaluethe color of the pips is determined by the value of the instance variable foreground of coursechanging the value of foreground will not actually change the appearance of the die until it is redrawn using the new color the algorithm for setcolor seems straightforward we need two stepschange foreground to the new color redraw the current value of the die unfortunatelythe second step presents slight snag we already have code that draws valuenamely setvalue but setvalue requires us to send the value as parameterand the current version of dieview does not store this value anywhere once the proper pips have been turned onthe actual value is discarded in order to implement setcolorwe need to tweak setvalue so that it remembers the current value then setcolor can redraw the die using its current value the change to setvalue is easywe just need to add single line self value value this line stores the value parameter in an instance variable called value with the modified version of setvalueimplementing setcolor is breeze def setcolor(selfcolor)self foreground color self setvalue(self valuenotice how the last line simply calls setvalue to (re)draw the diepassing along the value that was saved from the last time setvalue was called creating the interface now that we have our widgets under controlwe are ready to actually implement our gui poker interface the constructor will create all of our widgetssetting up the interface for later interactions class graphicsinterfacedef __init__(self)self win graphwin("dice poker" self win setbackground("green "