定制 huehue/pgn-parser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

huehue/pgn-parser

最新稳定版本:0.7.0

Composer 安装命令:

composer require huehue/pgn-parser

包简介

Parse PGN files

README 文档

README

Test status Latest Stable Version Total Downloads License

A PHP library for parsing Portable Game Notation (PGN) files. This library is designed to extract chess game metadata and moves from PGN strings. It validates move syntax, including support for move annotations.

Features

  • PGN Parsing: Parses PGN formatted strings.
  • Tag Extraction: Extracts tag pairs (e.g., [Event "Chess Game"], [Site "Home"]).
  • Move Parsing: Parses chess moves, including SAN notation.
  • Move Validation: Validates move syntax, including:
    • Basic piece moves (e.g., Ne5, Ra1, Qf3)
    • Piece captures (e.g., Qxe7, Rxf5)
    • Pawn moves (e.g., e4, d5)
    • Pawn captures (e.g., exd5, bxa6)
    • Pawn promotions (e.g., e8=Q, d8=N+)
    • Castling (O-O, O-O-O)
    • Disambiguation (e.g., Rae1, Nfd2)
    • Move annotations/evaluation symbols (+, #, !, ?, !!, ??, !?, ?!)

Installation

The preferred method of installation is via Composer:

composer require huehue/pgn-parser

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-09