We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4dd158 commit fe316b2Copy full SHA for fe316b2
sudoku-chb.py
@@ -146,7 +146,7 @@ def test_PuzzleGrid():
146
class Grid:
147
def __init__(self, w, h):
148
size = min(w,h)
149
- self.d = d = (size - 20) / 9
+ self.d = d = max( 2, (size - 20) / 9 )# make sure we don't get zero...
150
self.x0 = (w - (self.d * 9)) / 2
151
self.y0 = (h - (self.d * 9)) / 2
152
self.font_size = int(11 * d/16.0)
@@ -212,7 +212,7 @@ def Draw(self, dc):
212
# draw the background:
213
dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
214
dc.Clear()
215
- dc.SetBrush(wx.Brush(wx.Color(128,128,255)))
+ dc.SetBrush(wx.Brush(wx.Colour(128,128,255)))
216
dc.SetPen(wx.TRANSPARENT_PEN)
217
dc.DrawRectangle(x0, y0, d*9, d*9 )
218
0 commit comments