connect four (game)

bartc bc at freeuk.com
Sun Nov 26 09:25:50 EST 2017


On 25/11/2017 23:49, Terry Reedy wrote:
> On 11/25/2017 4:57 PM, namenobodywants at gmail.com wrote:
>> On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote:
>>
>>> I did, and it looks buggy to me.  The top and left frame lines are
>>> missing.  If I click a square, the bottom square in the column lights
>>> up.  But then I have no idea whether those are your intentions or not.
>> i hadn't noticed about the frame lines, but it's the same for me; but 
>> i'm hoping you meant to write that the TOP square in a column flashes 
>> when you "drop a token" down that column;
> 
> All squares start white.  Only the bottom square turns red or black, 
> after perhaps a .3 second delay during which there is some jitter in 
> white squares above, which could be the effect of white flashing white.

There are a couple of lines that look like this:

             self.grid.squarebuttons[column].flash()

If you comment out those two lines, then the flashing disappears, and it 
still works.

Of course, if I'd used unit tests, I'd have figured that out a lot 
sooner. I would just have had the somewhat bigger problem of devising a 
unit test that would detect this.


-- 
bartc



More information about the Python-list mailing list