Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Games-SGF-Go-Rotator CPAN distribution.

Report information
The Basics
Id: 63471
Status: open
Priority: 0/
Queue: Games-SGF-Go-Rotator

People
Owner: Nobody in particular
Requestors: degatcpan [...] ntlworld.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Only rotates moves correctly
Sgf such as AB[cb][db] will become AB[rc][db] - only the first co-ordinate is rotated. Also any markup whose property does not contain a B or a W will not be rotated (eg TR) Solution - grab everything between [ and ] and rotate it (unless its a comment), or some similar approach?
On Tue Nov 30 11:18:04 2010, DEG wrote: Show quoted text
> Sgf such as AB[cb][db] will become AB[rc][db] - only the first > co-ordinate is rotated. Also any markup whose property does not contain > a B or a W will not be rotated (eg TR) > > Solution - grab everything between [ and ] and rotate it (unless its a > comment), or some similar approach?
Replacing line 55 $text =~ s/([BW])\[([a-z])([a-z])\]/$1."["._rotate90($2, $3, size)."]"/eg; with $text =~ s/\[([a-z])([a-z])([\]:])/'['._rotate90($1, $2, $size).$3/eg; fixes the problem, but introduces the bug that things like C[oh] get rotated.
Thanks for the report and fix. I don't suppose that you have a sample SGF file handy that I could use in the tests? I'll get a new release out shortly.
Patch applied (but without tests, apart from for C[oh]) and uploaded to the CPAN as version 1.1
Subject: Re: [rt.cpan.org #63471] Only rotates moves correctly
Date: Fri, 10 Dec 2010 23:22:40 +0000
To: bug-Games-SGF-Go-Rotator [...] rt.cpan.org
From: deg <degatcpan [...] cpan.org>
attached are two sgf files, start90.sgf is what start.sgf should become after being rotated 90 degrees. The AB (and AE and AW) properties can be followed by any number of coordinate pairs eg AB[aa][bb][cc], not just two as I gave in my example. The label (LB) property is similar, of the form LB[aa:1][bb:2]... I don't think version 1.2 takes account of these things. dan On Wed, 2010-12-08 at 18:42 -0500, David Cantrell via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=63471 > > > Thanks for the report and fix. I don't suppose that you have a sample SGF file handy that I > could use in the tests? > > I'll get a new release out shortly.
Download start.sgf
application/x-go-sgf 1.1k

Message body not shown because it is not plain text.

Download start90.sgf
application/x-go-sgf 1.1k

Message body not shown because it is not plain text.