buggnubg - Bugs: bug #19084, Nackgammon .mat files are NOT...

 
 

bug #19084: Nackgammon .mat files are NOT imported

Submitted by:  Serge Batalov <uncle_serge>
Submitted on:  Sun 18 Feb 2007 10:57:46 PM UTC  
Votes:  50  
 
Originator Name: uncle_sergeItem Group: Feature Request
Category: ImportRelease: 0.14.3-devel
Privacy: PublicOperating System: All
OS Type: NoneProcessor Type: None
Severity: 3 - NormalOpen/Closed: Closed
Assigned to: NonePriority: 5 - Normal
Status: Fixed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 06 Apr 2007 09:08:27 AM UTC, comment #5:

Fantastic!
Thank you very much. Your patch is much more thorough than my initial kludge.
Serge

Serge Batalov <uncle_serge>
Fri 23 Mar 2007 12:16:56 AM UTC, comment #4:

Auto import of nackgammon .mat files should now be possible in latest CVS.

Christian.

Christian Anthon <c_anthon>
Project Administrator
Thu 08 Mar 2007 08:21:36 PM UTC, comment #3:

Fine, I'll take care of this. Though I think issuing a warning before importing is at it's place.

Christian Anthon <c_anthon>
Project Administrator
Mon 19 Feb 2007 04:38:11 AM UTC, comment #2:

The patch is as simple as this:

      • import.c~ Thu Dec 14 22:20:05 2006

--- import.c Sun Feb 18 20:08:59 2007
***************

      • 818,824 ****

pmr->g.nPoints = 0;
pmr->g.fResigned = FALSE;
pmr->g.nAutoDoubles = 0;
! pmr->g.bgv = VARIATION_STANDARD; /* always standard backgammon */
pmr->g.fCubeUse = fCubeUse;
IniStatcontext( &pmr->g.sc );
AddMoveRecord( pmr );
--- 818,824 ----
pmr->g.nPoints = 0;
pmr->g.fResigned = FALSE;
pmr->g.nAutoDoubles = 0;
! pmr->g.bgv = bgvDefault; /* trust the user's setting of the variation */
pmr->g.fCubeUse = fCubeUse;
IniStatcontext( &pmr->g.sc );
AddMoveRecord( pmr );

I've tested it. Works fine. Before importing, the user should set variation to nackgammon. (In GUI - Setting::Options::Variations.)

Serge Batalov <uncle_serge>
Sun 18 Feb 2007 11:21:05 PM UTC, comment #1:

Actually, I volunteer to implement both variants 1. and/or 2.

I'll start with (1) and will try to CVS the changes. If I will be unable to CVS - I'll put the "diff -cw" style patch right here. I expect it to be ridiculously small.

Serge

Serge Batalov <uncle_serge>
Sun 18 Feb 2007 10:57:46 PM UTC, original submission:

Nackgammon .mat files usually do not have a line in the header, identifying them as Nackgammon matches. I couldn't locate a description for .mat file format. However, I played a Nack match within the program - then it is analyzeable. Once it is exported, again, a file si no different from a standard file - and cannot be reimported.

Setting "variation nackgammon" BEFORE importing doesn't help!

Suggestion: in the import module, after the first "illegal move" error - do one of the two:
1. Check if the program is set in "variation nackgammon", then continue importing the game as Nack.
2. (a kludge) Check if the move is actually legal if the game was Nack, then check if the rest of the match is legal as a Nack match - then set "variation nackgammon" and resume importing the game as Nack.

For your convinience, I will attach a nackgammon .mat file.

Serge Batalov <uncle_serge>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #12008:  gnu-Model_39077667.mat added by uncle_serge (7KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by c_anthon (Posted a comment)
  • -unavailable- added by uncle_serge (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 50 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Mar 2007 12:16:56 AM UTCc_anthonOpen/ClosedOpen=>Closed
      StatusNone=>Fixed
    Mon 19 Feb 2007 07:15:50 PM UTCuncle_sergeCarbon-Copy-=>Added uncle_serge
    Sun 18 Feb 2007 10:57:46 PM UTCuncle_sergeAttached File-=>Added gnu-Model_39077667.mat, #12008

    Back to the top


    Powered by Savane 3.1-cleanup1