Generate Chess Board Diagram from an array of positions in Python?
问题 I have an array which corresponds to the positions of pieces on a chessboard, like so: ['em', 'bn', 'em', 'wr', 'em', 'wp', 'em', 'em'] ['br', 'em', 'bp', 'em', 'em', 'bn', 'wn', 'em'] ['em', 'em', 'bp', 'bp', 'bp', 'em', 'wp', 'bp'] ['bp', 'bp', 'em', 'bp', 'wn', 'em', 'wp', 'em'] .... The 'b' and 'w' signify black and white. n: knight r: rook p: pawn b: bishop k: king q: queen I want to know if there exists some utility which can take this array or something similar and generate a picture