Fixed: An exception in the Go game if you mouse down on the board but then drag to the captured-pieces area and release the mouse.
authorJens Alfke <jens@mooseyard.com>
Wed Mar 12 15:51:32 2008 -0700 (2008-03-12)
changeset 6af9b2b929b03
parent 5 3ba1f29595c7
child 7 428a194e3e59
Fixed: An exception in the Go game if you mouse down on the board but then drag to the captured-pieces area and release the mouse.
Source/GoGame.m
     1.1 --- a/Source/GoGame.m	Wed Mar 12 15:49:36 2008 -0700
     1.2 +++ b/Source/GoGame.m	Wed Mar 12 15:51:32 2008 -0700
     1.3 @@ -106,6 +106,8 @@
     1.4  
     1.5  - (BOOL) canBit: (Bit*)bit moveFrom: (id<BitHolder>)srcHolder to: (id<BitHolder>)dstHolder
     1.6  {
     1.7 +    if( ! [dstHolder isKindOfClass: [Square class]] )
     1.8 +        return NO;
     1.9      Square *dst=(Square*)dstHolder;
    1.10      
    1.11      // There should be a check here for a "ko" (repeated position) ... exercise for the reader!