local pgnModule = require('Module:Pgn')local getArgs = require('Module:Arguments').getArgs
local p =
p.pgnToFen = function (frame) local args = getArgs(frame) local pgn = args.pgn metadata, moves = pgnModule.main(pgn) local halfmoves = tonumber(args.halfmoves) or #moves return moves[halfmoves]end
return p