Modül:Pgn
local BLACK = "black"
local WHITE = "white"
local PAWN = "P"
local ROOK = "R"
local KNIGHT = "N"
local BISHOP = "B"
local QUEEN = "Q"
local KING = "K"
local KINGSIDE = 7
local QUEENSIDE = 12
local DEFAULT_BOARD = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR'
local bit32 = bit32 or require('bit32')
--[[ following lines require when running locally - uncomment. mw = mw or { ustring = string, text = { ['split'] = local function(s, pattern) local res = {} while true do local start, finish = s:find(pattern) if finish and finish > 1 then local frag = s:sub(1, start - 1) table. insert(res, frag) s = s:sub(finish + 1) else break end end if #s then table.