chess 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/Rakefile +3 -4
- data/chess.gemspec +5 -0
- data/doc/Chess.html +112 -0
- data/doc/Chess/BadNotationError.html +107 -0
- data/doc/Chess/Board.html +703 -0
- data/doc/Chess/CGame.html +1005 -0
- data/doc/Chess/Game.html +684 -0
- data/doc/Chess/Gnuchess.html +215 -0
- data/doc/Chess/IllegalMoveError.html +105 -0
- data/doc/Chess/InvalidFenFormatError.html +105 -0
- data/doc/Chess/InvalidPgnFormatError.html +105 -0
- data/doc/Chess/Pgn.html +309 -0
- data/doc/Chess/UTF8Notation.html +174 -0
- data/doc/README_rdoc.html +143 -0
- data/doc/created.rid +15 -15
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +159 -12
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +1 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +331 -0
- data/ext/chess.c +5 -2
- data/ext/game.c +1 -1
- data/ext/game.h +1 -1
- data/lib/chess/game.rb +1 -1
- data/lib/chess/pgn.rb +5 -1
- data/lib/chess/version.rb +1 -1
- metadata +112 -46
- data/doc/apple-touch-icon.png +0 -0
- data/doc/classes/Chess.html +0 -162
- data/doc/classes/Chess/BadNotationError.html +0 -84
- data/doc/classes/Chess/Board.html +0 -795
- data/doc/classes/Chess/CGame.html +0 -1168
- data/doc/classes/Chess/Game.html +0 -775
- data/doc/classes/Chess/Gnuchess.html +0 -206
- data/doc/classes/Chess/IllegalMoveError.html +0 -82
- data/doc/classes/Chess/InvalidFenFormatError.html +0 -82
- data/doc/classes/Chess/InvalidPgnFormatError.html +0 -82
- data/doc/classes/Chess/Pgn.html +0 -332
- data/doc/classes/Chess/UTF8Notation.html +0 -175
- data/doc/css/github.css +0 -123
- data/doc/css/main.css +0 -323
- data/doc/css/panel.css +0 -384
- data/doc/css/reset.css +0 -48
- data/doc/favicon.ico +0 -0
- data/doc/files/README_rdoc.html +0 -122
- data/doc/files/ext/bitboard_c.html +0 -68
- data/doc/files/ext/board_c.html +0 -68
- data/doc/files/ext/chess_c.html +0 -68
- data/doc/files/ext/common_c.html +0 -68
- data/doc/files/ext/game_c.html +0 -68
- data/doc/files/ext/special_c.html +0 -68
- data/doc/files/lib/chess/exceptions_rb.html +0 -94
- data/doc/files/lib/chess/game_rb.html +0 -84
- data/doc/files/lib/chess/gnuchess_rb.html +0 -84
- data/doc/files/lib/chess/pgn_rb.html +0 -84
- data/doc/files/lib/chess/utf8_notation_rb.html +0 -84
- data/doc/files/lib/chess/version_rb.html +0 -85
- data/doc/files/lib/chess_rb.html +0 -84
- data/doc/i/arrows.png +0 -0
- data/doc/i/results_bg.png +0 -0
- data/doc/i/tree_bg.png +0 -0
- data/doc/js/highlight.pack.js +0 -1
- data/doc/js/jquery-1.3.2.min.js +0 -19
- data/doc/js/jquery-effect.js +0 -593
- data/doc/js/main.js +0 -24
- data/doc/js/searchdoc.js +0 -449
- data/doc/panel/index.html +0 -73
- data/doc/panel/links.html +0 -34
- data/doc/panel/tree.js +0 -1
data/doc/js/search_index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var search_data = {"index":{"searchIndex":["chess","badnotationerror","board","cgame","game","gnuchess","illegalmoveerror","invalidfenformaterror","invalidpgnformaterror","pgn","utf8notation","<<()","[]()","[]()","active_color()","active_player()","board()","check?()","checkmate?()","coord_moves()","current()","draw()","each()","fifty_rule_move?()","full_moves()","fullmove_number()","gnuchess_move()","gnuchess_move!()","halfmove_clock()","inactive_player()","insufficient_material?()","load()","load_fen()","load_pgn()","move()","move()","move2()","move3()","move=()","moves()","moves=()","new()","new()","over?()","pgn()","placement()","resign()","result()","rollback!()","set_fen!()","size()","stalemate?()","status()","threefold_repetition?()","to_fen()","to_s()","to_s()","to_s()","to_utf8()","write()","readme"],"longSearchIndex":["chess","chess::badnotationerror","chess::board","chess::cgame","chess::game","chess::gnuchess","chess::illegalmoveerror","chess::invalidfenformaterror","chess::invalidpgnformaterror","chess::pgn","chess::utf8notation","chess::game#<<()","chess::board#[]()","chess::cgame#[]()","chess::board#active_color()","chess::game#active_player()","chess::cgame#board()","chess::board#check?()","chess::board#checkmate?()","chess::cgame#coord_moves()","chess::cgame#current()","chess::cgame#draw()","chess::cgame#each()","chess::board#fifty_rule_move?()","chess::cgame#full_moves()","chess::board#fullmove_number()","chess::gnuchess#gnuchess_move()","chess::gnuchess#gnuchess_move!()","chess::board#halfmove_clock()","chess::game#inactive_player()","chess::board#insufficient_material?()","chess::pgn#load()","chess::game::load_fen()","chess::game::load_pgn()","chess::cgame#move()","chess::game#move()","chess::cgame#move2()","chess::cgame#move3()","chess::game#move=()","chess::cgame#moves()","chess::game#moves=()","chess::game::new()","chess::pgn::new()","chess::game#over?()","chess::game#pgn()","chess::board#placement()","chess::cgame#resign()","chess::cgame#result()","chess::cgame#rollback!()","chess::cgame#set_fen!()","chess::cgame#size()","chess::board#stalemate?()","chess::game#status()","chess::cgame#threefold_repetition?()","chess::board#to_fen()","chess::board#to_s()","chess::cgame#to_s()","chess::pgn#to_s()","chess::utf8notation#to_utf8()","chess::pgn#write()",""],"info":[["Chess","","classes/Chess.html","","<p>The Chess library module.\n"],["Chess::BadNotationError","","classes/Chess/BadNotationError.html","","<p>This exception will be raised when an invalid short algebraic chess\nnotation string is passed to the …\n"],["Chess::Board","","classes/Chess/Board.html","","<p>This class rappresents a chess board. The rappresentation of the board use\n<em>bitboards</em> where each bit represents …\n"],["Chess::CGame","","classes/Chess/CGame.html","","<p>This class rappresents a collection of boards of a single chess game.\n"],["Chess::Game","","classes/Chess/Game.html","","<p>This class rappresents a chess game.\n"],["Chess::Gnuchess","","classes/Chess/Gnuchess.html","","<p>Use Gnuchess to I.A. <em>(Only a draft)</em> To use this module, extend a\ngame object with Chess::Gnuchess. Gnuchess …\n"],["Chess::IllegalMoveError","","classes/Chess/IllegalMoveError.html","","<p>This exception will be raised when making an illegal move.\n"],["Chess::InvalidFenFormatError","","classes/Chess/InvalidFenFormatError.html","","<p>This exception will be raised when an invalid FEN string is used.\n"],["Chess::InvalidPgnFormatError","","classes/Chess/InvalidPgnFormatError.html","","<p>This exception will be raised when a malformed PGN file is loaded.\n"],["Chess::Pgn","","classes/Chess/Pgn.html","","<p>Rappresents a game in PGN (Portable Game Notation) format.\n"],["Chess::UTF8Notation","","classes/Chess/UTF8Notation.html","","<p>With this module is possible call the method <code>to_utf8</code> on a\nstring. This method convert the chess piece …\n"],["<<","Chess::Game","classes/Chess/Game.html#method-i-3C-3C","(m)",""],["[]","Chess::Board","classes/Chess/Board.html#method-i-5B-5D","(p1)","<p>Returns the piece on the <code>square</code> of the chessboard. If there is\nno piece or the square is not valid return …\n"],["[]","Chess::CGame","classes/Chess/CGame.html#method-i-5B-5D","(p1)","<p>Returns the <code>n</code>-th Board of the Game or <code>nil</code> if the\n<code>n</code>-th Board does not exist.\n"],["active_color","Chess::Board","classes/Chess/Board.html#method-i-active_color","()","<p>Returns the active color: <code>false</code> means white turn,\n<code>true</code> means black turn.\n"],["active_player","Chess::Game","classes/Chess/Game.html#method-i-active_player","()","<p>Returns <code>:white</code> if the active player is the white player,\n<code>:black</code> otherwise.\n"],["board","Chess::CGame","classes/Chess/CGame.html#method-i-board","()",""],["check?","Chess::Board","classes/Chess/Board.html#method-i-check-3F","()","<p>Returns <code>true</code> if the king of the color that has the turn is in\ncheck, <code>false</code> otherwise.\n"],["checkmate?","Chess::Board","classes/Chess/Board.html#method-i-checkmate-3F","()","<p>Returns <code>true</code> if the king of the color that has the turn is in\ncheckmate, <code>false</code> otherwise.\n"],["coord_moves","Chess::CGame","classes/Chess/CGame.html#method-i-coord_moves","()","<p>Returns the array with all moves done in coordinate chess notation <em>(es:\nb1c3)</em>.\n"],["current","Chess::CGame","classes/Chess/CGame.html#method-i-current","()","<p>Returns the current Board of the Game (the current chess position of the\ngame).\n"],["draw","Chess::CGame","classes/Chess/CGame.html#method-i-draw","()","<p>The game result is set to draw.\n"],["each","Chess::CGame","classes/Chess/CGame.html#method-i-each","()","<p>Calls <code>block</code> once for each <code>board</code> in self, passing\nthat <code>board</code>, <code>move</code>, <code>full_move</code> and\n<code>index</code> as parameters. …\n"],["fifty_rule_move?","Chess::Board","classes/Chess/Board.html#method-i-fifty_rule_move-3F","()","<p>Returns <code>true</code> if a player can claim draw by the fifty-move\nrule, <code>false</code> otherwise.\n"],["full_moves","Chess::CGame","classes/Chess/CGame.html#method-i-full_moves","()",""],["fullmove_number","Chess::Board","classes/Chess/Board.html#method-i-fullmove_number","()","<p>Returns the fullmove number: the number of the full move. It starts at 1,\nand is incremented after black's …\n"],["gnuchess_move","Chess::Gnuchess","classes/Chess/Gnuchess.html#method-i-gnuchess_move","()","<p>Return the next move calculated by Gnuchess. Gnuchess must be installed!\n"],["gnuchess_move!","Chess::Gnuchess","classes/Chess/Gnuchess.html#method-i-gnuchess_move-21","()","<p>Make a move using Gnuchess engine. This add a new Board in the Game. Return\nthe next move calculated …\n"],["halfmove_clock","Chess::Board","classes/Chess/Board.html#method-i-halfmove_clock","()","<p>Returns the halfmove clock that is the number of halfmoves since the last\npawn advance or capture. This …\n"],["inactive_player","Chess::Game","classes/Chess/Game.html#method-i-inactive_player","()","<p>Returns <code>:white</code> if the inactive player is the white player,\n<code>:black</code> otherwise.\n"],["insufficient_material?","Chess::Board","classes/Chess/Board.html#method-i-insufficient_material-3F","()","<p>Returns <code>true</code> if the board has insufficient material to\ncheckmate, <code>false</code> otherwise.\n"],["load","Chess::Pgn","classes/Chess/Pgn.html#method-i-load","(filename)","<p>Load a PGN from file.\n"],["load_fen","Chess::Game","classes/Chess/Game.html#method-c-load_fen","(fen)","<p>Creates a new game from a FEN string.\n<p>May be raise an InvalidFenFormatError.\n<p><strong>Warning</strong>: this game do not …\n"],["load_pgn","Chess::Game","classes/Chess/Game.html#method-c-load_pgn","(file)","<p>Creates a new game from a file in PGN format.\n<p>May be raise an InvalidPgnFormatError or IllegalMoveError …\n"],["move","Chess::CGame","classes/Chess/CGame.html#method-i-move","(p1, p2, p3, p4)","<p>Make a move. This add a new Board in the Game.\n<p>Parameters are:\n<p><code>piece</code> — the character of the moving piece …\n"],["move","Chess::Game","classes/Chess/Game.html#method-i-move","(m)","<p>Make a move. This add a new Board in the Storyboard.\n<p>Parameters are:\n<p><code>m</code> — represents the short algebraic chess …\n"],["move2","Chess::CGame","classes/Chess/CGame.html#method-i-move2","(p1, p2, p3)","<p>Make a move. This add a new Board in the Game.\n<p>Parameters are:\n<p><code>from</code> — the 2 character string representing …\n"],["move3","Chess::CGame","classes/Chess/CGame.html#method-i-move3","(p1, p2, p3)","<p>Make a move. This add a new Board in the Game.\n<p>Each square on the chessboard is represented by an integer …\n"],["move=","Chess::Game","classes/Chess/Game.html#method-i-move-3D","(m)",""],["moves","Chess::CGame","classes/Chess/CGame.html#method-i-moves","()","<p>Returns the array with all moves done <em>(es: Nc3)</em>.\n"],["moves=","Chess::Game","classes/Chess/Game.html#method-i-moves-3D","(moves)","<p>Make the array of moves.\n"],["new","Chess::Game","classes/Chess/Game.html#method-c-new","(moves = [])","<p>Create a new game. If an array of moves is provided, the moves will be\nperformed.\n<p>May be raise an IllegalMoveError …\n"],["new","Chess::Pgn","classes/Chess/Pgn.html#method-c-new","(filename = nil)","<p>Creates a new PGN. If param <code>filename</code>, load it from file.\n"],["over?","Chess::Game","classes/Chess/Game.html#method-i-over-3F","()","<p>Returns <code>true</code> if the game is over\n"],["pgn","Chess::Game","classes/Chess/Game.html#method-i-pgn","()","<p>Returns the PGN rappresenting the game.\n"],["placement","Chess::Board","classes/Chess/Board.html#method-i-placement","()","<p>Calls <code>block</code> once for each square in the board, passing the\n<code>piece</code> in the square and the <code>index</code> as parameters.\n…\n"],["resign","Chess::CGame","classes/Chess/CGame.html#method-i-resign","(p1)","<p>The game result is set to '1-0' if <code>color</code> is “black”,\notherwise is set to '0-1' …\n"],["result","Chess::CGame","classes/Chess/CGame.html#method-i-result","()","<p>Returns the result of the game:\n<p>* — game in progress;\n<p>1-0 — white won;\n"],["rollback!","Chess::CGame","classes/Chess/CGame.html#method-i-rollback-21","()","<p>Rollback last move.\n"],["set_fen!","Chess::CGame","classes/Chess/CGame.html#method-i-set_fen-21","(p1)","<p>Set the game position with a FEN string.\n<p>Parameters are:\n<p><code>fen</code> — the FEN (Forsyth–Edwards Notation) string …\n"],["size","Chess::CGame","classes/Chess/CGame.html#method-i-size","()","<p>Returns the number of moves done.\n"],["stalemate?","Chess::Board","classes/Chess/Board.html#method-i-stalemate-3F","()","<p>Returns <code>true</code> if the pieces of the color that has the turn are\nin stalemate, <code>false</code> otherwise.\n"],["status","Chess::Game","classes/Chess/Game.html#method-i-status","()","<p>Returns the status of the game.\n<p>Possible states are:\n<p><p><code>in_progress</code> — the game is in progress.\n"],["threefold_repetition?","Chess::CGame","classes/Chess/CGame.html#method-i-threefold_repetition-3F","()","<p>Returns <code>true</code> if a player can claim draw by the threefold\nrepetition rule, <code>false</code> otherwise.\n"],["to_fen","Chess::Board","classes/Chess/Board.html#method-i-to_fen","()","<p>Return the FEN string of the board.\n"],["to_s","Chess::Board","classes/Chess/Board.html#method-i-to_s","()","<p>Board to string.\n"],["to_s","Chess::CGame","classes/Chess/CGame.html#method-i-to_s","()","<p>Current board to string.\n"],["to_s","Chess::Pgn","classes/Chess/Pgn.html#method-i-to_s","()","<p>PGN to string.\n"],["to_utf8","Chess::UTF8Notation","classes/Chess/UTF8Notation.html#method-i-to_utf8","()","<p>Replace the piece identifier characters with UTF8 chess characters\n"],["write","Chess::Pgn","classes/Chess/Pgn.html#method-i-write","(filename)","<p>Write PGN to file.\n"],["README","","files/README_rdoc.html","","<p>Chess\n<p>A fast Ruby library to play chess with Ruby. This library is quite fast\nbecause rappresent the game …\n"]]}}
|
1
|
+
var search_data = {"index":{"searchIndex":["chess","badnotationerror","board","cgame","game","gnuchess","illegalmoveerror","invalidfenformaterror","invalidpgnformaterror","pgn","utf8notation","<<()","[]()","[]()","active_color()","active_player()","board()","check?()","checkmate?()","coord_moves()","current()","draw()","each()","fifty_rule_move?()","fullmove_number()","gnuchess_move()","gnuchess_move!()","halfmove_clock()","inactive_player()","insufficient_material?()","load()","load_fen()","load_pgn()","move()","move()","move2()","move3()","move=()","moves()","moves=()","new()","new()","over?()","pgn()","placement()","resign()","result()","rollback!()","set_fen!()","size()","stalemate?()","status()","threefold_repetition?()","to_fen()","to_s()","to_s()","to_s()","to_utf8()","write()","readme"],"longSearchIndex":["chess","chess::badnotationerror","chess::board","chess::cgame","chess::game","chess::gnuchess","chess::illegalmoveerror","chess::invalidfenformaterror","chess::invalidpgnformaterror","chess::pgn","chess::utf8notation","chess::game#<<()","chess::board#[]()","chess::cgame#[]()","chess::board#active_color()","chess::game#active_player()","chess::cgame#board()","chess::board#check?()","chess::board#checkmate?()","chess::cgame#coord_moves()","chess::cgame#current()","chess::cgame#draw()","chess::cgame#each()","chess::board#fifty_rule_move?()","chess::board#fullmove_number()","chess::gnuchess#gnuchess_move()","chess::gnuchess#gnuchess_move!()","chess::board#halfmove_clock()","chess::game#inactive_player()","chess::board#insufficient_material?()","chess::pgn#load()","chess::game::load_fen()","chess::game::load_pgn()","chess::cgame#move()","chess::game#move()","chess::cgame#move2()","chess::cgame#move3()","chess::game#move=()","chess::cgame#moves()","chess::game#moves=()","chess::game::new()","chess::pgn::new()","chess::game#over?()","chess::game#pgn()","chess::board#placement()","chess::cgame#resign()","chess::cgame#result()","chess::cgame#rollback!()","chess::cgame#set_fen!()","chess::cgame#size()","chess::board#stalemate?()","chess::game#status()","chess::cgame#threefold_repetition?()","chess::board#to_fen()","chess::board#to_s()","chess::cgame#to_s()","chess::pgn#to_s()","chess::utf8notation#to_utf8()","chess::pgn#write()",""],"info":[["Chess","","Chess.html","","<p>The Chess library module.\n"],["Chess::BadNotationError","","Chess/BadNotationError.html","","<p>This exception will be raised when an invalid short algebraic chess\nnotation string is passed to the …\n"],["Chess::Board","","Chess/Board.html","","<p>This class rappresents a chess board. The rappresentation of the board use\n<em>bitboards</em> where each bit represents …\n"],["Chess::CGame","","Chess/CGame.html","","<p>This class rappresents a collection of boards of a single chess game.\n"],["Chess::Game","","Chess/Game.html","","<p>This class rappresents a chess game.\n"],["Chess::Gnuchess","","Chess/Gnuchess.html","","<p>Use Gnuchess to I.A. <em>(Only a draft)</em> To use this module, extend a\ngame object with Chess::Gnuchess. Gnuchess …\n"],["Chess::IllegalMoveError","","Chess/IllegalMoveError.html","","<p>This exception will be raised when making an illegal move.\n"],["Chess::InvalidFenFormatError","","Chess/InvalidFenFormatError.html","","<p>This exception will be raised when an invalid FEN string is used.\n"],["Chess::InvalidPgnFormatError","","Chess/InvalidPgnFormatError.html","","<p>This exception will be raised when a malformed PGN file is loaded.\n"],["Chess::Pgn","","Chess/Pgn.html","","<p>Rappresents a game in PGN (Portable Game Notation) format.\n"],["Chess::UTF8Notation","","Chess/UTF8Notation.html","","<p>With this module is possible call the method <code>to_utf8</code> on a\nstring. This method convert the chess piece …\n"],["<<","Chess::Game","Chess/Game.html#method-i-3C-3C","(m)",""],["[]","Chess::Board","Chess/Board.html#method-i-5B-5D","(p1)","<p>Returns the piece on the <code>square</code> of the chessboard. If there is\nno piece or the square is not valid return …\n"],["[]","Chess::CGame","Chess/CGame.html#method-i-5B-5D","(p1)","<p>Returns the <code>n</code>-th Board of the Game or <code>nil</code> if the\n<code>n</code>-th Board does not exist.\n"],["active_color","Chess::Board","Chess/Board.html#method-i-active_color","()","<p>Returns the active color: <code>false</code> means white turn,\n<code>true</code> means black turn.\n"],["active_player","Chess::Game","Chess/Game.html#method-i-active_player","()","<p>Returns <code>:white</code> if the active player is the white player,\n<code>:black</code> otherwise.\n"],["board","Chess::CGame","Chess/CGame.html#method-i-board","()",""],["check?","Chess::Board","Chess/Board.html#method-i-check-3F","()","<p>Returns <code>true</code> if the king of the color that has the turn is in\ncheck, <code>false</code> otherwise.\n"],["checkmate?","Chess::Board","Chess/Board.html#method-i-checkmate-3F","()","<p>Returns <code>true</code> if the king of the color that has the turn is in\ncheckmate, <code>false</code> otherwise.\n"],["coord_moves","Chess::CGame","Chess/CGame.html#method-i-coord_moves","()","<p>Returns the array with all moves done in coordinate chess notation <em>(es:\nb1c3)</em>.\n"],["current","Chess::CGame","Chess/CGame.html#method-i-current","()","<p>Returns the current Board of the Game (the current chess position of the\ngame).\n"],["draw","Chess::CGame","Chess/CGame.html#method-i-draw","()","<p>The game result is set to draw.\n"],["each","Chess::CGame","Chess/CGame.html#method-i-each","()","<p>Calls <code>block</code> once for each <code>board</code> in self, passing\nthat <code>board</code>, <code>move</code>, <code>coord_move</code> and\n<code>index</code> as parameters. …\n"],["fifty_rule_move?","Chess::Board","Chess/Board.html#method-i-fifty_rule_move-3F","()","<p>Returns <code>true</code> if a player can claim draw by the fifty-move\nrule, <code>false</code> otherwise.\n"],["fullmove_number","Chess::Board","Chess/Board.html#method-i-fullmove_number","()","<p>Returns the fullmove number: the number of the full move. It starts at 1,\nand is incremented after black's …\n"],["gnuchess_move","Chess::Gnuchess","Chess/Gnuchess.html#method-i-gnuchess_move","()","<p>Return the next move calculated by Gnuchess. Gnuchess must be installed!\n"],["gnuchess_move!","Chess::Gnuchess","Chess/Gnuchess.html#method-i-gnuchess_move-21","()","<p>Make a move using Gnuchess engine. This add a new Board in the Game. Return\nthe next move calculated …\n"],["halfmove_clock","Chess::Board","Chess/Board.html#method-i-halfmove_clock","()","<p>Returns the halfmove clock that is the number of halfmoves since the last\npawn advance or capture. This …\n"],["inactive_player","Chess::Game","Chess/Game.html#method-i-inactive_player","()","<p>Returns <code>:white</code> if the inactive player is the white player,\n<code>:black</code> otherwise.\n"],["insufficient_material?","Chess::Board","Chess/Board.html#method-i-insufficient_material-3F","()","<p>Returns <code>true</code> if the board has insufficient material to\ncheckmate, <code>false</code> otherwise.\n"],["load","Chess::Pgn","Chess/Pgn.html#method-i-load","(filename)","<p>Load a PGN from file.\n"],["load_fen","Chess::Game","Chess/Game.html#method-c-load_fen","(fen)","<p>Creates a new game from a FEN string.\n<p>May be raise an InvalidFenFormatError.\n<p><strong>Warning</strong>: this game do not …\n"],["load_pgn","Chess::Game","Chess/Game.html#method-c-load_pgn","(file)","<p>Creates a new game from a file in PGN format.\n<p>May be raise an InvalidPgnFormatError or IllegalMoveError …\n"],["move","Chess::CGame","Chess/CGame.html#method-i-move","(p1, p2, p3, p4)","<p>Make a move. This add a new Board in the Game.\n<p>Parameters are:\n<p>piece — the character of the moving piece …\n"],["move","Chess::Game","Chess/Game.html#method-i-move","(m)","<p>Make a move. This add a new Board in the Storyboard.\n<p>Parameters are:\n<p>m — represents the short algebraic chess …\n"],["move2","Chess::CGame","Chess/CGame.html#method-i-move2","(p1, p2, p3)","<p>Make a move. This add a new Board in the Game.\n<p>Parameters are:\n<p>from — the 2 character string representing …\n"],["move3","Chess::CGame","Chess/CGame.html#method-i-move3","(p1, p2, p3)","<p>Make a move. This add a new Board in the Game.\n<p>Each square on the chessboard is represented by an integer …\n"],["move=","Chess::Game","Chess/Game.html#method-i-move-3D","(m)",""],["moves","Chess::CGame","Chess/CGame.html#method-i-moves","()","<p>Returns the array with all moves done <em>(es: Nc3)</em>.\n"],["moves=","Chess::Game","Chess/Game.html#method-i-moves-3D","(moves)","<p>Make the array of moves.\n"],["new","Chess::Game","Chess/Game.html#method-c-new","(moves = [])","<p>Create a new game. If an array of moves is provided, the moves will be\nperformed.\n<p>May be raise an IllegalMoveError …\n"],["new","Chess::Pgn","Chess/Pgn.html#method-c-new","(filename = nil)","<p>Creates a new PGN. If param <code>filename</code>, load it from file.\n"],["over?","Chess::Game","Chess/Game.html#method-i-over-3F","()","<p>Returns <code>true</code> if the game is over\n"],["pgn","Chess::Game","Chess/Game.html#method-i-pgn","()","<p>Returns the PGN rappresenting the game.\n"],["placement","Chess::Board","Chess/Board.html#method-i-placement","()","<p>Calls <code>block</code> once for each square in the board, passing the\n<code>piece</code> in the square and the <code>index</code> as parameters.\n…\n"],["resign","Chess::CGame","Chess/CGame.html#method-i-resign","(p1)","<p>The game result is set to '1-0' if <code>color</code> is “black”,\notherwise is set to '0-1' …\n"],["result","Chess::CGame","Chess/CGame.html#method-i-result","()","<p>Returns the result of the game:\n<p>* — game in progress;\n<p>1-0 — white won;\n"],["rollback!","Chess::CGame","Chess/CGame.html#method-i-rollback-21","()","<p>Rollback last move.\n"],["set_fen!","Chess::CGame","Chess/CGame.html#method-i-set_fen-21","(p1)","<p>Set the game position with a FEN string.\n<p>Parameters are:\n<p>fen — the FEN (Forsyth–Edwards Notation) string …\n"],["size","Chess::CGame","Chess/CGame.html#method-i-size","()","<p>Returns the number of moves done.\n"],["stalemate?","Chess::Board","Chess/Board.html#method-i-stalemate-3F","()","<p>Returns <code>true</code> if the pieces of the color that has the turn are\nin stalemate, <code>false</code> otherwise.\n"],["status","Chess::Game","Chess/Game.html#method-i-status","()","<p>Returns the status of the game.\n<p>Possible states are:\n<p><p>in_progress — the game is in progress.\n"],["threefold_repetition?","Chess::CGame","Chess/CGame.html#method-i-threefold_repetition-3F","()","<p>Returns <code>true</code> if a player can claim draw by the threefold\nrepetition rule, <code>false</code> otherwise.\n"],["to_fen","Chess::Board","Chess/Board.html#method-i-to_fen","()","<p>Return the FEN string of the board.\n"],["to_s","Chess::Board","Chess/Board.html#method-i-to_s","()","<p>Board to string.\n"],["to_s","Chess::CGame","Chess/CGame.html#method-i-to_s","()","<p>Current board to string.\n"],["to_s","Chess::Pgn","Chess/Pgn.html#method-i-to_s","()","<p>PGN to string.\n"],["to_utf8","Chess::UTF8Notation","Chess/UTF8Notation.html#method-i-to_utf8","()","<p>Replace the piece identifier characters with UTF8 chess characters\n"],["write","Chess::Pgn","Chess/Pgn.html#method-i-write","(filename)","<p>Write PGN to file.\n"],["README","","README_rdoc.html","","<p>Chess\n<p>A fast Ruby library to play chess with Ruby. This library is quite fast\nbecause rappresent the game …\n"]]}}
|
Binary file
|
data/doc/js/searcher.js
CHANGED
Binary file
|
@@ -0,0 +1,331 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Table of Contents - Chess</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/jquery.js"></script>
|
15
|
+
<script src="./js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" class="table-of-contents">
|
23
|
+
<main role="main">
|
24
|
+
<h1 class="class">Table of Contents - Chess</h1>
|
25
|
+
|
26
|
+
<h2 id="pages">Pages</h2>
|
27
|
+
<ul>
|
28
|
+
<li class="file">
|
29
|
+
<a href="README_rdoc.html">README</a>
|
30
|
+
|
31
|
+
<ul>
|
32
|
+
<li><a href="README_rdoc.html#label-Chess">Chess</a>
|
33
|
+
<li><a href="README_rdoc.html#label-Requirements">Requirements</a>
|
34
|
+
<li><a href="README_rdoc.html#label-Installation">Installation</a>
|
35
|
+
<li><a href="README_rdoc.html#label-Usage">Usage</a>
|
36
|
+
<li><a href="README_rdoc.html#label-Questions+or+problems-3F">Questions or problems?</a>
|
37
|
+
<li><a href="README_rdoc.html#label-Copyright">Copyright</a>
|
38
|
+
</ul>
|
39
|
+
</li>
|
40
|
+
|
41
|
+
</ul>
|
42
|
+
|
43
|
+
<h2 id="classes">Classes and Modules</h2>
|
44
|
+
<ul>
|
45
|
+
<li class="module">
|
46
|
+
<a href="Chess.html">Chess</a>
|
47
|
+
</li>
|
48
|
+
<li class="class">
|
49
|
+
<a href="Chess/BadNotationError.html">Chess::BadNotationError</a>
|
50
|
+
</li>
|
51
|
+
<li class="class">
|
52
|
+
<a href="Chess/Board.html">Chess::Board</a>
|
53
|
+
</li>
|
54
|
+
<li class="class">
|
55
|
+
<a href="Chess/CGame.html">Chess::CGame</a>
|
56
|
+
</li>
|
57
|
+
<li class="class">
|
58
|
+
<a href="Chess/Game.html">Chess::Game</a>
|
59
|
+
</li>
|
60
|
+
<li class="module">
|
61
|
+
<a href="Chess/Gnuchess.html">Chess::Gnuchess</a>
|
62
|
+
</li>
|
63
|
+
<li class="class">
|
64
|
+
<a href="Chess/IllegalMoveError.html">Chess::IllegalMoveError</a>
|
65
|
+
</li>
|
66
|
+
<li class="class">
|
67
|
+
<a href="Chess/InvalidFenFormatError.html">Chess::InvalidFenFormatError</a>
|
68
|
+
</li>
|
69
|
+
<li class="class">
|
70
|
+
<a href="Chess/InvalidPgnFormatError.html">Chess::InvalidPgnFormatError</a>
|
71
|
+
</li>
|
72
|
+
<li class="class">
|
73
|
+
<a href="Chess/Pgn.html">Chess::Pgn</a>
|
74
|
+
</li>
|
75
|
+
<li class="module">
|
76
|
+
<a href="Chess/UTF8Notation.html">Chess::UTF8Notation</a>
|
77
|
+
</li>
|
78
|
+
</ul>
|
79
|
+
|
80
|
+
<h2 id="methods">Methods</h2>
|
81
|
+
<ul>
|
82
|
+
|
83
|
+
<li class="method">
|
84
|
+
<a href="Chess/Game.html#method-c-load_fen">::load_fen</a>
|
85
|
+
—
|
86
|
+
<span class="container">Chess::Game</span>
|
87
|
+
|
88
|
+
<li class="method">
|
89
|
+
<a href="Chess/Game.html#method-c-load_pgn">::load_pgn</a>
|
90
|
+
—
|
91
|
+
<span class="container">Chess::Game</span>
|
92
|
+
|
93
|
+
<li class="method">
|
94
|
+
<a href="Chess/Game.html#method-c-new">::new</a>
|
95
|
+
—
|
96
|
+
<span class="container">Chess::Game</span>
|
97
|
+
|
98
|
+
<li class="method">
|
99
|
+
<a href="Chess/Pgn.html#method-c-new">::new</a>
|
100
|
+
—
|
101
|
+
<span class="container">Chess::Pgn</span>
|
102
|
+
|
103
|
+
<li class="method">
|
104
|
+
<a href="Chess/Game.html#method-i-3C-3C">#<<</a>
|
105
|
+
—
|
106
|
+
<span class="container">Chess::Game</span>
|
107
|
+
|
108
|
+
<li class="method">
|
109
|
+
<a href="Chess/Board.html#method-i-5B-5D">#[]</a>
|
110
|
+
—
|
111
|
+
<span class="container">Chess::Board</span>
|
112
|
+
|
113
|
+
<li class="method">
|
114
|
+
<a href="Chess/CGame.html#method-i-5B-5D">#[]</a>
|
115
|
+
—
|
116
|
+
<span class="container">Chess::CGame</span>
|
117
|
+
|
118
|
+
<li class="method">
|
119
|
+
<a href="Chess/Board.html#method-i-active_color">#active_color</a>
|
120
|
+
—
|
121
|
+
<span class="container">Chess::Board</span>
|
122
|
+
|
123
|
+
<li class="method">
|
124
|
+
<a href="Chess/Game.html#method-i-active_player">#active_player</a>
|
125
|
+
—
|
126
|
+
<span class="container">Chess::Game</span>
|
127
|
+
|
128
|
+
<li class="method">
|
129
|
+
<a href="Chess/CGame.html#method-i-board">#board</a>
|
130
|
+
—
|
131
|
+
<span class="container">Chess::CGame</span>
|
132
|
+
|
133
|
+
<li class="method">
|
134
|
+
<a href="Chess/Board.html#method-i-check-3F">#check?</a>
|
135
|
+
—
|
136
|
+
<span class="container">Chess::Board</span>
|
137
|
+
|
138
|
+
<li class="method">
|
139
|
+
<a href="Chess/Board.html#method-i-checkmate-3F">#checkmate?</a>
|
140
|
+
—
|
141
|
+
<span class="container">Chess::Board</span>
|
142
|
+
|
143
|
+
<li class="method">
|
144
|
+
<a href="Chess/CGame.html#method-i-coord_moves">#coord_moves</a>
|
145
|
+
—
|
146
|
+
<span class="container">Chess::CGame</span>
|
147
|
+
|
148
|
+
<li class="method">
|
149
|
+
<a href="Chess/CGame.html#method-i-current">#current</a>
|
150
|
+
—
|
151
|
+
<span class="container">Chess::CGame</span>
|
152
|
+
|
153
|
+
<li class="method">
|
154
|
+
<a href="Chess/CGame.html#method-i-draw">#draw</a>
|
155
|
+
—
|
156
|
+
<span class="container">Chess::CGame</span>
|
157
|
+
|
158
|
+
<li class="method">
|
159
|
+
<a href="Chess/CGame.html#method-i-each">#each</a>
|
160
|
+
—
|
161
|
+
<span class="container">Chess::CGame</span>
|
162
|
+
|
163
|
+
<li class="method">
|
164
|
+
<a href="Chess/Board.html#method-i-fifty_rule_move-3F">#fifty_rule_move?</a>
|
165
|
+
—
|
166
|
+
<span class="container">Chess::Board</span>
|
167
|
+
|
168
|
+
<li class="method">
|
169
|
+
<a href="Chess/Board.html#method-i-fullmove_number">#fullmove_number</a>
|
170
|
+
—
|
171
|
+
<span class="container">Chess::Board</span>
|
172
|
+
|
173
|
+
<li class="method">
|
174
|
+
<a href="Chess/Gnuchess.html#method-i-gnuchess_move">#gnuchess_move</a>
|
175
|
+
—
|
176
|
+
<span class="container">Chess::Gnuchess</span>
|
177
|
+
|
178
|
+
<li class="method">
|
179
|
+
<a href="Chess/Gnuchess.html#method-i-gnuchess_move-21">#gnuchess_move!</a>
|
180
|
+
—
|
181
|
+
<span class="container">Chess::Gnuchess</span>
|
182
|
+
|
183
|
+
<li class="method">
|
184
|
+
<a href="Chess/Board.html#method-i-halfmove_clock">#halfmove_clock</a>
|
185
|
+
—
|
186
|
+
<span class="container">Chess::Board</span>
|
187
|
+
|
188
|
+
<li class="method">
|
189
|
+
<a href="Chess/Game.html#method-i-inactive_player">#inactive_player</a>
|
190
|
+
—
|
191
|
+
<span class="container">Chess::Game</span>
|
192
|
+
|
193
|
+
<li class="method">
|
194
|
+
<a href="Chess/Board.html#method-i-insufficient_material-3F">#insufficient_material?</a>
|
195
|
+
—
|
196
|
+
<span class="container">Chess::Board</span>
|
197
|
+
|
198
|
+
<li class="method">
|
199
|
+
<a href="Chess/Pgn.html#method-i-load">#load</a>
|
200
|
+
—
|
201
|
+
<span class="container">Chess::Pgn</span>
|
202
|
+
|
203
|
+
<li class="method">
|
204
|
+
<a href="Chess/Game.html#method-i-move">#move</a>
|
205
|
+
—
|
206
|
+
<span class="container">Chess::Game</span>
|
207
|
+
|
208
|
+
<li class="method">
|
209
|
+
<a href="Chess/CGame.html#method-i-move">#move</a>
|
210
|
+
—
|
211
|
+
<span class="container">Chess::CGame</span>
|
212
|
+
|
213
|
+
<li class="method">
|
214
|
+
<a href="Chess/CGame.html#method-i-move2">#move2</a>
|
215
|
+
—
|
216
|
+
<span class="container">Chess::CGame</span>
|
217
|
+
|
218
|
+
<li class="method">
|
219
|
+
<a href="Chess/CGame.html#method-i-move3">#move3</a>
|
220
|
+
—
|
221
|
+
<span class="container">Chess::CGame</span>
|
222
|
+
|
223
|
+
<li class="method">
|
224
|
+
<a href="Chess/Game.html#method-i-move-3D">#move=</a>
|
225
|
+
—
|
226
|
+
<span class="container">Chess::Game</span>
|
227
|
+
|
228
|
+
<li class="method">
|
229
|
+
<a href="Chess/CGame.html#method-i-moves">#moves</a>
|
230
|
+
—
|
231
|
+
<span class="container">Chess::CGame</span>
|
232
|
+
|
233
|
+
<li class="method">
|
234
|
+
<a href="Chess/Game.html#method-i-moves-3D">#moves=</a>
|
235
|
+
—
|
236
|
+
<span class="container">Chess::Game</span>
|
237
|
+
|
238
|
+
<li class="method">
|
239
|
+
<a href="Chess/Game.html#method-i-over-3F">#over?</a>
|
240
|
+
—
|
241
|
+
<span class="container">Chess::Game</span>
|
242
|
+
|
243
|
+
<li class="method">
|
244
|
+
<a href="Chess/Game.html#method-i-pgn">#pgn</a>
|
245
|
+
—
|
246
|
+
<span class="container">Chess::Game</span>
|
247
|
+
|
248
|
+
<li class="method">
|
249
|
+
<a href="Chess/Board.html#method-i-placement">#placement</a>
|
250
|
+
—
|
251
|
+
<span class="container">Chess::Board</span>
|
252
|
+
|
253
|
+
<li class="method">
|
254
|
+
<a href="Chess/CGame.html#method-i-resign">#resign</a>
|
255
|
+
—
|
256
|
+
<span class="container">Chess::CGame</span>
|
257
|
+
|
258
|
+
<li class="method">
|
259
|
+
<a href="Chess/CGame.html#method-i-result">#result</a>
|
260
|
+
—
|
261
|
+
<span class="container">Chess::CGame</span>
|
262
|
+
|
263
|
+
<li class="method">
|
264
|
+
<a href="Chess/CGame.html#method-i-rollback-21">#rollback!</a>
|
265
|
+
—
|
266
|
+
<span class="container">Chess::CGame</span>
|
267
|
+
|
268
|
+
<li class="method">
|
269
|
+
<a href="Chess/CGame.html#method-i-set_fen-21">#set_fen!</a>
|
270
|
+
—
|
271
|
+
<span class="container">Chess::CGame</span>
|
272
|
+
|
273
|
+
<li class="method">
|
274
|
+
<a href="Chess/CGame.html#method-i-size">#size</a>
|
275
|
+
—
|
276
|
+
<span class="container">Chess::CGame</span>
|
277
|
+
|
278
|
+
<li class="method">
|
279
|
+
<a href="Chess/Board.html#method-i-stalemate-3F">#stalemate?</a>
|
280
|
+
—
|
281
|
+
<span class="container">Chess::Board</span>
|
282
|
+
|
283
|
+
<li class="method">
|
284
|
+
<a href="Chess/Game.html#method-i-status">#status</a>
|
285
|
+
—
|
286
|
+
<span class="container">Chess::Game</span>
|
287
|
+
|
288
|
+
<li class="method">
|
289
|
+
<a href="Chess/CGame.html#method-i-threefold_repetition-3F">#threefold_repetition?</a>
|
290
|
+
—
|
291
|
+
<span class="container">Chess::CGame</span>
|
292
|
+
|
293
|
+
<li class="method">
|
294
|
+
<a href="Chess/Board.html#method-i-to_fen">#to_fen</a>
|
295
|
+
—
|
296
|
+
<span class="container">Chess::Board</span>
|
297
|
+
|
298
|
+
<li class="method">
|
299
|
+
<a href="Chess/Board.html#method-i-to_s">#to_s</a>
|
300
|
+
—
|
301
|
+
<span class="container">Chess::Board</span>
|
302
|
+
|
303
|
+
<li class="method">
|
304
|
+
<a href="Chess/CGame.html#method-i-to_s">#to_s</a>
|
305
|
+
—
|
306
|
+
<span class="container">Chess::CGame</span>
|
307
|
+
|
308
|
+
<li class="method">
|
309
|
+
<a href="Chess/Pgn.html#method-i-to_s">#to_s</a>
|
310
|
+
—
|
311
|
+
<span class="container">Chess::Pgn</span>
|
312
|
+
|
313
|
+
<li class="method">
|
314
|
+
<a href="Chess/UTF8Notation.html#method-i-to_utf8">#to_utf8</a>
|
315
|
+
—
|
316
|
+
<span class="container">Chess::UTF8Notation</span>
|
317
|
+
|
318
|
+
<li class="method">
|
319
|
+
<a href="Chess/Pgn.html#method-i-write">#write</a>
|
320
|
+
—
|
321
|
+
<span class="container">Chess::Pgn</span>
|
322
|
+
</ul>
|
323
|
+
</main>
|
324
|
+
|
325
|
+
|
326
|
+
<footer id="validator-badges" role="contentinfo">
|
327
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
328
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
329
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
330
|
+
</footer>
|
331
|
+
|
data/ext/chess.c
CHANGED
@@ -272,6 +272,9 @@ game_coord_moves (VALUE self)
|
|
272
272
|
return moves;
|
273
273
|
}
|
274
274
|
|
275
|
+
/*
|
276
|
+
* :nodoc:
|
277
|
+
*/
|
275
278
|
VALUE
|
276
279
|
game_full_moves (VALUE self)
|
277
280
|
{
|
@@ -330,10 +333,10 @@ game_size (VALUE self)
|
|
330
333
|
}
|
331
334
|
|
332
335
|
/*
|
333
|
-
* call-seq: each { |board, move,
|
336
|
+
* call-seq: each { |board, move, coord_move, index| block }
|
334
337
|
*
|
335
338
|
* Calls +block+ once for each +board+ in self, passing that
|
336
|
-
* +board+, +move+, +
|
339
|
+
* +board+, +move+, +coord_move+ and +index+ as parameters. Return self.
|
337
340
|
* If no block is given, the array of game moves is returned instead.
|
338
341
|
*/
|
339
342
|
VALUE
|
data/ext/game.c
CHANGED
data/ext/game.h
CHANGED
@@ -33,7 +33,7 @@ void free_game (Game *g);
|
|
33
33
|
Board* current_board (Game *g);
|
34
34
|
Board* get_board (Game *g, int index);
|
35
35
|
char* current_move (Game *g);
|
36
|
-
char*
|
36
|
+
char* current_coord_move (Game *g);
|
37
37
|
bool apply_move (Game *g, int from, int to, char promote_in);
|
38
38
|
void rollback (Game *g);
|
39
39
|
bool threefold_repetition (Game *g);
|
data/lib/chess/game.rb
CHANGED
@@ -71,7 +71,7 @@ module Chess
|
|
71
71
|
else
|
72
72
|
super(expand[:name], expand[:dis], expand[:to], expand[:promotion])
|
73
73
|
end
|
74
|
-
rescue IllegalMoveError
|
74
|
+
rescue IllegalMoveError
|
75
75
|
raise IllegalMoveError.new("Illegal move '#{m}'\n#{self.active_player} turn\n#{self.to_s}")
|
76
76
|
end
|
77
77
|
end
|
data/lib/chess/pgn.rb
CHANGED
@@ -6,7 +6,7 @@ module Chess
|
|
6
6
|
# Array that include PGN standard tags.
|
7
7
|
TAGS = %w(event site date round white black result)
|
8
8
|
|
9
|
-
attr_accessor
|
9
|
+
attr_accessor(*(TAGS + [:moves]))
|
10
10
|
|
11
11
|
# Creates a new PGN. If param +filename+, load it from file.
|
12
12
|
def initialize(filename = nil)
|
@@ -53,6 +53,9 @@ module Chess
|
|
53
53
|
File.open(filename, 'w') { |f| f.write(self.to_s) }
|
54
54
|
end
|
55
55
|
|
56
|
+
# :nodoc:
|
57
|
+
alias :old_date= :date=
|
58
|
+
|
56
59
|
# :nodoc:
|
57
60
|
# Set the date tag.
|
58
61
|
def date=(value)
|
@@ -63,5 +66,6 @@ module Chess
|
|
63
66
|
end
|
64
67
|
end
|
65
68
|
|
69
|
+
|
66
70
|
end
|
67
71
|
end
|
data/lib/chess/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enrico Pilotto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '12.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rdoc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.1'
|
13
69
|
description: A fast chess library that use bitboards to play chess with Ruby.
|
14
70
|
email:
|
15
71
|
- enrico@megiston.it
|
@@ -24,53 +80,63 @@ files:
|
|
24
80
|
- README.rdoc
|
25
81
|
- Rakefile
|
26
82
|
- chess.gemspec
|
27
|
-
- doc/
|
28
|
-
- doc/
|
29
|
-
- doc/
|
30
|
-
- doc/
|
31
|
-
- doc/
|
32
|
-
- doc/
|
33
|
-
- doc/
|
34
|
-
- doc/
|
35
|
-
- doc/
|
36
|
-
- doc/
|
37
|
-
- doc/
|
38
|
-
- doc/
|
83
|
+
- doc/Chess.html
|
84
|
+
- doc/Chess/BadNotationError.html
|
85
|
+
- doc/Chess/Board.html
|
86
|
+
- doc/Chess/CGame.html
|
87
|
+
- doc/Chess/Game.html
|
88
|
+
- doc/Chess/Gnuchess.html
|
89
|
+
- doc/Chess/IllegalMoveError.html
|
90
|
+
- doc/Chess/InvalidFenFormatError.html
|
91
|
+
- doc/Chess/InvalidPgnFormatError.html
|
92
|
+
- doc/Chess/Pgn.html
|
93
|
+
- doc/Chess/UTF8Notation.html
|
94
|
+
- doc/README_rdoc.html
|
39
95
|
- doc/created.rid
|
40
|
-
- doc/css/
|
41
|
-
- doc/css/
|
42
|
-
- doc/
|
43
|
-
- doc/
|
44
|
-
- doc/
|
45
|
-
- doc/
|
46
|
-
- doc/
|
47
|
-
- doc/
|
48
|
-
- doc/
|
49
|
-
- doc/
|
50
|
-
- doc/
|
51
|
-
- doc/
|
52
|
-
- doc/
|
53
|
-
- doc/
|
54
|
-
- doc/
|
55
|
-
- doc/
|
56
|
-
- doc/
|
57
|
-
- doc/
|
58
|
-
- doc/
|
59
|
-
- doc/
|
60
|
-
- doc/
|
61
|
-
- doc/
|
96
|
+
- doc/css/fonts.css
|
97
|
+
- doc/css/rdoc.css
|
98
|
+
- doc/fonts/Lato-Light.ttf
|
99
|
+
- doc/fonts/Lato-LightItalic.ttf
|
100
|
+
- doc/fonts/Lato-Regular.ttf
|
101
|
+
- doc/fonts/Lato-RegularItalic.ttf
|
102
|
+
- doc/fonts/SourceCodePro-Bold.ttf
|
103
|
+
- doc/fonts/SourceCodePro-Regular.ttf
|
104
|
+
- doc/images/add.png
|
105
|
+
- doc/images/arrow_up.png
|
106
|
+
- doc/images/brick.png
|
107
|
+
- doc/images/brick_link.png
|
108
|
+
- doc/images/bug.png
|
109
|
+
- doc/images/bullet_black.png
|
110
|
+
- doc/images/bullet_toggle_minus.png
|
111
|
+
- doc/images/bullet_toggle_plus.png
|
112
|
+
- doc/images/date.png
|
113
|
+
- doc/images/delete.png
|
114
|
+
- doc/images/find.png
|
115
|
+
- doc/images/loadingAnimation.gif
|
116
|
+
- doc/images/macFFBgHack.png
|
117
|
+
- doc/images/package.png
|
118
|
+
- doc/images/page_green.png
|
119
|
+
- doc/images/page_white_text.png
|
120
|
+
- doc/images/page_white_width.png
|
121
|
+
- doc/images/plugin.png
|
122
|
+
- doc/images/ruby.png
|
123
|
+
- doc/images/tag_blue.png
|
124
|
+
- doc/images/tag_green.png
|
125
|
+
- doc/images/transparent.png
|
126
|
+
- doc/images/wrench.png
|
127
|
+
- doc/images/wrench_orange.png
|
128
|
+
- doc/images/zoom.png
|
62
129
|
- doc/index.html
|
63
|
-
- doc/js/
|
64
|
-
- doc/js/jquery
|
65
|
-
- doc/js/jquery-effect.js
|
66
|
-
- doc/js/main.js
|
130
|
+
- doc/js/darkfish.js
|
131
|
+
- doc/js/jquery.js
|
67
132
|
- doc/js/navigation.js
|
133
|
+
- doc/js/navigation.js.gz
|
134
|
+
- doc/js/search.js
|
68
135
|
- doc/js/search_index.js
|
69
|
-
- doc/js/
|
136
|
+
- doc/js/search_index.js.gz
|
70
137
|
- doc/js/searcher.js
|
71
|
-
- doc/
|
72
|
-
- doc/
|
73
|
-
- doc/panel/tree.js
|
138
|
+
- doc/js/searcher.js.gz
|
139
|
+
- doc/table_of_contents.html
|
74
140
|
- ext/MakefileC
|
75
141
|
- ext/bitboard.c
|
76
142
|
- ext/bitboard.h
|
@@ -1319,7 +1385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1319
1385
|
version: '0'
|
1320
1386
|
requirements: []
|
1321
1387
|
rubyforge_project: chess
|
1322
|
-
rubygems_version: 2.
|
1388
|
+
rubygems_version: 2.6.12
|
1323
1389
|
signing_key:
|
1324
1390
|
specification_version: 4
|
1325
1391
|
summary: A fast chess library to play chess with Ruby.
|