thomasoa / andrews-deal

Automatically exported from code.google.com/p/andrews-deal
Other
10 stars 6 forks source link

Smartstack is broken on OS X #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Run the example 3nt stacking code:

    ./deal -i ex/3nt-stack.tcl

Should list hand shapes of 3nt openers.

Instead it emits the error:

    Problem running smartstack: Hand stacking error
        while executing
    "deck_stack_hand $info(hand) $hand"

Original issue reported on code.google.com by thomasoa on 19 Feb 2010 at 5:20

GoogleCodeExporter commented 9 years ago
It's been broken since 3.1.1, at leaast.

Original comment by thomasoa on 19 Feb 2010 at 5:40

GoogleCodeExporter commented 9 years ago
Okay, this bug goes all the way back to Deal 3.0.8, before I had the code in 
Google
Code.  Will have to look deeply into this.

Original comment by thomasoa on 23 Feb 2010 at 6:34

GoogleCodeExporter commented 9 years ago
Works on Linux, so it might be an OS X issue.

Original comment by thomasoa on 23 Feb 2010 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by thomasoa on 23 Feb 2010 at 9:13

GoogleCodeExporter commented 9 years ago
Okay, I've narrowed it down to a problem in the random number generator in 
random.c,
which I copied from elsewhere.  It is now returning negative values, which it 
is not
supposed to do (and which it doesn't do on Linux.)

Original comment by thomasoa on 23 Feb 2010 at 11:19

GoogleCodeExporter commented 9 years ago
Fixed in deal.h and tcl_deal.c by redeclaring __random() to return long rather 
than
int type.

Original comment by thomasoa on 23 Feb 2010 at 11:56

GoogleCodeExporter commented 9 years ago

Original comment by thomasoa on 24 Feb 2010 at 4:12