var searchIndex = {}; searchIndex["chess"] = {"doc":"","items":[[0,"color","chess","",null,null],[4,"Color","chess::color","Represent a color.",null,null],[13,"White","","",0,null],[13,"Black","","",0,null],[17,"NUM_COLORS","","How many colors are there?",null,null],[17,"ALL_COLORS","","List all colors",null,null],[11,"clone","","",0,null],[11,"eq","","",0,null],[11,"partial_cmp","","",0,null],[11,"to_index","","Convert the `Color` to a `usize` for table lookups.",0,null],[11,"to_my_backrank","","Covert the `Color` to a rank, which reperesnts the starting position\nfor that colors pieces.",0,null],[11,"to_their_backrank","","Convert a `Color` to my opponents backrank, which represents the starting position for the\nopponents pieces.",0,null],[11,"to_second_rank","","Convert a `Color` to my second rank, which represents the starting position for my pawns.",0,null],[11,"not","","Get the other color.",0,null],[0,"piece","chess","",null,null],[4,"Piece","chess::piece","Represent a chess piece as a very simple enum",null,null],[13,"Pawn","","",1,null],[13,"Knight","","",1,null],[13,"Bishop","","",1,null],[13,"Rook","","",1,null],[13,"Queen","","",1,null],[13,"King","","",1,null],[17,"NUM_PIECES","","How many piece types are there?",null,null],[17,"ALL_PIECES","","An array representing each piece type, in order of ascending value.",null,null],[11,"clone","","",1,null],[11,"partial_cmp","","",1,null],[11,"eq","","",1,null],[11,"to_index","","Convert the `Piece` to a `usize` for table lookups.",1,null],[0,"square","chess","",null,null],[3,"Square","chess::square","Represent a square on the chess board",null,null],[3,"ALL_SQUARES","","A list of every square on the chessboard.",null,null],[17,"NUM_SQUARES","","How many squares are there?",null,null],[11,"clone","","",2,null],[11,"partial_cmp","","",2,null],[11,"lt","","",2,null],[11,"le","","",2,null],[11,"gt","","",2,null],[11,"ge","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"new","","Create a new square, given an index.\nNote: It is invalid, but allowed, to pass in a number >= 64. Doing so will crash stuff.",2,{"inputs":[{"name":"u8"}],"output":{"name":"square"}}],[11,"make_square","","Make a square given a rank and a file\nNote: It is invalid, but allowed, to pass in a rank or file >= 8. Doing so will crash\nstuff.",2,{"inputs":[{"name":"u8"},{"name":"u8"}],"output":{"name":"square"}}],[11,"up","","If there is a square above me, return that. Otherwise, None.",2,null],[11,"forward","","If there is a square "forward", given my `Color`, go in that direction. Otherwise, None.",2,null],[11,"backward","","If there is a square "backward" given my `Color`, go in that direction. Otherwise, None.",2,null],[11,"down","","If there is a square below me, return that. Otherwise, None.",2,null],[11,"left","","If there is a square to the left of me, return that. Otherwise, None.",2,null],[11,"right","","If there is a square to the right of me, return that. Otherwise, None.",2,null],[11,"uup","","If there is a square above me, return that. Otherwise, return invalid data to crash the\nprogram.",2,null],[11,"udown","","If there is a square below me, return that. Otherwise, return invalid data to crash the\nprogram.",2,null],[11,"uleft","","If there is a square to the left of me, return that. Otherwise, return invalid data to\ncrash the program.",2,null],[11,"uright","","If there is a square to the right of me, return that. Otherwise, return invalid data to\ncrash the program.",2,null],[11,"uforward","","If there is a square "forward", given my color, return that. Otherwise, return invalid\ndata to crash the program.",2,null],[11,"ubackward","","If there is a square "backward", given my color, return that. Otherwise, return invalid\ndata to crash the program.",2,null],[11,"rank","","Return the rank given this square.",2,null],[11,"file","","Return the file given this square.",2,null],[11,"to_int","","Convert this square to an integer.",2,null],[11,"to_index","","Convert this `Square` to a `usize` for table lookup purposes",2,null],[11,"from_string","","Convert a UCI `String` to a square. If invalid, return `None`",2,{"inputs":[{"name":"string"}],"output":{"name":"option"}}],[11,"deref","","",3,null],[0,"chess_move","chess","",null,null],[3,"ChessMove","chess::chess_move","Represent a ChessMove in memory",null,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"partial_cmp","","",4,null],[11,"lt","","",4,null],[11,"le","","",4,null],[11,"gt","","",4,null],[11,"ge","","",4,null],[11,"clone","","",4,null],[11,"new","","Create a new chess move, given a source `Square`, a destination `Square, and an optional\npromotion `Piece`",4,{"inputs":[{"name":"square"},{"name":"square"},{"name":"option"}],"output":{"name":"chessmove"}}],[11,"get_source","","Get the source square (square the piece is currently on).",4,null],[11,"get_dest","","Get the destination square (square the piece is going to).",4,null],[11,"get_promotion","","Get the promotion piece (maybe).",4,null],[0,"bitboard","chess","",null,null],[3,"BitBoard","chess::bitboard","A good old-fashioned bitboard\nYou do *not* have access to the actual value. You *do* have access to operators",null,null],[17,"EMPTY","","An empty bitboard",null,null],[11,"clone","","",5,null],[11,"partial_cmp","","",5,null],[11,"lt","","",5,null],[11,"le","","",5,null],[11,"gt","","",5,null],[11,"ge","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"bitand","","",5,null],[11,"bitor","","",5,null],[11,"bitxor","","",5,null],[11,"bitand_assign","","",5,null],[11,"bitor_assign","","",5,null],[11,"bitxor_assign","","",5,null],[11,"mul","","",5,null],[11,"not","","",5,null],[11,"fmt","","",5,null],[11,"new","","Construct a new bitboard from a u64",5,{"inputs":[{"name":"u64"}],"output":{"name":"bitboard"}}],[11,"set","","Construct a new BitBoard with a particular 'Square' set",5,{"inputs":[{"name":"u8"},{"name":"u8"}],"output":{"name":"bitboard"}}],[11,"from_square","","Convert a `Square` to a BitBoard",5,{"inputs":[{"name":"square"}],"output":{"name":"bitboard"}}],[11,"from_maybe_square","","Convert an `Option<Square>` to an `Option<BitBoard>`",5,{"inputs":[{"name":"option"}],"output":{"name":"option"}}],[11,"to_square","","Convert a `BitBoard` to a `Square`. This grabs the least-significant `Square`",5,null],[11,"popcnt","","Count the number of `Squares` set in this `BitBoard`",5,null],[11,"reverse_colors","","Reverse this `BitBoard`. Look at it from the opponents perspective.",5,null],[11,"to_size","","Convert this `BitBoard` to a `usize` (for table lookups)",5,null],[11,"get_rank","","Get a `BitBoard` that represents a particular rank.\nNote: passing a number not between 0-7 inclusive will seg. fault.",5,{"inputs":[{"name":"u8"}],"output":{"name":"bitboard"}}],[11,"get_file","","Get a `BitBoard` that represents a particular file.\nNote: passing a number not between 0-7 inclusive will seg. fault.",5,{"inputs":[{"name":"u8"}],"output":{"name":"bitboard"}}],[11,"get_adjacent_files","","Get a `BitBoard` that represents the files next to this file.\nNote: passing a number not between 0-7 inclusive will seg. fault.",5,{"inputs":[{"name":"u8"}],"output":{"name":"bitboard"}}],[11,"construct","","Perform initialization. Must be called before some functions can be used.",5,{"inputs":[],"output":null}],[11,"next","","",5,null],[0,"castle_rights","chess","",null,null],[4,"CastleRights","chess::castle_rights","What castle rights does a particular player have?",null,null],[13,"NoRights","","",6,null],[13,"KingSide","","",6,null],[13,"QueenSide","","",6,null],[13,"Both","","",6,null],[11,"partial_cmp","","",6,null],[11,"eq","","",6,null],[11,"clone","","",6,null],[11,"has_kingside","","Can I castle kingside?",6,null],[11,"has_queenside","","Can I castle queenside?",6,null],[11,"kingside_squares","","What squares need to be empty to castle kingside?",6,null],[11,"queenside_squares","","What squares need to be empty to castle queenside?",6,null],[11,"remove","","Remove castle rights, and return a new `CastleRights`.",6,null],[11,"to_index","","Convert `CastleRights` to `usize` for table lookups",6,null],[11,"from_index","","Convert `usize` to `CastleRights`. Panic if invalid number.",6,{"inputs":[{"name":"usize"}],"output":{"name":"castlerights"}}],[11,"unmoved_rooks","","Which rooks can we "guarantee" we haven't moved yet?",6,null],[11,"rook_square_to_castle_rights","","Given a square of a rook, which side is it on?\nNote: It is invalid to pass in a non-rook square. The code may panic.",6,{"inputs":[{"name":"square"}],"output":{"name":"castlerights"}}],[0,"board","chess","",null,null],[3,"Board","chess::board","A representation of a chess board. That's why you're here, right?",null,null],[11,"clone","","",7,null],[11,"new","","Construct a new `Board` that is completely empty.\nNote: This does NOT give you the initial position. Just a blank slate.",7,{"inputs":[],"output":{"name":"board"}}],[11,"from_fen","","Construct a board from a FEN string.",7,{"inputs":[{"name":"string"}],"output":{"name":"board"}}],[11,"combined","","Grab the "combined" `BitBoard`. This is a `BitBoard` with every piece",7,null],[11,"color_combined","","Grab the "color combined" `BitBoard`. This is a `BitBoard` with every piece of a particular\ncolor.",7,null],[11,"pieces","","Grab the "pieces" `BitBoard`. This is a `BitBoard` with every piece of a particular type.",7,null],[11,"castle_rights","","Grab the `CastleRights` for a particular side.",7,null],[11,"side_to_move","","Who's turn is it?",7,null],[11,"my_castle_rights","","Grab my `CastleRights`.",7,null],[11,"their_castle_rights","","My opponents `CastleRights`.",7,null],[11,"is_sane","","Does this board "make sense"?\nDo all the pieces make sense, do the bitboards combine correctly, etc?\nThis is for sanity checking.",7,null],[11,"piece_on","","What piece is on a particular `Square`? Is there even one?",7,null],[11,"enumerate_moves","","Give me all the legal moves for this board.",7,null],[11,"next","","Make a chess move",7,null],[11,"perft","","Run a perft-test.",7,null],[11,"perft_test","","",7,{"inputs":[{"name":"string"},{"name":"u64"},{"name":"u64"}],"output":null}],[11,"fmt","","",7,null],[0,"magic","chess","",null,null],[3,"Magic","chess::magic","",null,null],[11,"clone","","",8,null],[11,"construct","","Initialize all the magic numbers and lookup tables.\nNote: You want to call construct::construct() instead. It's easier, and you must call\nBitBoard::construct() before calling this, so just rely on the other one.",8,{"inputs":[],"output":null}],[11,"get_bishop_rays","","Get the rays for a bishop on a particular square.",8,{"inputs":[{"name":"square"}],"output":{"name":"bitboard"}}],[11,"get_rook_rays","","Get the rays for a rook on a particular square.",8,{"inputs":[{"name":"square"}],"output":{"name":"bitboard"}}],[11,"get_rook_moves","","Get the moves for a rook on a particular square, given blockers blocking my movement.",8,{"inputs":[{"name":"square"},{"name":"bitboard"}],"output":{"name":"bitboard"}}],[11,"get_bishop_moves","","Get the moves for a bishop on a particular square, given blockers blocking my movement.",8,{"inputs":[{"name":"square"},{"name":"bitboard"}],"output":{"name":"bitboard"}}],[11,"get_king_moves","","Get the king moves for a particular square.",8,{"inputs":[{"name":"square"}],"output":{"name":"bitboard"}}],[11,"get_knight_moves","","Get the knight moves for a particular square.",8,{"inputs":[{"name":"square"}],"output":{"name":"bitboard"}}],[11,"get_pawn_attacks","","Get the pawn capture move for a particular square, given the pawn's color and the potential\nvictims",8,{"inputs":[{"name":"square"},{"name":"color"},{"name":"bitboard"}],"output":{"name":"bitboard"}}],[11,"get_pawn_quiets","","Get the quiet pawn moves (non-captures) for a particular square, given the pawn's color and\nthe potential blocking pieces.",8,{"inputs":[{"name":"square"},{"name":"color"},{"name":"bitboard"}],"output":{"name":"bitboard"}}],[11,"get_pawn_moves","","Get all the pawn moves for a particular square, given the pawn's color and the potential\nblocking pieces and victims.",8,{"inputs":[{"name":"square"},{"name":"color"},{"name":"bitboard"}],"output":{"name":"bitboard"}}],[11,"line","","Get a line (extending to infinity, which in chess is 8 squares), given two squares.\nThis line does extend past the squares.",8,{"inputs":[{"name":"square"},{"name":"square"}],"output":{"name":"bitboard"}}],[11,"between","","Get a line between these two squares, not including the squares themselves.",8,{"inputs":[{"name":"square"},{"name":"square"}],"output":{"name":"bitboard"}}],[0,"construct","chess","",null,null],[5,"construct","chess::construct","",null,{"inputs":[],"output":null}]],"paths":[[4,"Color"],[4,"Piece"],[3,"Square"],[3,"ALL_SQUARES"],[3,"ChessMove"],[3,"BitBoard"],[4,"CastleRights"],[3,"Board"],[3,"Magic"]]}; initSearch(searchIndex);