gunyarakun / python-shogi

A pure Python shogi library with move generation and validation and handling of common formats.
GNU General Public License v3.0
179 stars 43 forks source link

add SVG.py #28

Closed yuiseki closed 3 years ago

yuiseki commented 3 years ago

Issue

Content

How To Check

Others

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-9.06%) to 74.202% when pulling a3ed5b24762c5c7a84ecb8a650ca616d3e51f619 on yuiseki:add-svg-renderer into 343eb42b4dfddc2748b6e87f6a4ff263c103d6f3 on gunyarakun:master.

gunyarakun commented 3 years ago

@yuiseki I generate a SVG file like following, but the image only contains a shogi board, not komas. I checked with Firefox and Adobe Illustrator. Could you check that?

board.svg
import shogi
board = shogi.Board()
print(board.svg())
DerAndereJohannes commented 3 years ago

I pulled yuiseki's branch and didn't have the same problem as you (pieces were loading! - not all though). I forked the project and managed to get it to work

Default Board (as in your example)

Default Board

SFEN ('4+R3l/1r1+P2gk1/3p1p1s1/2pg3pp/1p4p2/SP4PPP/2NP1PKS1/2G2+n3/8L w B2N2L3Pbgsp 10')

custom sfen

I can open a new pull request if you like to see!

gunyarakun commented 3 years ago

@DerAndereJohannes I wonder if you could make a new pull request, thank you!

yuiseki commented 3 years ago

Looks Nice! Sorry for my half-baked contribution

DerAndereJohannes commented 3 years ago

Looks Nice! Sorry for my half-baked contribution

I did not do much to your code! You set it up very nicely! 😁👍 You can check it out in the other pull request!

gunyarakun commented 3 years ago

Close this pull request because of #36 .