deploy: eb1a240bd7
This commit is contained in:
parent
40f5c8bfab
commit
34b33fceef
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
a9e080695052ab7978e6.module.wasm
Normal file
BIN
a9e080695052ab7978e6.module.wasm
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate draught</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate draught</p><div class="block version"><p>Version 1.0.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span>
|
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span>
|
||||||
</span>
|
</span>
|
||||||
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="board/struct.Board.html">board::Board</a></li><li><a href="board/struct.BrdIdx.html">board::BrdIdx</a></li><li><a href="board/struct.Direction.html">board::Direction</a></li><li><a href="board/struct.Piece.html">board::Piece</a></li><li><a href="board/struct.Square.html">board::Square</a></li><li><a href="board/iter/struct.PieceIterator.html">board::iter::PieceIterator</a></li><li><a href="board/iter/struct.RowIndexIterator.html">board::iter::RowIndexIterator</a></li><li><a href="board/iter/struct.RowSquareIterator.html">board::iter::RowSquareIterator</a></li><li><a href="comp/struct.BoardNode.html">comp::BoardNode</a></li><li><a href="comp/struct.Computer.html">comp::Computer</a></li><li><a href="comp/struct.Move.html">comp::Move</a></li><li><a href="game/struct.Game.html">game::Game</a></li><li><a href="paint/struct.Painter.html">paint::Painter</a></li><li><a href="player/struct.Player.html">player::Player</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="board/enums/enum.MoveType.html">board::enums::MoveType</a></li><li><a href="board/enums/enum.Moveable.html">board::enums::Moveable</a></li><li><a href="board/enums/enum.SquareState.html">board::enums::SquareState</a></li><li><a href="board/enums/enum.Strength.html">board::enums::Strength</a></li><li><a href="board/enums/enum.Team.html">board::enums::Team</a></li></ul><h3 id="Macros">Macros</h3><ul class="macros docblock"><li><a href="macro.log.html">log</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.__wasm_bindgen_generated_init_wasm.html">__wasm_bindgen_generated_init_wasm</a></li><li><a href="fn.init_wasm.html">init_wasm</a></li><li><a href="utils/fn.set_panic_hook.html">utils::set_panic_hook</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="board/constant.STD_HEIGHT.html">board::STD_HEIGHT</a></li><li><a href="board/constant.STD_WIDTH.html">board::STD_WIDTH</a></li><li><a href="paint/constant.BLACK_PIECE.html">paint::BLACK_PIECE</a></li><li><a href="paint/constant.BLACK_PIECE_OUTLINE.html">paint::BLACK_PIECE_OUTLINE</a></li><li><a href="paint/constant.BLACK_SQUARE.html">paint::BLACK_SQUARE</a></li><li><a href="paint/constant.DRAW_OUTLINE.html">paint::DRAW_OUTLINE</a></li><li><a href="paint/constant.DRAW_PIECE_OUTLINES.html">paint::DRAW_PIECE_OUTLINES</a></li><li><a href="paint/constant.KING_OUTLINE.html">paint::KING_OUTLINE</a></li><li><a href="paint/constant.OUTLINE_WIDTH.html">paint::OUTLINE_WIDTH</a></li><li><a href="paint/constant.PIECE_MARGIN.html">paint::PIECE_MARGIN</a></li><li><a href="paint/constant.PIECE_OUTLINE_WIDTH.html">paint::PIECE_OUTLINE_WIDTH</a></li><li><a href="paint/constant.SELECTED_PIECE.html">paint::SELECTED_PIECE</a></li><li><a href="paint/constant.SELECTED_PIECE_OUTLINE.html">paint::SELECTED_PIECE_OUTLINE</a></li><li><a href="paint/constant.SQUARE_OUTLINE.html">paint::SQUARE_OUTLINE</a></li><li><a href="paint/constant.WHITE_PIECE.html">paint::WHITE_PIECE</a></li><li><a href="paint/constant.WHITE_PIECE_OUTLINE.html">paint::WHITE_PIECE_OUTLINE</a></li><li><a href="paint/constant.WHITE_SQUARE.html">paint::WHITE_SQUARE</a></li></ul></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="board/struct.Board.html">board::Board</a></li><li><a href="board/struct.BrdIdx.html">board::BrdIdx</a></li><li><a href="board/struct.Direction.html">board::Direction</a></li><li><a href="board/struct.Piece.html">board::Piece</a></li><li><a href="board/struct.Square.html">board::Square</a></li><li><a href="board/iter/struct.PieceIterator.html">board::iter::PieceIterator</a></li><li><a href="board/iter/struct.RowIndexIterator.html">board::iter::RowIndexIterator</a></li><li><a href="board/iter/struct.RowSquareIterator.html">board::iter::RowSquareIterator</a></li><li><a href="comp/struct.BoardNode.html">comp::BoardNode</a></li><li><a href="comp/struct.Computer.html">comp::Computer</a></li><li><a href="comp/struct.Move.html">comp::Move</a></li><li><a href="game/struct.Game.html">game::Game</a></li><li><a href="paint/struct.Painter.html">paint::Painter</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="board/enums/enum.MoveType.html">board::enums::MoveType</a></li><li><a href="board/enums/enum.Moveable.html">board::enums::Moveable</a></li><li><a href="board/enums/enum.SquareState.html">board::enums::SquareState</a></li><li><a href="board/enums/enum.Strength.html">board::enums::Strength</a></li><li><a href="board/enums/enum.Team.html">board::enums::Team</a></li></ul><h3 id="Macros">Macros</h3><ul class="macros docblock"><li><a href="macro.log.html">log</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.__wasm_bindgen_generated_init_wasm.html">__wasm_bindgen_generated_init_wasm</a></li><li><a href="fn.init_wasm.html">init_wasm</a></li><li><a href="utils/fn.set_panic_hook.html">utils::set_panic_hook</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="board/constant.STD_HEIGHT.html">board::STD_HEIGHT</a></li><li><a href="board/constant.STD_WIDTH.html">board::STD_WIDTH</a></li><li><a href="paint/constant.BLACK_PIECE.html">paint::BLACK_PIECE</a></li><li><a href="paint/constant.BLACK_PIECE_OUTLINE.html">paint::BLACK_PIECE_OUTLINE</a></li><li><a href="paint/constant.BLACK_SQUARE.html">paint::BLACK_SQUARE</a></li><li><a href="paint/constant.DRAW_OUTLINE.html">paint::DRAW_OUTLINE</a></li><li><a href="paint/constant.DRAW_PIECE_OUTLINES.html">paint::DRAW_PIECE_OUTLINES</a></li><li><a href="paint/constant.KING_OUTLINE.html">paint::KING_OUTLINE</a></li><li><a href="paint/constant.OUTLINE_WIDTH.html">paint::OUTLINE_WIDTH</a></li><li><a href="paint/constant.PIECE_MARGIN.html">paint::PIECE_MARGIN</a></li><li><a href="paint/constant.PIECE_OUTLINE_WIDTH.html">paint::PIECE_OUTLINE_WIDTH</a></li><li><a href="paint/constant.SELECTED_PIECE.html">paint::SELECTED_PIECE</a></li><li><a href="paint/constant.SELECTED_PIECE_OUTLINE.html">paint::SELECTED_PIECE_OUTLINE</a></li><li><a href="paint/constant.SQUARE_OUTLINE.html">paint::SQUARE_OUTLINE</a></li><li><a href="paint/constant.WHITE_PIECE.html">paint::WHITE_PIECE</a></li><li><a href="paint/constant.WHITE_PIECE_OUTLINE.html">paint::WHITE_PIECE_OUTLINE</a></li><li><a href="paint/constant.WHITE_SQUARE.html">paint::WHITE_SQUARE</a></li></ul></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||||
<script src="../main.js"></script></body></html>
|
<script src="../main.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,11 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `enums` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, enums"><title>draught::board::enums - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `enums` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, enums"><title>draught::board::enums - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module enums</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a></p><div id="sidebar-vars" data-name="enums" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module enums</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a></p><div id="sidebar-vars" data-name="enums" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a class="mod" href="">enums</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/enums.rs.html#1-80" title="goto source code">[src]</a></span></h1><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a class="mod" href="">enums</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/enums.rs.html#1-86" title="goto source code">[src]</a></span></h1><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="enum" href="enum.MoveType.html" title="draught::board::enums::MoveType enum">MoveType</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Moveable.html" title="draught::board::enums::Moveable enum">Moveable</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.SquareState.html" title="draught::board::enums::SquareState enum">SquareState</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Strength.html" title="draught::board::enums::Strength enum">Strength</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="enum" href="enum.Team.html" title="draught::board::enums::Team enum">Team</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
<table><tr class="module-item"><td><a class="enum" href="enum.MoveType.html" title="draught::board::enums::MoveType enum">MoveType</a></td><td class="docblock-short"><p>Move/Jump, for use in Move</p>
|
||||||
|
</td></tr><tr class="module-item"><td><a class="enum" href="enum.Moveable.html" title="draught::board::enums::Moveable enum">Moveable</a></td><td class="docblock-short"><p>Possible outcomes of trying to move</p>
|
||||||
|
</td></tr><tr class="module-item"><td><a class="enum" href="enum.SquareState.html" title="draught::board::enums::SquareState enum">SquareState</a></td><td class="docblock-short"><p>Model board square as Empty/Occupied/Unplayable</p>
|
||||||
|
</td></tr><tr class="module-item"><td><a class="enum" href="enum.Strength.html" title="draught::board::enums::Strength enum">Strength</a></td><td class="docblock-short"><p>Man/King</p>
|
||||||
|
</td></tr><tr class="module-item"><td><a class="enum" href="enum.Team.html" title="draught::board::enums::Team enum">Team</a></td><td class="docblock-short"><p>Black/White</p>
|
||||||
|
</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
|
||||||
<script src="../../../main.js"></script></body></html>
|
<script src="../../../main.js"></script></body></html>
|
@ -1 +1 @@
|
|||||||
initSidebarItems({"enum":[["MoveType",""],["Moveable",""],["SquareState",""],["Strength",""],["Team",""]]});
|
initSidebarItems({"enum":[["MoveType","Move/Jump, for use in Move"],["Moveable","Possible outcomes of trying to move"],["SquareState","Model board square as Empty/Occupied/Unplayable"],["Strength","Man/King"],["Team","Black/White"]]});
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Board module for components related to the checkers board and game structure"><meta name="keywords" content="rust, rustlang, rust-lang, board"><title>draught::board - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Board module for components related to the checkers board and game structure"><meta name="keywords" content="rust, rustlang, rust-lang, board"><title>draught::board - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module board</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="board" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module board</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="board" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">board</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#1-848" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Board module for components related to the checkers board and game structure</p>
|
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">board</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#1-850" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Board module for components related to the checkers board and game structure</p>
|
||||||
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="mod" href="enums/index.html" title="draught::board::enums mod">enums</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="iter/index.html" title="draught::board::iter mod">iter</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
<table><tr class="module-item"><td><a class="mod" href="enums/index.html" title="draught::board::enums mod">enums</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="iter/index.html" title="draught::board::iter mod">iter</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="struct" href="struct.Board.html" title="draught::board::Board struct">Board</a></td><td class="docblock-short"><p>Single state of a checkers board</p>
|
<table><tr class="module-item"><td><a class="struct" href="struct.Board.html" title="draught::board::Board struct">Board</a></td><td class="docblock-short"><p>Single state of a checkers board</p>
|
||||||
|
@ -32,32 +32,34 @@ Vector may be between 1 and 4 items long depending on the location of the given
|
|||||||
<p><a href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>: If the given square is unplayable</p>
|
<p><a href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>: If the given square is unplayable</p>
|
||||||
<p>Some(Direction<Square>): A <a href="struct.Direction.html" title="Direction"><code>Direction</code></a> structure for the diagonally jumpable squares.</p>
|
<p>Some(Direction<Square>): A <a href="struct.Direction.html" title="Direction"><code>Direction</code></a> structure for the diagonally jumpable squares.</p>
|
||||||
</div><h4 id="method.player_jumpable_indices" class="method"><code>pub fn <a href="#method.player_jumpable_indices" class="fnname">player_jumpable_indices</a>(<br> &self, <br> idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> player: <a class="enum" href="enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></code><a href="#method.player_jumpable_indices" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#371-376" title="goto source code">[src]</a></h4><h4 id="method.idx_diffs" class="method"><code>pub fn <a href="#method.idx_diffs" class="fnname">idx_diffs</a>(from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a href="#method.idx_diffs" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#379-382" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the difference between two <a href="struct.BrdIdx.html" title="BrdIdx"><code>BrdIdx</code></a> objects</p>
|
</div><h4 id="method.player_jumpable_indices" class="method"><code>pub fn <a href="#method.player_jumpable_indices" class="fnname">player_jumpable_indices</a>(<br> &self, <br> idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> player: <a class="enum" href="enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></code><a href="#method.player_jumpable_indices" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#371-376" title="goto source code">[src]</a></h4><h4 id="method.idx_diffs" class="method"><code>pub fn <a href="#method.idx_diffs" class="fnname">idx_diffs</a>(from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a href="#method.idx_diffs" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#379-382" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the difference between two <a href="struct.BrdIdx.html" title="BrdIdx"><code>BrdIdx</code></a> objects</p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#390-726" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.cell" class="method"><code>pub fn <a href="#method.cell" class="fnname">cell</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.cell" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#392-394" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a copy of a board square by 1D array index</p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#390-728" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.cell" class="method"><code>pub fn <a href="#method.cell" class="fnname">cell</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.cell" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#392-394" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a copy of a board square by 1D array index</p>
|
||||||
</div><h4 id="method.set_cell" class="method"><code>pub fn <a href="#method.set_cell" class="fnname">set_cell</a>(&mut self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, square: <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a>)</code><a href="#method.set_cell" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#397-403" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a copy of a board square by 1D array index</p>
|
</div><h4 id="method.set_cell" class="method"><code>pub fn <a href="#method.set_cell" class="fnname">set_cell</a>(&mut self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, square: <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a>)</code><a href="#method.set_cell" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#397-403" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a copy of a board square by 1D array index</p>
|
||||||
</div><h4 id="method.grid_cell" class="method"><code>pub fn <a href="#method.grid_cell" class="fnname">grid_cell</a>(&self, idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.grid_cell" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#406-408" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a copy of a board square by 2D <a href="struct.BrdIdx.html" title="BrdIdx"><code>BrdIdx</code></a> index</p>
|
</div><h4 id="method.grid_cell" class="method"><code>pub fn <a href="#method.grid_cell" class="fnname">grid_cell</a>(&self, idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.grid_cell" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#406-408" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a copy of a board square by 2D <a href="struct.BrdIdx.html" title="BrdIdx"><code>BrdIdx</code></a> index</p>
|
||||||
</div><h4 id="method.cell_index" class="method"><code>pub fn <a href="#method.cell_index" class="fnname">cell_index</a>(&self, row: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, col: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.cell_index" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#411-413" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform a 2D row/column board index into a single 1D index for use with <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a></p>
|
</div><h4 id="method.cell_index" class="method"><code>pub fn <a href="#method.cell_index" class="fnname">cell_index</a>(&self, row: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, col: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.cell_index" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#411-413" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform a 2D row/column board index into a single 1D index for use with <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a></p>
|
||||||
</div><h4 id="method.cell_idx" class="method"><code>pub fn <a href="#method.cell_idx" class="fnname">cell_idx</a>(&self, idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.cell_idx" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#416-418" title="goto source code">[src]</a></h4><div class="docblock"><p>Similar to <a href="struct.Board.html#method.cell_index" title="Board::cell_index"><code>Board::cell_index</code></a> but with a <a href="struct.BrdIdx.html" title="BrdIdx"><code>BrdIdx</code></a> instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a></p>
|
</div><h4 id="method.cell_idx" class="method"><code>pub fn <a href="#method.cell_idx" class="fnname">cell_idx</a>(&self, idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.cell_idx" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#416-418" title="goto source code">[src]</a></h4><div class="docblock"><p>Similar to <a href="struct.Board.html#method.cell_index" title="Board::cell_index"><code>Board::cell_index</code></a> but with a <a href="struct.BrdIdx.html" title="BrdIdx"><code>BrdIdx</code></a> instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a></p>
|
||||||
</div><h4 id="method.board_index" class="method"><code>pub fn <a href="#method.board_index" class="fnname">board_index</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a></code><a href="#method.board_index" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#421-425" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform a 1D array index (for <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a>) into a 2D game board index (by row/col)</p>
|
</div><h4 id="method.board_index" class="method"><code>pub fn <a href="#method.board_index" class="fnname">board_index</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a></code><a href="#method.board_index" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#421-425" title="goto source code">[src]</a></h4><div class="docblock"><p>Transform a 1D array index (for <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a>) into a 2D game board index (by row/col)</p>
|
||||||
</div><h4 id="method.can_move" class="method"><code>pub fn <a href="#method.can_move" class="fnname">can_move</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.can_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#428-492" title="goto source code">[src]</a></h4><div class="docblock"><p>Check whether a move given by source and destination indices is legal </p>
|
</div><h4 id="method.can_move" class="method"><code>pub fn <a href="#method.can_move" class="fnname">can_move</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.can_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#428-492" title="goto source code">[src]</a></h4><div class="docblock"><p>Check whether a move given by source and destination indices is legal </p>
|
||||||
</div><h4 id="method.validate_man_move" class="method"><code>pub fn <a href="#method.validate_man_move" class="fnname">validate_man_move</a>(<br> &self, <br> from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> from_square_occupant: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a><br>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.validate_man_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#494-540" title="goto source code">[src]</a></h4><h4 id="method.validate_king_move" class="method"><code>pub fn <a href="#method.validate_king_move" class="fnname">validate_king_move</a>(<br> &self, <br> from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> from_square_occupant: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a><br>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.validate_king_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#542-582" title="goto source code">[src]</a></h4><h4 id="method.jumpee_idx" class="method"><code>pub fn <a href="#method.jumpee_idx" class="fnname">jumpee_idx</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.jumpee_idx" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#585-592" title="goto source code">[src]</a></h4><div class="docblock"><p>Get cell index of jumpee square given from and to locations</p>
|
</div><h4 id="method.validate_man_move" class="method"><code>pub fn <a href="#method.validate_man_move" class="fnname">validate_man_move</a>(<br> &self, <br> from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> from_square_occupant: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a><br>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.validate_man_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#495-541" title="goto source code">[src]</a></h4><div class="docblock"><p>Check that given move trajectory is valid for a man piece </p>
|
||||||
</div><h4 id="method.cells" class="method"><code>pub fn <a href="#method.cells" class="fnname">cells</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.cells" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a pointer to the backing array of board squares, <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a></p>
|
</div><h4 id="method.validate_king_move" class="method"><code>pub fn <a href="#method.validate_king_move" class="fnname">validate_king_move</a>(<br> &self, <br> from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, <br> from_square_occupant: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a><br>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.validate_king_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#544-584" title="goto source code">[src]</a></h4><div class="docblock"><p>Check that given move trajectory is valid for a king piece </p>
|
||||||
</div><h4 id="method.num_cells" class="method"><code>pub fn <a href="#method.num_cells" class="fnname">num_cells</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.num_cells" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#600-602" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the number of board squares</p>
|
</div><h4 id="method.jumpee_idx" class="method"><code>pub fn <a href="#method.jumpee_idx" class="fnname">jumpee_idx</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.jumpee_idx" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#587-594" title="goto source code">[src]</a></h4><div class="docblock"><p>Get cell index of jumpee square given from and to locations</p>
|
||||||
</div><h4 id="method.num_pieces" class="method"><code>pub fn <a href="#method.num_pieces" class="fnname">num_pieces</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.num_pieces" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#605-608" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the number of remaining pieces</p>
|
</div><h4 id="method.cells" class="method"><code>pub fn <a href="#method.cells" class="fnname">cells</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.cells" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#597-599" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a pointer to the backing array of board squares, <a href="struct.Board.html#method.cells" title="Board::cells"><code>Board::cells</code></a></p>
|
||||||
</div><h4 id="method.num_player" class="method"><code>pub fn <a href="#method.num_player" class="fnname">num_player</a>(&self, team: <a class="enum" href="enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.num_player" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#611-624" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the number of remaining pieces for a player</p>
|
</div><h4 id="method.num_cells" class="method"><code>pub fn <a href="#method.num_cells" class="fnname">num_cells</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.num_cells" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#602-604" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the number of board squares</p>
|
||||||
</div><h4 id="method.score" class="method"><code>pub fn <a href="#method.score" class="fnname">score</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href="#method.score" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#627-652" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the score value, Black - White pieces</p>
|
</div><h4 id="method.num_pieces" class="method"><code>pub fn <a href="#method.num_pieces" class="fnname">num_pieces</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.num_pieces" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#607-610" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the number of remaining pieces</p>
|
||||||
</div><h4 id="method.cell_state" class="method"><code>pub fn <a href="#method.cell_state" class="fnname">cell_state</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="enums/enum.SquareState.html" title="enum draught::board::enums::SquareState">SquareState</a></code><a href="#method.cell_state" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#655-657" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the state of a board square by 1D array index</p>
|
</div><h4 id="method.num_player" class="method"><code>pub fn <a href="#method.num_player" class="fnname">num_player</a>(&self, team: <a class="enum" href="enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.num_player" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#613-626" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the number of remaining pieces for a player</p>
|
||||||
</div><h4 id="method.apply_move" class="method"><code>pub fn <a href="#method.apply_move" class="fnname">apply_move</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.apply_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#660-684" title="goto source code">[src]</a></h4><div class="docblock"><p>Get new board derived from current with given move applied</p>
|
</div><h4 id="method.score" class="method"><code>pub fn <a href="#method.score" class="fnname">score</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href="#method.score" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#629-654" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the score value, Black - White pieces</p>
|
||||||
</div><h4 id="method.apply_jump" class="method"><code>pub fn <a href="#method.apply_jump" class="fnname">apply_jump</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.apply_jump" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#687-717" title="goto source code">[src]</a></h4><div class="docblock"><p>Get new board derived from current with given jump applied</p>
|
</div><h4 id="method.cell_state" class="method"><code>pub fn <a href="#method.cell_state" class="fnname">cell_state</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="enums/enum.SquareState.html" title="enum draught::board::enums::SquareState">SquareState</a></code><a href="#method.cell_state" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#657-659" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the state of a board square by 1D array index</p>
|
||||||
</div><h4 id="method.king_row_idx" class="method"><code>pub fn <a href="#method.king_row_idx" class="fnname">king_row_idx</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.king_row_idx" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#720-725" title="goto source code">[src]</a></h4><div class="docblock"><p>Get row index for current team, top row for black, bottom row for white</p>
|
</div><h4 id="method.apply_move" class="method"><code>pub fn <a href="#method.apply_move" class="fnname">apply_move</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.apply_move" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#662-686" title="goto source code">[src]</a></h4><div class="docblock"><p>Get new board derived from current with given move applied</p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-2" class="impl"><code class="in-band">impl <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-2" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#733-824" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.validate_jumpee" class="method"><code>pub fn <a href="#method.validate_jumpee" class="fnname">validate_jumpee</a>(jumpee: <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a>, from_occ: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.validate_jumpee" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#735-748" title="goto source code">[src]</a></h4><div class="docblock"><p>Unwrap the jumpee piece from the square and <a href="struct.Board.html#method.check_jumpee_team" title="Board::check_jumpee_team"><code>Board::check_jumpee_team</code></a> with <a href="enums/enum.Moveable.html" title="Moveable"><code>Moveable</code></a> response</p>
|
</div><h4 id="method.apply_jump" class="method"><code>pub fn <a href="#method.apply_jump" class="fnname">apply_jump</a>(&self, from: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.apply_jump" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#689-719" title="goto source code">[src]</a></h4><div class="docblock"><p>Get new board derived from current with given jump applied</p>
|
||||||
</div><h4 id="method.check_jumpee_team" class="method"><code>pub fn <a href="#method.check_jumpee_team" class="fnname">check_jumpee_team</a>(from: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a>, jumpee: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.check_jumpee_team" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#751-753" title="goto source code">[src]</a></h4><div class="docblock"><p>Check that the source piece and the jumpee are of opposing teams</p>
|
</div><h4 id="method.king_row_idx" class="method"><code>pub fn <a href="#method.king_row_idx" class="fnname">king_row_idx</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.king_row_idx" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#722-727" title="goto source code">[src]</a></h4><div class="docblock"><p>Get row index for current team, top row for black, bottom row for white</p>
|
||||||
</div><h4 id="method.check_kinged" class="method"><code>fn <a href="#method.check_kinged" class="fnname">check_kinged</a>(new_board: &mut <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>, idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.check_kinged" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#756-769" title="goto source code">[src]</a></h4><div class="docblock"><p>Check and apply king strength</p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-2" class="impl"><code class="in-band">impl <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-2" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#735-826" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.validate_jumpee" class="method"><code>pub fn <a href="#method.validate_jumpee" class="fnname">validate_jumpee</a>(jumpee: <a class="struct" href="struct.Square.html" title="struct draught::board::Square">Square</a>, from_occ: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a>) -> <a class="enum" href="enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.validate_jumpee" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#737-750" title="goto source code">[src]</a></h4><div class="docblock"><p>Unwrap the jumpee piece from the square and <a href="struct.Board.html#method.check_jumpee_team" title="Board::check_jumpee_team"><code>Board::check_jumpee_team</code></a> with <a href="enums/enum.Moveable.html" title="Moveable"><code>Moveable</code></a> response</p>
|
||||||
</div><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, current_turn: <a class="enum" href="enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#773-799" title="goto source code">[src]</a></h4><div class="docblock"><p>Initialise a game board without game pieces</p>
|
</div><h4 id="method.check_jumpee_team" class="method"><code>pub fn <a href="#method.check_jumpee_team" class="fnname">check_jumpee_team</a>(from: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a>, jumpee: <a class="struct" href="struct.Piece.html" title="struct draught::board::Piece">Piece</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.check_jumpee_team" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#753-755" title="goto source code">[src]</a></h4><div class="docblock"><p>Check that the source piece and the jumpee are of opposing teams</p>
|
||||||
</div><h4 id="method.init_game" class="method"><code>pub fn <a href="#method.init_game" class="fnname">init_game</a>(board: <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>, piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.init_game" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#802-823" title="goto source code">[src]</a></h4><div class="docblock"><p>Reset the given board to a starting layout with 3 rows of opposing pieces</p>
|
</div><h4 id="method.check_kinged" class="method"><code>fn <a href="#method.check_kinged" class="fnname">check_kinged</a>(new_board: &mut <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>, idx: <a class="struct" href="struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.check_kinged" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#758-771" title="goto source code">[src]</a></h4><div class="docblock"><p>Check and apply king strength</p>
|
||||||
|
</div><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, current_turn: <a class="enum" href="enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#775-801" title="goto source code">[src]</a></h4><div class="docblock"><p>Initialise a game board without game pieces</p>
|
||||||
|
</div><h4 id="method.init_game" class="method"><code>pub fn <a href="#method.init_game" class="fnname">init_game</a>(board: <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>, piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.init_game" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#804-825" title="goto source code">[src]</a></h4><div class="docblock"><p>Reset the given board to a starting layout with 3 rows of opposing pieces</p>
|
||||||
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||||
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#154" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#826-848" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt-1" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#827-847" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#828-850" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt-1" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#829-849" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CBoard%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CBoard%3E" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#153" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#153" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CBoard%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CBoard%3E" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#153" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#153" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#153" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-1" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/board/mod.rs.html#153" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-1" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
||||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="AI player logic"><meta name="keywords" content="rust, rustlang, rust-lang, comp"><title>draught::comp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="AI player logic"><meta name="keywords" content="rust, rustlang, rust-lang, comp"><title>draught::comp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module comp</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="comp" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module comp</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="comp" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">comp</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#1-377" title="goto source code">[src]</a></span></h1><div class="docblock"><p>AI player logic</p>
|
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">comp</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#1-381" title="goto source code">[src]</a></span></h1><div class="docblock"><p>AI player logic</p>
|
||||||
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="struct" href="struct.BoardNode.html" title="draught::comp::BoardNode struct">BoardNode</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Computer.html" title="draught::comp::Computer struct">Computer</a></td><td class="docblock-short"><p>Root-level structure for managing the game as a collection of board states</p>
|
<table><tr class="module-item"><td><a class="struct" href="struct.BoardNode.html" title="draught::comp::BoardNode struct">BoardNode</a></td><td class="docblock-short"><p>For storing boards in the AI tree, stores board with score for comparisons</p>
|
||||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Move.html" title="draught::comp::Move struct">Move</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Computer.html" title="draught::comp::Computer struct">Computer</a></td><td class="docblock-short"><p>Root-level structure for managing the game as a collection of board states</p>
|
||||||
|
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Move.html" title="draught::comp::Move struct">Move</a></td><td class="docblock-short"><p>Represents a move by source/destination indices and the move type</p>
|
||||||
|
</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||||
<script src="../../main.js"></script></body></html>
|
<script src="../../main.js"></script></body></html>
|
@ -1 +1 @@
|
|||||||
initSidebarItems({"struct":[["BoardNode",""],["Computer","Root-level structure for managing the game as a collection of board states"],["Move",""]]});
|
initSidebarItems({"struct":[["BoardNode","For storing boards in the AI tree, stores board with score for comparisons"],["Computer","Root-level structure for managing the game as a collection of board states"],["Move","Represents a move by source/destination indices and the move type"]]});
|
@ -1,17 +1,18 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BoardNode` struct in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, BoardNode"><title>BoardNode in draught::comp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="For storing boards in the AI tree, stores board with score for comparisons"><meta name="keywords" content="rust, rustlang, rust-lang, BoardNode"><title>BoardNode in draught::comp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct BoardNode</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.board">board</a><a href="#structfield.score">score</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.brd">brd</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CBoardNode%3E">PartialEq<BoardNode></a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a></p><div id="sidebar-vars" data-name="BoardNode" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct BoardNode</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.board">board</a><a href="#structfield.score">score</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.brd">brd</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CBoardNode%3E">PartialEq<BoardNode></a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a></p><div id="sidebar-vars" data-name="BoardNode" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a>::<wbr><a class="struct" href="">BoardNode</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#39-42" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct BoardNode {
|
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a>::<wbr><a class="struct" href="">BoardNode</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#41-44" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct BoardNode {
|
||||||
pub board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
pub board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
||||||
pub score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>,
|
pub score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>,
|
||||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
}</pre></div><div class="docblock"><p>For storing boards in the AI tree, stores board with score for comparisons</p>
|
||||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.score" class="structfield small-section-header"><a href="#structfield.score" class="anchor field"></a><code>score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#44-56" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>, score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#45-49" title="goto source code">[src]</a></h4><h4 id="method.brd" class="method"><code>pub fn <a href="#method.brd" class="fnname">brd</a>(board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#method.brd" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#51-55" title="goto source code">[src]</a></h4></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
</div><h2 id="fields" class="fields small-section-header">
|
||||||
|
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.score" class="structfield small-section-header"><a href="#structfield.score" class="anchor field"></a><code>score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#46-58" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>, score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#47-51" title="goto source code">[src]</a></h4><h4 id="method.brd" class="method"><code>pub fn <a href="#method.brd" class="fnname">brd</a>(board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#method.brd" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#53-57" title="goto source code">[src]</a></h4></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||||
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-PartialEq%3CBoardNode%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-PartialEq%3CBoardNode%3E" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.eq" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-PartialEq%3CBoardNode%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-PartialEq%3CBoardNode%3E" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.eq" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||||
</div><h4 id="method.ne" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
</div><h4 id="method.ne" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||||
</div></div></details><h3 id="impl-Eq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Eq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h3><h3 id="impl-StructuralEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-StructuralEq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h3><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#38" title="goto source code">[src]</a></h3></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
</div></div></details><h3 id="impl-Eq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Eq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h3><h3 id="impl-StructuralEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-StructuralEq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h3><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#40" title="goto source code">[src]</a></h3></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Root-level structure for managing the game as a collection of board states"><meta name="keywords" content="rust, rustlang, rust-lang, Computer"><title>Computer in draught::comp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Root-level structure for managing the game as a collection of board states"><meta name="keywords" content="rust, rustlang, rust-lang, Computer"><title>Computer in draught::comp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Computer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.last_node_count">last_node_count</a><a href="#structfield.search_depth">search_depth</a><a href="#structfield.team">team</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.available_turns">available_turns</a><a href="#method.best_score">best_score</a><a href="#method.expand_layer">expand_layer</a><a href="#method.expand_node">expand_node</a><a href="#method.gen_tree">gen_tree</a><a href="#method.get_leaf_nodes">get_leaf_nodes</a><a href="#method.get_move">get_move</a><a href="#method.get_move_boards">get_move_boards</a><a href="#method.insert_board_scores">insert_board_scores</a><a href="#method.insert_boards">insert_boards</a><a href="#method.new">new</a><a href="#method.propagate_scores">propagate_scores</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a></p><div id="sidebar-vars" data-name="Computer" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Computer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.last_node_count">last_node_count</a><a href="#structfield.search_depth">search_depth</a><a href="#structfield.team">team</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.available_turns">available_turns</a><a href="#method.best_score">best_score</a><a href="#method.expand_layer">expand_layer</a><a href="#method.expand_node">expand_node</a><a href="#method.gen_tree">gen_tree</a><a href="#method.get_leaf_nodes">get_leaf_nodes</a><a href="#method.get_move">get_move</a><a href="#method.get_move_boards">get_move_boards</a><a href="#method.insert_board_scores">insert_board_scores</a><a href="#method.insert_boards">insert_boards</a><a href="#method.new">new</a><a href="#method.propagate_scores">propagate_scores</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a></p><div id="sidebar-vars" data-name="Computer" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a>::<wbr><a class="struct" href="">Computer</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#60-64" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Computer {
|
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">comp</a>::<wbr><a class="struct" href="">Computer</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#62-66" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Computer {
|
||||||
pub search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
pub search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||||
pub team: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>,
|
pub team: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>,
|
||||||
pub last_node_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
pub last_node_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||||
}</pre></div><div class="docblock"><p>Root-level structure for managing the game as a collection of board states</p>
|
}</pre></div><div class="docblock"><p>Root-level structure for managing the game as a collection of board states</p>
|
||||||
</div><h2 id="fields" class="fields small-section-header">
|
</div><h2 id="fields" class="fields small-section-header">
|
||||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.search_depth" class="structfield small-section-header"><a href="#structfield.search_depth" class="anchor field"></a><code>search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.team" class="structfield small-section-header"><a href="#structfield.team" class="anchor field"></a><code>team: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a></code></span><span id="structfield.last_node_count" class="structfield small-section-header"><a href="#structfield.last_node_count" class="anchor field"></a><code>last_node_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#66-377" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, team: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>) -> <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#67-73" title="goto source code">[src]</a></h4><h4 id="method.available_turns" class="method"><code>fn <a href="#method.available_turns" class="fnname">available_turns</a>(&self, board: &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Move.html" title="struct draught::comp::Move">Move</a>></code><a href="#method.available_turns" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#76-129" title="goto source code">[src]</a></h4><div class="docblock"><p>Get vector of available moves for a given board</p>
|
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.search_depth" class="structfield small-section-header"><a href="#structfield.search_depth" class="anchor field"></a><code>search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.team" class="structfield small-section-header"><a href="#structfield.team" class="anchor field"></a><code>team: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a></code></span><span id="structfield.last_node_count" class="structfield small-section-header"><a href="#structfield.last_node_count" class="anchor field"></a><code>last_node_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#68-381" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, team: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>) -> <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#69-75" title="goto source code">[src]</a></h4><h4 id="method.available_turns" class="method"><code>fn <a href="#method.available_turns" class="fnname">available_turns</a>(&self, board: &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Move.html" title="struct draught::comp::Move">Move</a>></code><a href="#method.available_turns" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#78-131" title="goto source code">[src]</a></h4><div class="docblock"><p>Get vector of available moves for a given board</p>
|
||||||
</div><h4 id="method.gen_tree" class="method"><code>fn <a href="#method.gen_tree" class="fnname">gen_tree</a>(&mut self, tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> NodeId</code><a href="#method.gen_tree" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#132-148" title="goto source code">[src]</a></h4><div class="docblock"><p>Generate tree of boards to given search depth, return root node</p>
|
</div><h4 id="method.gen_tree" class="method"><code>fn <a href="#method.gen_tree" class="fnname">gen_tree</a>(&mut self, tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> NodeId</code><a href="#method.gen_tree" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#134-150" title="goto source code">[src]</a></h4><div class="docblock"><p>Generate tree of boards to given search depth, return root node</p>
|
||||||
</div><h4 id="method.propagate_scores" class="method"><code>fn <a href="#method.propagate_scores" class="fnname">propagate_scores</a>(<br> &mut self, <br> tree: Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> root: NodeId<br>) -> Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>></code><a href="#method.propagate_scores" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#151-193" title="goto source code">[src]</a></h4><div class="docblock"><p>Propagate scores up the tree employing MiniMax algorithm</p>
|
</div><h4 id="method.propagate_scores" class="method"><code>fn <a href="#method.propagate_scores" class="fnname">propagate_scores</a>(tree: Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, root: NodeId) -> Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>></code><a href="#method.propagate_scores" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#153-195" title="goto source code">[src]</a></h4><div class="docblock"><p>Propagate scores up the tree employing MiniMax algorithm</p>
|
||||||
</div><h4 id="method.best_score" class="method"><code>fn <a href="#method.best_score" class="fnname">best_score</a>(board: &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>, children_scores: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href="#method.best_score" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#195-207" title="goto source code">[src]</a></h4><h4 id="method.insert_board_scores" class="method"><code>fn <a href="#method.insert_board_scores" class="fnname">insert_board_scores</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> nodes: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId><br>)</code><a href="#method.insert_board_scores" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#211-223" title="goto source code">[src]</a></h4><div class="docblock"><p>For given NodeIDs, insert score of board into tree
|
</div><h4 id="method.best_score" class="method"><code>fn <a href="#method.best_score" class="fnname">best_score</a>(board: &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>, children_scores: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href="#method.best_score" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#198-210" title="goto source code">[src]</a></h4><div class="docblock"><p>Get best of given scores for given team</p>
|
||||||
|
</div><h4 id="method.insert_board_scores" class="method"><code>fn <a href="#method.insert_board_scores" class="fnname">insert_board_scores</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> nodes: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId><br>)</code><a href="#method.insert_board_scores" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#214-226" title="goto source code">[src]</a></h4><div class="docblock"><p>For given NodeIDs, insert score of board into tree
|
||||||
Used for leaf nodes ready for propagating up tree</p>
|
Used for leaf nodes ready for propagating up tree</p>
|
||||||
</div><h4 id="method.get_leaf_nodes" class="method"><code>fn <a href="#method.get_leaf_nodes" class="fnname">get_leaf_nodes</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> root: NodeId<br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.get_leaf_nodes" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#226-244" title="goto source code">[src]</a></h4><div class="docblock"><p>Traverse tree from given root ID and get NodeIDs of leaf nodes (those without children)</p>
|
</div><h4 id="method.get_leaf_nodes" class="method"><code>fn <a href="#method.get_leaf_nodes" class="fnname">get_leaf_nodes</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> root: NodeId<br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.get_leaf_nodes" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#229-247" title="goto source code">[src]</a></h4><div class="docblock"><p>Traverse tree from given root ID and get NodeIDs of leaf nodes (those without children)</p>
|
||||||
</div><h4 id="method.expand_layer" class="method"><code>fn <a href="#method.expand_layer" class="fnname">expand_layer</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> nodes: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.expand_layer" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#247-254" title="goto source code">[src]</a></h4><div class="docblock"><p>Expand all given nodes and return newly inserted layer of nodes</p>
|
</div><h4 id="method.expand_layer" class="method"><code>fn <a href="#method.expand_layer" class="fnname">expand_layer</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> nodes: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.expand_layer" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#250-257" title="goto source code">[src]</a></h4><div class="docblock"><p>Expand all given nodes and return newly inserted layer of nodes</p>
|
||||||
</div><h4 id="method.expand_node" class="method"><code>fn <a href="#method.expand_node" class="fnname">expand_node</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> node: NodeId<br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.expand_node" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#257-279" title="goto source code">[src]</a></h4><div class="docblock"><p>Insert all possible next boards as children of given board node</p>
|
</div><h4 id="method.expand_node" class="method"><code>fn <a href="#method.expand_node" class="fnname">expand_node</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> node: NodeId<br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.expand_node" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#260-282" title="goto source code">[src]</a></h4><div class="docblock"><p>Insert all possible next boards as children of given board node</p>
|
||||||
</div><h4 id="method.insert_boards" class="method"><code>fn <a href="#method.insert_boards" class="fnname">insert_boards</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.insert_boards" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#282-288" title="goto source code">[src]</a></h4><div class="docblock"><p>Insert given boards into tree</p>
|
</div><h4 id="method.insert_boards" class="method"><code>fn <a href="#method.insert_boards" class="fnname">insert_boards</a>(<br> &mut self, <br> tree: &mut Arena<<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>>, <br> boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><NodeId></code><a href="#method.insert_boards" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#285-291" title="goto source code">[src]</a></h4><div class="docblock"><p>Insert given boards into tree</p>
|
||||||
</div><h4 id="method.get_move_boards" class="method"><code>fn <a href="#method.get_move_boards" class="fnname">get_move_boards</a>(&self, board: &<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>></code><a href="#method.get_move_boards" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#291-306" title="goto source code">[src]</a></h4><div class="docblock"><p>Get all possible next boards from given board</p>
|
</div><h4 id="method.get_move_boards" class="method"><code>fn <a href="#method.get_move_boards" class="fnname">get_move_boards</a>(&self, board: &<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.BoardNode.html" title="struct draught::comp::BoardNode">BoardNode</a>></code><a href="#method.get_move_boards" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#294-309" title="goto source code">[src]</a></h4><div class="docblock"><p>Get all possible next boards from given board</p>
|
||||||
</div><h4 id="method.get_move" class="method"><code>pub fn <a href="#method.get_move" class="fnname">get_move</a>(&mut self, brd: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>></code><a href="#method.get_move" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#308-376" title="goto source code">[src]</a></h4></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#59" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#59" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
</div><h4 id="method.get_move" class="method"><code>pub fn <a href="#method.get_move" class="fnname">get_move</a>(&mut self, brd: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>></code><a href="#method.get_move" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#312-380" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a new board based on the given using MiniMax to make decisions </p>
|
||||||
|
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#61" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/comp/mod.rs.html#61" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
</div></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Computer.html" title="struct draught::comp::Computer">Computer</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `__wasm_bindgen_generated_init_wasm` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, __wasm_bindgen_generated_init_wasm"><title>__wasm_bindgen_generated_init_wasm in draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `__wasm_bindgen_generated_init_wasm` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, __wasm_bindgen_generated_init_wasm"><title>__wasm_bindgen_generated_init_wasm in draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="__wasm_bindgen_generated_init_wasm" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="__wasm_bindgen_generated_init_wasm" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">__wasm_bindgen_generated_init_wasm</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#34" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub extern "C" fn __wasm_bindgen_generated_init_wasm(<br>) -> <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a> as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">__wasm_bindgen_generated_init_wasm</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#33" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub extern "C" fn __wasm_bindgen_generated_init_wasm(<br>) -> <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a> as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||||
<script src="../main.js"></script></body></html>
|
<script src="../main.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `init_wasm` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, init_wasm"><title>init_wasm in draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `init_wasm` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, init_wasm"><title>init_wasm in draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="init_wasm" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="init_wasm" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">init_wasm</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#35-38" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn init_wasm()</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">init_wasm</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#34-37" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn init_wasm()</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||||
<script src="../main.js"></script></body></html>
|
<script src="../main.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Top-level object for managing [`Board`]s, applying and managing turns"><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>draught::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Top-level object for managing [`Board`]s, applying and managing turns"><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>draught::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="game" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="game" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">game</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#1-204" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Top-level object for managing <a href="../board/struct.Board.html" title="Board"><code>Board</code></a>s, applying and managing turns</p>
|
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">game</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#1-234" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Top-level object for managing <a href="../board/struct.Board.html" title="Board"><code>Board</code></a>s, applying and managing turns</p>
|
||||||
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="struct" href="struct.Game.html" title="draught::game::Game struct">Game</a></td><td class="docblock-short"><p>Root-level structure for managing the game as a collection of board states</p>
|
<table><tr class="module-item"><td><a class="struct" href="struct.Game.html" title="draught::game::Game struct">Game</a></td><td class="docblock-short"><p>Root-level structure for managing the game as a collection of board states</p>
|
||||||
</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Root-level structure for managing the game as a collection of board states"><meta name="keywords" content="rust, rustlang, rust-lang, Game"><title>Game in draught::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Root-level structure for managing the game as a collection of board states"><meta name="keywords" content="rust, rustlang, rust-lang, Game"><title>Game in draught::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Game</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.current">current</a><a href="#structfield.last_node_count">last_node_count</a><a href="#structfield.painter">painter</a><a href="#structfield.previous_boards">previous_boards</a><a href="#structfield.search_depth">search_depth</a><a href="#structfield.selected_piece">selected_piece</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.ai_move">ai_move</a><a href="#method.clear_selected">clear_selected</a><a href="#method.current_board">current_board</a><a href="#method.current_board_cells">current_board_cells</a><a href="#method.current_board_len">current_board_len</a><a href="#method.current_cell_state">current_cell_state</a><a href="#method.current_turn">current_turn</a><a href="#method.draw">draw</a><a href="#method.execute_jump">execute_jump</a><a href="#method.execute_move">execute_move</a><a href="#method.make_move">make_move</a><a href="#method.new">new</a><a href="#method.new_with_canvas">new_with_canvas</a><a href="#method.previous_board">previous_board</a><a href="#method.push_new_board">push_new_board</a><a href="#method.score">score</a><a href="#method.set_current">set_current</a><a href="#method.set_painter">set_painter</a><a href="#method.set_search_depth">set_search_depth</a><a href="#method.set_selected">set_selected</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-From%3CGame%3E">From<Game></a><a href="#impl-FromWasmAbi">FromWasmAbi</a><a href="#impl-IntoWasmAbi">IntoWasmAbi</a><a href="#impl-OptionFromWasmAbi">OptionFromWasmAbi</a><a href="#impl-OptionIntoWasmAbi">OptionIntoWasmAbi</a><a href="#impl-RefFromWasmAbi">RefFromWasmAbi</a><a href="#impl-RefMutFromWasmAbi">RefMutFromWasmAbi</a><a href="#impl-WasmDescribe">WasmDescribe</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">game</a></p><div id="sidebar-vars" data-name="Game" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Game</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.current">current</a><a href="#structfield.last_node_count">last_node_count</a><a href="#structfield.painter">painter</a><a href="#structfield.previous_boards">previous_boards</a><a href="#structfield.search_depth">search_depth</a><a href="#structfield.selected_piece">selected_piece</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.ai_move">ai_move</a><a href="#method.clear_selected">clear_selected</a><a href="#method.current_board">current_board</a><a href="#method.current_board_cells">current_board_cells</a><a href="#method.current_board_len">current_board_len</a><a href="#method.current_cell_state">current_cell_state</a><a href="#method.current_turn">current_turn</a><a href="#method.draw">draw</a><a href="#method.execute_jump">execute_jump</a><a href="#method.execute_move">execute_move</a><a href="#method.has_won">has_won</a><a href="#method.make_move">make_move</a><a href="#method.new">new</a><a href="#method.new_with_canvas">new_with_canvas</a><a href="#method.previous_board">previous_board</a><a href="#method.push_new_board">push_new_board</a><a href="#method.score">score</a><a href="#method.set_current">set_current</a><a href="#method.set_painter">set_painter</a><a href="#method.set_search_depth">set_search_depth</a><a href="#method.set_selected">set_selected</a><a href="#method.winning">winning</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-From%3CGame%3E">From<Game></a><a href="#impl-FromWasmAbi">FromWasmAbi</a><a href="#impl-IntoWasmAbi">IntoWasmAbi</a><a href="#impl-OptionFromWasmAbi">OptionFromWasmAbi</a><a href="#impl-OptionIntoWasmAbi">OptionIntoWasmAbi</a><a href="#impl-RefFromWasmAbi">RefFromWasmAbi</a><a href="#impl-RefMutFromWasmAbi">RefMutFromWasmAbi</a><a href="#impl-WasmDescribe">WasmDescribe</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">game</a></p><div id="sidebar-vars" data-name="Game" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">game</a>::<wbr><a class="struct" href="">Game</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#25-32" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Game {
|
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">game</a>::<wbr><a class="struct" href="">Game</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#25-32" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Game {
|
||||||
current: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
current: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
||||||
selected_piece: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>>,
|
selected_piece: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>>,
|
||||||
@ -12,21 +12,28 @@
|
|||||||
</div><h2 id="fields" class="fields small-section-header">
|
</div><h2 id="fields" class="fields small-section-header">
|
||||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.current" class="structfield small-section-header"><a href="#structfield.current" class="anchor field"></a><code>current: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.selected_piece" class="structfield small-section-header"><a href="#structfield.selected_piece" class="anchor field"></a><code>selected_piece: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>></code></span><span id="structfield.previous_boards" class="structfield small-section-header"><a href="#structfield.previous_boards" class="anchor field"></a><code>previous_boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>></code></span><span id="structfield.painter" class="structfield small-section-header"><a href="#structfield.painter" class="anchor field"></a><code>painter: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>></code></span><span id="structfield.search_depth" class="structfield small-section-header"><a href="#structfield.search_depth" class="anchor field"></a><code>search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.last_node_count" class="structfield small-section-header"><a href="#structfield.last_node_count" class="anchor field"></a><code>last_node_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#34-44" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.previous_board" class="method"><code>pub fn <a href="#method.previous_board" class="fnname">previous_board</a>(&self, turn: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.previous_board" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#36-38" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a read-only copy of a previous turn’s board</p>
|
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.current" class="structfield small-section-header"><a href="#structfield.current" class="anchor field"></a><code>current: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.selected_piece" class="structfield small-section-header"><a href="#structfield.selected_piece" class="anchor field"></a><code>selected_piece: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>></code></span><span id="structfield.previous_boards" class="structfield small-section-header"><a href="#structfield.previous_boards" class="anchor field"></a><code>previous_boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>></code></span><span id="structfield.painter" class="structfield small-section-header"><a href="#structfield.painter" class="anchor field"></a><code>painter: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>></code></span><span id="structfield.search_depth" class="structfield small-section-header"><a href="#structfield.search_depth" class="anchor field"></a><code>search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.last_node_count" class="structfield small-section-header"><a href="#structfield.last_node_count" class="anchor field"></a><code>last_node_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#34-44" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.previous_board" class="method"><code>pub fn <a href="#method.previous_board" class="fnname">previous_board</a>(&self, turn: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.previous_board" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#36-38" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a read-only copy of a previous turn’s board</p>
|
||||||
</div><h4 id="method.current_board" class="method"><code>pub fn <a href="#method.current_board" class="fnname">current_board</a>(&self) -> &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.current_board" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#41-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Set current board to given</p>
|
</div><h4 id="method.current_board" class="method"><code>pub fn <a href="#method.current_board" class="fnname">current_board</a>(&self) -> &<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a></code><a href="#method.current_board" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#41-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Set current board to given</p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#47-198" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.current_board_cells" class="method"><code>pub fn <a href="#method.current_board_cells" class="fnname">current_board_cells</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="struct" href="../board/struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.current_board_cells" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#49-51" title="goto source code">[src]</a></h4><div class="docblock"><p>Get pointer to current board’s squares</p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#47-228" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.current_board_cells" class="method"><code>pub fn <a href="#method.current_board_cells" class="fnname">current_board_cells</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="struct" href="../board/struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.current_board_cells" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#49-51" title="goto source code">[src]</a></h4><div class="docblock"><p>Get pointer to current board’s squares</p>
|
||||||
</div><h4 id="method.current_board_len" class="method"><code>pub fn <a href="#method.current_board_len" class="fnname">current_board_len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.current_board_len" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#54-56" title="goto source code">[src]</a></h4><div class="docblock"><p>Get pointer to current board’s squares</p>
|
</div><h4 id="method.current_board_len" class="method"><code>pub fn <a href="#method.current_board_len" class="fnname">current_board_len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href="#method.current_board_len" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#54-56" title="goto source code">[src]</a></h4><div class="docblock"><p>Get pointer to current board’s squares</p>
|
||||||
</div><h4 id="method.current_turn" class="method"><code>pub fn <a href="#method.current_turn" class="fnname">current_turn</a>(&self) -> <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a></code><a href="#method.current_turn" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#59-61" title="goto source code">[src]</a></h4><div class="docblock"><p>Current turn’s team</p>
|
</div><h4 id="method.current_turn" class="method"><code>pub fn <a href="#method.current_turn" class="fnname">current_turn</a>(&self) -> <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a></code><a href="#method.current_turn" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#59-61" title="goto source code">[src]</a></h4><div class="docblock"><p>Current turn’s team</p>
|
||||||
</div><h4 id="method.score" class="method"><code>pub fn <a href="#method.score" class="fnname">score</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href="#method.score" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#64-66" title="goto source code">[src]</a></h4><div class="docblock"><p>Current board’s score</p>
|
</div><h4 id="method.score" class="method"><code>pub fn <a href="#method.score" class="fnname">score</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href="#method.score" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#64-66" title="goto source code">[src]</a></h4><div class="docblock"><p>Current board’s score</p>
|
||||||
</div><h4 id="method.current_cell_state" class="method"><code>pub fn <a href="#method.current_cell_state" class="fnname">current_cell_state</a>(&self, idx: &<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="../board/struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.current_cell_state" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#69-71" title="goto source code">[src]</a></h4><div class="docblock"><p>Get square on current board for given index</p>
|
</div><h4 id="method.winning" class="method"><code>pub fn <a href="#method.winning" class="fnname">winning</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>></code><a href="#method.winning" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#69-79" title="goto source code">[src]</a></h4><div class="docblock"><p>Get currently winning player</p>
|
||||||
</div><h4 id="method.set_search_depth" class="method"><code>pub fn <a href="#method.set_search_depth" class="fnname">set_search_depth</a>(&mut self, search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><a href="#method.set_search_depth" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#73-75" title="goto source code">[src]</a></h4><h4 id="method.set_selected" class="method"><code>pub fn <a href="#method.set_selected" class="fnname">set_selected</a>(&mut self, idx: &<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.set_selected" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#79-90" title="goto source code">[src]</a></h4><div class="docblock"><p>Set given index as selected piece
|
</div><h4 id="method.has_won" class="method"><code>pub fn <a href="#method.has_won" class="fnname">has_won</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>></code><a href="#method.has_won" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#82-91" title="goto source code">[src]</a></h4><div class="docblock"><p>Check if a player has won</p>
|
||||||
|
</div><h4 id="method.current_cell_state" class="method"><code>pub fn <a href="#method.current_cell_state" class="fnname">current_cell_state</a>(&self, idx: &<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="struct" href="../board/struct.Square.html" title="struct draught::board::Square">Square</a></code><a href="#method.current_cell_state" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#94-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Get square on current board for given index</p>
|
||||||
|
</div><h4 id="method.set_search_depth" class="method"><code>pub fn <a href="#method.set_search_depth" class="fnname">set_search_depth</a>(&mut self, search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><a href="#method.set_search_depth" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#98-100" title="goto source code">[src]</a></h4><h4 id="method.set_selected" class="method"><code>pub fn <a href="#method.set_selected" class="fnname">set_selected</a>(&mut self, idx: &<a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.set_selected" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#104-115" title="goto source code">[src]</a></h4><div class="docblock"><p>Set given index as selected piece
|
||||||
TODO: Check whether valid square?</p>
|
TODO: Check whether valid square?</p>
|
||||||
</div><h4 id="method.clear_selected" class="method"><code>pub fn <a href="#method.clear_selected" class="fnname">clear_selected</a>(&mut self)</code><a href="#method.clear_selected" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#93-99" title="goto source code">[src]</a></h4><div class="docblock"><p>Clear currently selected piece</p>
|
</div><h4 id="method.clear_selected" class="method"><code>pub fn <a href="#method.clear_selected" class="fnname">clear_selected</a>(&mut self)</code><a href="#method.clear_selected" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#118-124" title="goto source code">[src]</a></h4><div class="docblock"><p>Clear currently selected piece</p>
|
||||||
</div><h4 id="method.make_move" class="method"><code>pub fn <a href="#method.make_move" class="fnname">make_move</a>(&mut self, from: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="enum" href="../board/enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.make_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#102-121" title="goto source code">[src]</a></h4><div class="docblock"><p>Attempt to make a move given a source and destination index</p>
|
</div><h4 id="method.make_move" class="method"><code>pub fn <a href="#method.make_move" class="fnname">make_move</a>(&mut self, from: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>) -> <a class="enum" href="../board/enums/enum.Moveable.html" title="enum draught::board::enums::Moveable">Moveable</a></code><a href="#method.make_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#127-146" title="goto source code">[src]</a></h4><div class="docblock"><p>Attempt to make a move given a source and destination index</p>
|
||||||
</div><h4 id="method.execute_move" class="method"><code>pub fn <a href="#method.execute_move" class="fnname">execute_move</a>(&mut self, from: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.execute_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#124-127" title="goto source code">[src]</a></h4><div class="docblock"><p>Update board state with given move and push new board into current state</p>
|
</div><h4 id="method.execute_move" class="method"><code>pub fn <a href="#method.execute_move" class="fnname">execute_move</a>(&mut self, from: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.execute_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#149-152" title="goto source code">[src]</a></h4><div class="docblock"><p>Update board state with given move and push new board into current state</p>
|
||||||
</div><h4 id="method.execute_jump" class="method"><code>pub fn <a href="#method.execute_jump" class="fnname">execute_jump</a>(&mut self, from: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.execute_jump" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#130-133" title="goto source code">[src]</a></h4><div class="docblock"><p>Update board state with given jump move and push new board into current state</p>
|
</div><h4 id="method.execute_jump" class="method"><code>pub fn <a href="#method.execute_jump" class="fnname">execute_jump</a>(&mut self, from: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a href="#method.execute_jump" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#155-158" title="goto source code">[src]</a></h4><div class="docblock"><p>Update board state with given jump move and push new board into current state</p>
|
||||||
</div><h4 id="method.push_new_board" class="method"><code>pub fn <a href="#method.push_new_board" class="fnname">push_new_board</a>(&mut self, board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>)</code><a href="#method.push_new_board" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#136-139" title="goto source code">[src]</a></h4><div class="docblock"><p>Push current board into the previous turns and set given board to current</p>
|
</div><h4 id="method.push_new_board" class="method"><code>pub fn <a href="#method.push_new_board" class="fnname">push_new_board</a>(&mut self, board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>)</code><a href="#method.push_new_board" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#161-164" title="goto source code">[src]</a></h4><div class="docblock"><p>Push current board into the previous turns and set given board to current</p>
|
||||||
</div><h4 id="method.set_current" class="method"><code>pub fn <a href="#method.set_current" class="fnname">set_current</a>(&mut self, board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>)</code><a href="#method.set_current" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#142-144" title="goto source code">[src]</a></h4><div class="docblock"><p>Set current board to given</p>
|
</div><h4 id="method.set_current" class="method"><code>pub fn <a href="#method.set_current" class="fnname">set_current</a>(&mut self, board: <a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>)</code><a href="#method.set_current" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#167-169" title="goto source code">[src]</a></h4><div class="docblock"><p>Set current board to given</p>
|
||||||
</div><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>, <br> search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#147-158" title="goto source code">[src]</a></h4><h4 id="method.new_with_canvas" class="method"><code>pub fn <a href="#method.new_with_canvas" class="fnname">new_with_canvas</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>, <br> search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> canvas_id: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> canvas_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> canvas_height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><br>) -> <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#method.new_with_canvas" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#160-173" title="goto source code">[src]</a></h4><h4 id="method.set_painter" class="method"><code>pub fn <a href="#method.set_painter" class="fnname">set_painter</a>(&mut self, value: <a class="struct" href="../paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>)</code><a href="#method.set_painter" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#175-177" title="goto source code">[src]</a></h4><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(&self)</code><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#179-184" title="goto source code">[src]</a></h4><h4 id="method.ai_move" class="method"><code>pub fn <a href="#method.ai_move" class="fnname">ai_move</a>(&mut self)</code><a href="#method.ai_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#186-197" title="goto source code">[src]</a></h4></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#24" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#24" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
</div><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>, <br> search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#173-184" title="goto source code">[src]</a></h4><div class="docblock"><p>Get new game without board renderer</p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#200-204" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt-1" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#201-203" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
</div><h4 id="method.new_with_canvas" class="method"><code>pub fn <a href="#method.new_with_canvas" class="fnname">new_with_canvas</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>, <br> search_depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> canvas_id: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> canvas_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> canvas_height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><br>) -> <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#method.new_with_canvas" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#187-200" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a new game with canvas ID and dimensions</p>
|
||||||
|
</div><h4 id="method.set_painter" class="method"><code>pub fn <a href="#method.set_painter" class="fnname">set_painter</a>(&mut self, value: <a class="struct" href="../paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>)</code><a href="#method.set_painter" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#203-205" title="goto source code">[src]</a></h4><div class="docblock"><p>Set painter for rendering boards</p>
|
||||||
|
</div><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(&self)</code><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#208-213" title="goto source code">[src]</a></h4><div class="docblock"><p>Draw current board using painter if exists</p>
|
||||||
|
</div><h4 id="method.ai_move" class="method"><code>pub fn <a href="#method.ai_move" class="fnname">ai_move</a>(&mut self)</code><a href="#method.ai_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#216-227" title="goto source code">[src]</a></h4><div class="docblock"><p>Create computer, get move from current board and update current board</p>
|
||||||
|
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#24" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#24" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||||
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#230-234" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt-1" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt-1" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#231-233" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CGame%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CGame%3E" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#23" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>) -> Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#23" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CGame%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CGame%3E" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#23" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>) -> Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#23" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#23" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-1" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#23" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-1" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
||||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Draught"><meta name="keywords" content="rust, rustlang, rust-lang, draught"><title>draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Draught"><meta name="keywords" content="rust, rustlang, rust-lang, draught"><title>draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate draught</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all draught's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="draught" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate draught</p><div class="block version"><p>Version 1.0.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all draught's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="draught" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">draught</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#1-38" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Draught</p>
|
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">draught</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#1-37" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Draught</p>
|
||||||
<p>An implementation of checkers/draughts in Rust WebAssembly with a minimax AI player</p>
|
<p>An implementation of checkers/draughts in Rust WebAssembly with a minimax AI player</p>
|
||||||
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||||
<table><tr class="import-item"><td><code>pub use board::<a class="struct" href="board/struct.Board.html" title="struct draught::board::Board">Board</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use game::<a class="struct" href="game/struct.Game.html" title="struct draught::game::Game">Game</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use comp::<a class="struct" href="comp/struct.Computer.html" title="struct draught::comp::Computer">Computer</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use paint::<a class="struct" href="paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>;</code></td><td class="docblock-short"></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
<table><tr class="import-item"><td><code>pub use board::<a class="struct" href="board/struct.Board.html" title="struct draught::board::Board">Board</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use game::<a class="struct" href="game/struct.Game.html" title="struct draught::game::Game">Game</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use comp::<a class="struct" href="comp/struct.Computer.html" title="struct draught::comp::Computer">Computer</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use paint::<a class="struct" href="paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>;</code></td><td class="docblock-short"></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||||
@ -9,7 +9,7 @@
|
|||||||
</td></tr><tr class="module-item"><td><a class="mod" href="comp/index.html" title="draught::comp mod">comp</a></td><td class="docblock-short"><p>AI player logic</p>
|
</td></tr><tr class="module-item"><td><a class="mod" href="comp/index.html" title="draught::comp mod">comp</a></td><td class="docblock-short"><p>AI player logic</p>
|
||||||
</td></tr><tr class="module-item"><td><a class="mod" href="game/index.html" title="draught::game mod">game</a></td><td class="docblock-short"><p>Top-level object for managing <a href="board/struct.Board.html" title="Board"><code>Board</code></a>s, applying and managing turns</p>
|
</td></tr><tr class="module-item"><td><a class="mod" href="game/index.html" title="draught::game mod">game</a></td><td class="docblock-short"><p>Top-level object for managing <a href="board/struct.Board.html" title="Board"><code>Board</code></a>s, applying and managing turns</p>
|
||||||
</td></tr><tr class="module-item"><td><a class="mod" href="paint/index.html" title="draught::paint mod">paint</a></td><td class="docblock-short"><p>Components for painting board states onto HTML canvases</p>
|
</td></tr><tr class="module-item"><td><a class="mod" href="paint/index.html" title="draught::paint mod">paint</a></td><td class="docblock-short"><p>Components for painting board states onto HTML canvases</p>
|
||||||
</td></tr><tr class="module-item"><td><a class="mod" href="player/index.html" title="draught::player mod">player</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="utils/index.html" title="draught::utils mod">utils</a></td><td class="docblock-short"></td></tr></table><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2>
|
</td></tr><tr class="module-item"><td><a class="mod" href="utils/index.html" title="draught::utils mod">utils</a></td><td class="docblock-short"></td></tr></table><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="macro" href="macro.log.html" title="draught::log macro">log</a></td><td class="docblock-short"><p>Wrap the <a href="https://docs.rs/web-sys/0.3/web_sys/index.html" title="web_sys"><code>web_sys</code></a> access to the browser console in a macro for easy logging</p>
|
<table><tr class="module-item"><td><a class="macro" href="macro.log.html" title="draught::log macro">log</a></td><td class="docblock-short"><p>Wrap the <a href="https://docs.rs/web-sys/0.3/web_sys/index.html" title="web_sys"><code>web_sys</code></a> access to the browser console in a macro for easy logging</p>
|
||||||
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||||
<table><tr class="module-item"><td><a class="fn" href="fn.__wasm_bindgen_generated_init_wasm.html" title="draught::__wasm_bindgen_generated_init_wasm fn">__wasm_bindgen_generated_init_wasm</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.init_wasm.html" title="draught::init_wasm fn">init_wasm</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
<table><tr class="module-item"><td><a class="fn" href="fn.__wasm_bindgen_generated_init_wasm.html" title="draught::__wasm_bindgen_generated_init_wasm fn">__wasm_bindgen_generated_init_wasm</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.init_wasm.html" title="draught::init_wasm fn">init_wasm</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Wrap the [`web_sys`] access to the browser console in a macro for easy logging"><meta name="keywords" content="rust, rustlang, rust-lang, log"><title>log in draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Wrap the [`web_sys`] access to the browser console in a macro for easy logging"><meta name="keywords" content="rust, rustlang, rust-lang, log"><title>log in draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="log" data-ty="macro" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="log" data-ty="macro" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">draught</a>::<wbr><a class="macro" href="">log</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#28-32" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><div class="example-wrap"><pre class="rust macro">
|
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">draught</a>::<wbr><a class="macro" href="">log</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#27-31" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><div class="example-wrap"><pre class="rust macro">
|
||||||
<span class="macro">macro_rules!</span> <span class="ident">log</span> {
|
<span class="macro">macro_rules!</span> <span class="ident">log</span> {
|
||||||
( $( <span class="macro-nonterminal">$</span><span class="macro-nonterminal">t</span>:<span class="ident">tt</span> )<span class="op">*</span> ) <span class="op">=</span><span class="op">></span> { ... };
|
( $( <span class="macro-nonterminal">$</span><span class="macro-nonterminal">t</span>:<span class="ident">tt</span> )<span class="op">*</span> ) <span class="op">=</span><span class="op">></span> { ... };
|
||||||
}</pre></div>
|
}</pre></div>
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `player` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, player"><title>draught::player - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module player</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="player" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">player</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/player.rs.html#1-8" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
|
||||||
<table><tr class="module-item"><td><a class="struct" href="struct.Player.html" title="draught::player::Player struct">Player</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
|
||||||
<script src="../../main.js"></script></body></html>
|
|
@ -1 +0,0 @@
|
|||||||
initSidebarItems({"struct":[["Player",""]]});
|
|
@ -1,48 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Player` struct in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, Player"><title>Player in draught::player - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Player</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.score">score</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CPlayer%3E">From<Player></a><a href="#impl-FromWasmAbi">FromWasmAbi</a><a href="#impl-IntoWasmAbi">IntoWasmAbi</a><a href="#impl-OptionFromWasmAbi">OptionFromWasmAbi</a><a href="#impl-OptionIntoWasmAbi">OptionIntoWasmAbi</a><a href="#impl-RefFromWasmAbi">RefFromWasmAbi</a><a href="#impl-RefMutFromWasmAbi">RefMutFromWasmAbi</a><a href="#impl-WasmDescribe">WasmDescribe</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">player</a></p><div id="sidebar-vars" data-name="Player" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">player</a>::<wbr><a class="struct" href="">Player</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/player.rs.html#6-8" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Player {
|
|
||||||
score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
|
||||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
|
||||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.score" class="structfield small-section-header"><a href="#structfield.score" class="anchor field"></a><code>score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#5" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#5" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
|
||||||
</div><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CPlayer%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CPlayer%3E" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a>) -> Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-1" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
|
||||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
|
||||||
</div><h4 id="method.from_abi" class="method hidden trait-impl"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi" class="fnname">from_abi</a>(js: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</code><a href="#method.from_abi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-IntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-IntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-2" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-2" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type that this converts into when crossing the ABI
|
|
||||||
boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
|
||||||
</div><h4 id="method.into_abi" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi" class="fnname">into_abi</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#method.into_abi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Convert <code>self</code> into <code>Self::Abi</code> so that it can be sent across the wasm
|
|
||||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-OptionFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionFromWasmAbi">OptionFromWasmAbi</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-OptionFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.is_none" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none" class="fnname">is_none</a>(abi: &Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::FromWasmAbi::Abi">Abi</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.is_none" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Tests whether the argument is a “none” instance. If so it will be
|
|
||||||
deserialized as <code>None</code>, and otherwise it will be passed to
|
|
||||||
<code>FromWasmAbi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-OptionIntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionIntoWasmAbi">OptionIntoWasmAbi</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-OptionIntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.none" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none" class="fnname">none</a>() -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code><a href="#method.none" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns an ABI instance indicating “none”, which JS will interpret as
|
|
||||||
the <code>None</code> branch of this option. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-RefFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefFromWasmAbi">RefFromWasmAbi</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-RefFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi" class="anchor"></a></h4><div class='docblock'><p>The wasm ABI type references to <code>Self</code> are recovered from.</p>
|
|
||||||
</div><h4 id="associatedtype.Anchor" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" class="type">Anchor</a> = <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/__rt/struct.Ref.html" title="struct wasm_bindgen::__rt::Ref">Ref</a><'static, <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a>></code><a href="#associatedtype.Anchor" class="anchor"></a></h4><div class='docblock'><p>The type that holds the reference to <code>Self</code> for the duration of the
|
|
||||||
invocation of the function that has an <code>&Self</code> parameter. This is
|
|
||||||
required to ensure that the lifetimes don’t persist beyond one function
|
|
||||||
call, and so that they remain anonymous. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor">Read more</a></p>
|
|
||||||
</div><h4 id="method.ref_from_abi" class="method hidden trait-impl"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi" class="fnname">ref_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Anchor">Anchor</a></code><a href="#method.ref_from_abi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self::Anchor</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-RefMutFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefMutFromWasmAbi">RefMutFromWasmAbi</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-RefMutFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-3" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href="#associatedtype.Abi-3" class="anchor"></a></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Abi</code></p>
|
|
||||||
</div><h4 id="associatedtype.Anchor-1" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" class="type">Anchor</a> = <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/__rt/struct.RefMut.html" title="struct wasm_bindgen::__rt::RefMut">RefMut</a><'static, <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a>></code><a href="#associatedtype.Anchor-1" class="anchor"></a></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Anchor</code></p>
|
|
||||||
</div><h4 id="method.ref_mut_from_abi" class="method hidden trait-impl"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#tymethod.ref_mut_from_abi" class="fnname">ref_mut_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Anchor">Anchor</a></code><a href="#method.ref_mut_from_abi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>RefFromWasmAbi::ref_from_abi</code></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-WasmDescribe" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html" title="trait wasm_bindgen::describe::WasmDescribe">WasmDescribe</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-WasmDescribe" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.describe" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html#tymethod.describe" class="fnname">describe</a>()</code><a href="#method.describe" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from-1" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a href="#method.from-1" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.into" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-ReturnWasmAbi" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a>, </span></code><a href="#impl-ReturnWasmAbi" class="anchor"></a><a class="srclink" href="https://docs.rs/wasm-bindgen/0.2/src/wasm_bindgen/convert/traits.rs.html#122-129" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Abi-4" class="type trait-impl"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <T as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code><a href="#associatedtype.Abi-4" class="anchor"></a></h4><div class='docblock'><p>Same as <code>IntoWasmAbi::Abi</code></p>
|
|
||||||
</div><h4 id="method.return_abi" class="method hidden trait-impl"><code>pub fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#tymethod.return_abi" class="fnname">return_abi</a>(self) -> <T as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></code><a href="#method.return_abi" class="anchor"></a><a class="srclink" href="https://docs.rs/wasm-bindgen/0.2/src/wasm_bindgen/convert/traits.rs.html#126" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>IntoWasmAbi::into_abi</code>, except that it may throw and never
|
|
||||||
return in the case of <code>Err</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#tymethod.return_abi">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-93" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Owned" class="type trait-impl"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code><a href="#associatedtype.Owned" class="anchor"></a></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
|
||||||
</div><h4 id="method.to_owned" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#86" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
|
||||||
</div><h4 id="method.clone_into" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#90" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
|
||||||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Error" class="type trait-impl"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code><a href="#associatedtype.Error" class="anchor"></a></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
||||||
</div><h4 id="method.try_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Error-1" class="type trait-impl"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code><a href="#associatedtype.Error-1" class="anchor"></a></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
||||||
</div><h4 id="method.try_into" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
||||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3></summary><div class="impl-items"><h4 id="method.vzip" class="method hidden trait-impl"><code>pub fn <a href="#tymethod.vzip" class="fnname">vzip</a>(self) -> V</code><a href="#method.vzip" class="anchor"></a></h4></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
|
||||||
<script src="../../main.js"></script></body></html>
|
|
@ -1 +1 @@
|
|||||||
initSidebarItems({"fn":[["__wasm_bindgen_generated_init_wasm",""],["init_wasm",""]],"macro":[["log","Wrap the [`web_sys`] access to the browser console in a macro for easy logging"]],"mod":[["board","Board module for components related to the checkers board and game structure"],["comp","AI player logic"],["game","Top-level object for managing [`Board`]s, applying and managing turns"],["paint","Components for painting board states onto HTML canvases"],["player",""],["utils",""]]});
|
initSidebarItems({"fn":[["__wasm_bindgen_generated_init_wasm",""],["init_wasm",""]],"macro":[["log","Wrap the [`web_sys`] access to the browser console in a macro for easy logging"]],"mod":[["board","Board module for components related to the checkers board and game structure"],["comp","AI player logic"],["game","Top-level object for managing [`Board`]s, applying and managing turns"],["paint","Components for painting board states onto HTML canvases"],["utils",""]]});
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a><T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/comp/struct.Move.html\" title=\"struct draught::comp::Move\">Move</a>","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/comp/struct.BoardNode.html\" title=\"struct draught::comp::BoardNode\">BoardNode</a>","synthetic":false,"types":["draught::comp::BoardNode"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a><T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/comp/struct.Move.html\" title=\"struct draught::comp::Move\">Move</a>","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/comp/struct.BoardNode.html\" title=\"struct draught::comp::BoardNode\">BoardNode</a>","synthetic":false,"types":["draught::comp::BoardNode"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
|||||||
(function() {var implementors = {};
|
(function() {var implementors = {};
|
||||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.MoveType.html\" title=\"enum draught::board::enums::MoveType\">MoveType</a>","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]}];
|
||||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
|||||||
var N = null;var sourcesIndex = {};
|
var N = null;var sourcesIndex = {};
|
||||||
sourcesIndex["draught"] = {"name":"","dirs":[{"name":"board","files":["enums.rs","iter.rs","mod.rs"]},{"name":"comp","files":["mod.rs"]},{"name":"game","files":["mod.rs"]}],"files":["lib.rs","paint.rs","player.rs","utils.rs"]};
|
sourcesIndex["draught"] = {"name":"","dirs":[{"name":"board","files":["enums.rs","iter.rs","mod.rs"]},{"name":"comp","files":["mod.rs"]},{"name":"game","files":["mod.rs"]}],"files":["lib.rs","paint.rs","utils.rs"]};
|
||||||
createSourceSidebar();
|
createSourceSidebar();
|
||||||
|
@ -81,12 +81,19 @@
|
|||||||
<span id="78">78</span>
|
<span id="78">78</span>
|
||||||
<span id="79">79</span>
|
<span id="79">79</span>
|
||||||
<span id="80">80</span>
|
<span id="80">80</span>
|
||||||
|
<span id="81">81</span>
|
||||||
|
<span id="82">82</span>
|
||||||
|
<span id="83">83</span>
|
||||||
|
<span id="84">84</span>
|
||||||
|
<span id="85">85</span>
|
||||||
|
<span id="86">86</span>
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
|
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
|
||||||
<span class="kw">use</span> <span class="ident">wasm_bindgen::prelude</span>::<span class="kw-2">*</span>;
|
<span class="kw">use</span> <span class="ident">wasm_bindgen::prelude</span>::<span class="kw-2">*</span>;
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>};
|
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>};
|
||||||
|
|
||||||
|
<span class="doccomment">/// Move/Jump, for use in Move</span>
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
@ -95,6 +102,7 @@
|
|||||||
<span class="ident">Jump</span> <span class="op">=</span> <span class="number">1</span>,
|
<span class="ident">Jump</span> <span class="op">=</span> <span class="number">1</span>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Black/White</span>
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
@ -104,6 +112,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<span class="kw">impl</span> <span class="ident">Team</span> {
|
<span class="kw">impl</span> <span class="ident">Team</span> {
|
||||||
|
<span class="doccomment">/// Get opposing team</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">opponent</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Team</span>{
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">opponent</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Team</span>{
|
||||||
<span class="kw">match</span> <span class="self">self</span> {
|
<span class="kw">match</span> <span class="self">self</span> {
|
||||||
<span class="ident">Team::White</span> <span class="op">=</span><span class="op">></span> <span class="ident">Team::Black</span>,
|
<span class="ident">Team::White</span> <span class="op">=</span><span class="op">></span> <span class="ident">Team::Black</span>,
|
||||||
@ -121,6 +130,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Man/King</span>
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
@ -129,6 +139,7 @@
|
|||||||
<span class="ident">King</span> <span class="op">=</span> <span class="number">1</span>
|
<span class="ident">King</span> <span class="op">=</span> <span class="number">1</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Model board square as Empty/Occupied/Unplayable</span>
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
@ -148,6 +159,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Possible outcomes of trying to move</span>
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||||
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">u8</span>)]</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
|
@ -849,6 +849,8 @@
|
|||||||
<span id="846">846</span>
|
<span id="846">846</span>
|
||||||
<span id="847">847</span>
|
<span id="847">847</span>
|
||||||
<span id="848">848</span>
|
<span id="848">848</span>
|
||||||
|
<span id="849">849</span>
|
||||||
|
<span id="850">850</span>
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="doccomment">//! Board module for components related to the checkers board and game structure</span>
|
<span class="doccomment">//! Board module for components related to the checkers board and game structure</span>
|
||||||
|
|
||||||
@ -1343,6 +1345,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Check that given move trajectory is valid for a man piece </span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_man_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_man_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||||
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board::idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board::idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||||
|
|
||||||
@ -1391,6 +1394,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Check that given move trajectory is valid for a king piece </span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_king_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_king_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||||
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board::idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board::idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||||
|
|
||||||
|
@ -378,6 +378,10 @@
|
|||||||
<span id="375">375</span>
|
<span id="375">375</span>
|
||||||
<span id="376">376</span>
|
<span id="376">376</span>
|
||||||
<span id="377">377</span>
|
<span id="377">377</span>
|
||||||
|
<span id="378">378</span>
|
||||||
|
<span id="379">379</span>
|
||||||
|
<span id="380">380</span>
|
||||||
|
<span id="381">381</span>
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="doccomment">//! AI player logic</span>
|
<span class="doccomment">//! AI player logic</span>
|
||||||
|
|
||||||
@ -401,6 +405,7 @@
|
|||||||
|
|
||||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span> <span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span>;
|
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span> <span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span>;
|
||||||
|
|
||||||
|
<span class="doccomment">/// Represents a move by source/destination indices and the move type</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Move</span> {
|
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Move</span> {
|
||||||
<span class="ident">from</span>: <span class="ident">BrdIdx</span>,
|
<span class="ident">from</span>: <span class="ident">BrdIdx</span>,
|
||||||
@ -416,6 +421,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// For storing boards in the AI tree, stores board with score for comparisons</span>
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">BoardNode</span> {
|
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">BoardNode</span> {
|
||||||
<span class="kw">pub</span> <span class="ident">board</span>: <span class="ident">Board</span>,
|
<span class="kw">pub</span> <span class="ident">board</span>: <span class="ident">Board</span>,
|
||||||
@ -529,7 +535,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<span class="doccomment">/// Propagate scores up the tree employing MiniMax algorithm</span>
|
<span class="doccomment">/// Propagate scores up the tree employing MiniMax algorithm</span>
|
||||||
<span class="kw">fn</span> <span class="ident">propagate_scores</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">tree</span>: <span class="ident">Arena</span><span class="op"><</span><span class="ident">BoardNode</span><span class="op">></span>, <span class="ident">root</span>: <span class="ident">NodeId</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Arena</span><span class="op"><</span><span class="ident">BoardNode</span><span class="op">></span> {
|
<span class="kw">fn</span> <span class="ident">propagate_scores</span>(<span class="ident">tree</span>: <span class="ident">Arena</span><span class="op"><</span><span class="ident">BoardNode</span><span class="op">></span>, <span class="ident">root</span>: <span class="ident">NodeId</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Arena</span><span class="op"><</span><span class="ident">BoardNode</span><span class="op">></span> {
|
||||||
|
|
||||||
<span class="comment">// need to clone tree because we iterate over it and edit it at the same time</span>
|
<span class="comment">// need to clone tree because we iterate over it and edit it at the same time</span>
|
||||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_tree</span> <span class="op">=</span> <span class="ident">tree</span>.<span class="ident">clone</span>();
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_tree</span> <span class="op">=</span> <span class="ident">tree</span>.<span class="ident">clone</span>();
|
||||||
@ -539,17 +545,17 @@
|
|||||||
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">NodeEdge::End</span>(<span class="ident">node_id</span>) <span class="op">=</span> <span class="ident">n</span> {
|
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">NodeEdge::End</span>(<span class="ident">node_id</span>) <span class="op">=</span> <span class="ident">n</span> {
|
||||||
|
|
||||||
<span class="comment">// board current being looked at</span>
|
<span class="comment">// board current being looked at</span>
|
||||||
<span class="kw">let</span> <span class="ident">board_node</span> <span class="op">=</span> <span class="ident">tree</span>
|
<span class="kw">let</span> <span class="ident">board_node</span> <span class="op">=</span> <span class="ident">new_tree</span>
|
||||||
.<span class="ident">get</span>(<span class="ident">node_id</span>) <span class="comment">// get Node</span>
|
.<span class="ident">get</span>(<span class="ident">node_id</span>) <span class="comment">// get Node</span>
|
||||||
.<span class="ident">expect</span>(<span class="string">"No node returned for node id"</span>)
|
.<span class="ident">expect</span>(<span class="string">"No node returned for node id"</span>)
|
||||||
.<span class="ident">get</span>(); <span class="comment">// get BoardNode from Node</span>
|
.<span class="ident">get</span>(); <span class="comment">// get BoardNode from Node</span>
|
||||||
|
|
||||||
<span class="comment">// get scores of each nodes children</span>
|
<span class="comment">// get scores of each nodes children</span>
|
||||||
<span class="kw">let</span> <span class="ident">children_scores</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">isize</span><span class="op">></span> <span class="op">=</span> <span class="ident">node_id</span> <span class="comment">// current node</span>
|
<span class="kw">let</span> <span class="ident">children_scores</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">isize</span><span class="op">></span> <span class="op">=</span> <span class="ident">node_id</span> <span class="comment">// current node</span>
|
||||||
.<span class="ident">children</span>(<span class="kw-2">&</span><span class="ident">tree</span>)
|
.<span class="ident">children</span>(<span class="kw-2">&</span><span class="ident">new_tree</span>)
|
||||||
.<span class="ident">into_iter</span>()
|
.<span class="ident">into_iter</span>()
|
||||||
.<span class="ident">map</span>(
|
.<span class="ident">map</span>(
|
||||||
<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="ident">tree</span>
|
<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="ident">new_tree</span>
|
||||||
.<span class="ident">get</span>(<span class="ident">n</span>) <span class="comment">// get Node</span>
|
.<span class="ident">get</span>(<span class="ident">n</span>) <span class="comment">// get Node</span>
|
||||||
.<span class="ident">expect</span>(<span class="string">"No node returned for node id"</span>) <span class="comment">// unwrap, should always be fine</span>
|
.<span class="ident">expect</span>(<span class="string">"No node returned for node id"</span>) <span class="comment">// unwrap, should always be fine</span>
|
||||||
.<span class="ident">get</span>() <span class="comment">// get BoardNode from Node</span>
|
.<span class="ident">get</span>() <span class="comment">// get BoardNode from Node</span>
|
||||||
@ -573,6 +579,7 @@
|
|||||||
<span class="ident">new_tree</span>
|
<span class="ident">new_tree</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Get best of given scores for given team</span>
|
||||||
<span class="kw">fn</span> <span class="ident">best_score</span>(<span class="ident">board</span>: <span class="kw-2">&</span><span class="ident">Board</span>, <span class="ident">children_scores</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">isize</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">isize</span> {
|
<span class="kw">fn</span> <span class="ident">best_score</span>(<span class="ident">board</span>: <span class="kw-2">&</span><span class="ident">Board</span>, <span class="ident">children_scores</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">isize</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">isize</span> {
|
||||||
<span class="kw">match</span> <span class="ident">board</span>.<span class="ident">current_turn</span> { <span class="comment">// MiniMax algorithm here</span>
|
<span class="kw">match</span> <span class="ident">board</span>.<span class="ident">current_turn</span> { <span class="comment">// MiniMax algorithm here</span>
|
||||||
<span class="comment">// whether maximised or minimsed is based on current player</span>
|
<span class="comment">// whether maximised or minimsed is based on current player</span>
|
||||||
@ -686,6 +693,7 @@
|
|||||||
).<span class="ident">collect</span>()
|
).<span class="ident">collect</span>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Get a new board based on the given using MiniMax to make decisions </span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_move</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">brd</span>: <span class="ident">Board</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Board</span><span class="op">></span> {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_move</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">brd</span>: <span class="ident">Board</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Board</span><span class="op">></span> {
|
||||||
|
|
||||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">tree</span> <span class="op">=</span> <span class="ident">Arena::new</span>();
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">tree</span> <span class="op">=</span> <span class="ident">Arena::new</span>();
|
||||||
@ -702,7 +710,7 @@
|
|||||||
<span class="self">self</span>.<span class="ident">insert_board_scores</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">tree</span>, <span class="ident">lowest_nodes</span>);
|
<span class="self">self</span>.<span class="ident">insert_board_scores</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">tree</span>, <span class="ident">lowest_nodes</span>);
|
||||||
|
|
||||||
<span class="comment">// propagate the scores up the tree, the root node has the best score</span>
|
<span class="comment">// propagate the scores up the tree, the root node has the best score</span>
|
||||||
<span class="kw">let</span> <span class="ident">tree</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">propagate_scores</span>(<span class="ident">tree</span>, <span class="ident">root_node</span>);
|
<span class="kw">let</span> <span class="ident">tree</span> <span class="op">=</span> <span class="ident">Computer::propagate_scores</span>(<span class="ident">tree</span>, <span class="ident">root_node</span>);
|
||||||
|
|
||||||
<span class="comment">// get root node to compare</span>
|
<span class="comment">// get root node to compare</span>
|
||||||
<span class="kw">let</span> <span class="ident">root_board_node</span> <span class="op">=</span> <span class="ident">tree</span>
|
<span class="kw">let</span> <span class="ident">root_board_node</span> <span class="op">=</span> <span class="ident">tree</span>
|
||||||
@ -710,13 +718,13 @@
|
|||||||
.<span class="ident">expect</span>(<span class="string">"No node returned for node id"</span>)
|
.<span class="ident">expect</span>(<span class="string">"No node returned for node id"</span>)
|
||||||
.<span class="ident">get</span>(); <span class="comment">// get BoardNode from Node</span>
|
.<span class="ident">get</span>(); <span class="comment">// get BoardNode from Node</span>
|
||||||
|
|
||||||
<span class="macro">log!</span>(<span class="string">"{}"</span>, <span class="ident">root_board_node</span>.<span class="ident">score</span>);
|
|
||||||
<span class="comment">// log!("{:#?}", tree);</span>
|
|
||||||
|
|
||||||
<span class="comment">// when boards have equal scores, store for shuffling and selection</span>
|
<span class="comment">// when boards have equal scores, store for shuffling and selection</span>
|
||||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">equal_scores</span> <span class="op">=</span> <span class="ident">Vec::with_capacity</span>(<span class="number">10</span>);
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">equal_scores</span> <span class="op">=</span> <span class="ident">Vec::with_capacity</span>(<span class="number">10</span>);
|
||||||
|
|
||||||
<span class="comment">// DEBUG</span>
|
<span class="comment">// DEBUG</span>
|
||||||
|
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"debug_logs"</span>)]</span>
|
||||||
|
{
|
||||||
|
<span class="macro">log!</span>(<span class="string">"Current root score: {}"</span>, <span class="ident">root_board_node</span>.<span class="ident">score</span>);
|
||||||
<span class="kw">let</span> <span class="ident">scores</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">NodeId</span><span class="op">></span> <span class="op">=</span> <span class="ident">root_node</span>
|
<span class="kw">let</span> <span class="ident">scores</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">NodeId</span><span class="op">></span> <span class="op">=</span> <span class="ident">root_node</span>
|
||||||
.<span class="ident">children</span>(<span class="kw-2">&</span><span class="ident">tree</span>)
|
.<span class="ident">children</span>(<span class="kw-2">&</span><span class="ident">tree</span>)
|
||||||
.<span class="ident">collect</span>();
|
.<span class="ident">collect</span>();
|
||||||
@ -724,8 +732,8 @@
|
|||||||
.<span class="ident">into_iter</span>()
|
.<span class="ident">into_iter</span>()
|
||||||
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="ident">tree</span>.<span class="ident">get</span>(<span class="ident">n</span>).<span class="ident">unwrap</span>().<span class="ident">get</span>().<span class="ident">score</span>)
|
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="ident">tree</span>.<span class="ident">get</span>(<span class="ident">n</span>).<span class="ident">unwrap</span>().<span class="ident">get</span>().<span class="ident">score</span>)
|
||||||
.<span class="ident">collect</span>();
|
.<span class="ident">collect</span>();
|
||||||
<span class="macro">log!</span>(<span class="string">"SCORES: {:?}"</span>, <span class="ident">scores</span>);
|
<span class="macro">log!</span>(<span class="string">"Next boards scores: {:?}"</span>, <span class="ident">scores</span>);
|
||||||
<span class="comment">// DEBUG</span>
|
}
|
||||||
|
|
||||||
<span class="comment">// search through root node's children for the same score</span>
|
<span class="comment">// search through root node's children for the same score</span>
|
||||||
<span class="kw">for</span> <span class="ident">n</span> <span class="kw">in</span> <span class="ident">root_node</span>.<span class="ident">children</span>(<span class="kw-2">&</span><span class="ident">tree</span>) {
|
<span class="kw">for</span> <span class="ident">n</span> <span class="kw">in</span> <span class="ident">root_node</span>.<span class="ident">children</span>(<span class="kw-2">&</span><span class="ident">tree</span>) {
|
||||||
|
@ -205,6 +205,36 @@
|
|||||||
<span id="202">202</span>
|
<span id="202">202</span>
|
||||||
<span id="203">203</span>
|
<span id="203">203</span>
|
||||||
<span id="204">204</span>
|
<span id="204">204</span>
|
||||||
|
<span id="205">205</span>
|
||||||
|
<span id="206">206</span>
|
||||||
|
<span id="207">207</span>
|
||||||
|
<span id="208">208</span>
|
||||||
|
<span id="209">209</span>
|
||||||
|
<span id="210">210</span>
|
||||||
|
<span id="211">211</span>
|
||||||
|
<span id="212">212</span>
|
||||||
|
<span id="213">213</span>
|
||||||
|
<span id="214">214</span>
|
||||||
|
<span id="215">215</span>
|
||||||
|
<span id="216">216</span>
|
||||||
|
<span id="217">217</span>
|
||||||
|
<span id="218">218</span>
|
||||||
|
<span id="219">219</span>
|
||||||
|
<span id="220">220</span>
|
||||||
|
<span id="221">221</span>
|
||||||
|
<span id="222">222</span>
|
||||||
|
<span id="223">223</span>
|
||||||
|
<span id="224">224</span>
|
||||||
|
<span id="225">225</span>
|
||||||
|
<span id="226">226</span>
|
||||||
|
<span id="227">227</span>
|
||||||
|
<span id="228">228</span>
|
||||||
|
<span id="229">229</span>
|
||||||
|
<span id="230">230</span>
|
||||||
|
<span id="231">231</span>
|
||||||
|
<span id="232">232</span>
|
||||||
|
<span id="233">233</span>
|
||||||
|
<span id="234">234</span>
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="doccomment">//! Top-level object for managing [`Board`]s, applying and managing turns</span>
|
<span class="doccomment">//! Top-level object for managing [`Board`]s, applying and managing turns</span>
|
||||||
|
|
||||||
@ -220,7 +250,7 @@
|
|||||||
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::paint::Painter</span>;
|
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::paint::Painter</span>;
|
||||||
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::comp::Computer</span>;
|
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::comp::Computer</span>;
|
||||||
|
|
||||||
<span class="comment">// use Team::*;</span>
|
<span class="kw">use</span> <span class="ident">Team</span>::<span class="kw-2">*</span>;
|
||||||
<span class="kw">use</span> <span class="ident">SquareState</span>::<span class="kw-2">*</span>;
|
<span class="kw">use</span> <span class="ident">SquareState</span>::<span class="kw-2">*</span>;
|
||||||
|
|
||||||
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>};
|
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>};
|
||||||
@ -273,6 +303,31 @@
|
|||||||
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">score</span>()
|
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">score</span>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Get currently winning player</span>
|
||||||
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">winning</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Team</span><span class="op">></span> {
|
||||||
|
<span class="kw">let</span> <span class="ident">current_score</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">score</span>();
|
||||||
|
|
||||||
|
<span class="kw">if</span> <span class="ident">current_score</span> <span class="op"><</span> <span class="number">0</span> {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">White</span>)
|
||||||
|
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">current_score</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
|
||||||
|
<span class="prelude-val">None</span>
|
||||||
|
} <span class="kw">else</span> {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">Black</span>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Check if a player has won</span>
|
||||||
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">has_won</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Team</span><span class="op">></span> {
|
||||||
|
|
||||||
|
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">num_player</span>(<span class="ident">White</span>) <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">Black</span>)
|
||||||
|
} <span class="kw">else</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">num_player</span>(<span class="ident">Black</span>) <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
|
||||||
|
<span class="prelude-val">Some</span>(<span class="ident">White</span>)
|
||||||
|
} <span class="kw">else</span> {
|
||||||
|
<span class="prelude-val">None</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<span class="doccomment">/// Get square on current board for given index</span>
|
<span class="doccomment">/// Get square on current board for given index</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_cell_state</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="kw-2">&</span><span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Square</span> {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_cell_state</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="kw-2">&</span><span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Square</span> {
|
||||||
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell_idx</span>(<span class="kw-2">*</span><span class="ident">idx</span>))
|
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell_idx</span>(<span class="kw-2">*</span><span class="ident">idx</span>))
|
||||||
@ -351,6 +406,7 @@
|
|||||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> <span class="ident">board</span>;
|
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> <span class="ident">board</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Get new game without board renderer</span>
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>(<span class="ident">constructor</span>)]</span>
|
<span class="attribute">#[<span class="ident">wasm_bindgen</span>(<span class="ident">constructor</span>)]</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>, <span class="ident">piece_rows</span>: <span class="ident">usize</span>, <span class="ident">first_turn</span>: <span class="ident">Team</span>, <span class="ident">search_depth</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Game</span> {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>, <span class="ident">piece_rows</span>: <span class="ident">usize</span>, <span class="ident">first_turn</span>: <span class="ident">Team</span>, <span class="ident">search_depth</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Game</span> {
|
||||||
<span class="ident">Game</span> {
|
<span class="ident">Game</span> {
|
||||||
@ -365,6 +421,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Get a new game with canvas ID and dimensions</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new_with_canvas</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>, <span class="ident">piece_rows</span>: <span class="ident">usize</span>, <span class="ident">first_turn</span>: <span class="ident">Team</span>, <span class="ident">search_depth</span>: <span class="ident">usize</span>, <span class="ident">canvas_id</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">canvas_width</span>: <span class="ident">u32</span>, <span class="ident">canvas_height</span>: <span class="ident">u32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Game</span> {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new_with_canvas</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>, <span class="ident">piece_rows</span>: <span class="ident">usize</span>, <span class="ident">first_turn</span>: <span class="ident">Team</span>, <span class="ident">search_depth</span>: <span class="ident">usize</span>, <span class="ident">canvas_id</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">canvas_width</span>: <span class="ident">u32</span>, <span class="ident">canvas_height</span>: <span class="ident">u32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Game</span> {
|
||||||
<span class="ident">Game</span> {
|
<span class="ident">Game</span> {
|
||||||
<span class="ident">current</span>: <span class="ident">Board::init_game</span>(
|
<span class="ident">current</span>: <span class="ident">Board::init_game</span>(
|
||||||
@ -380,10 +437,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Set painter for rendering boards</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_painter</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">value</span>: <span class="ident">Painter</span>) {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_painter</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">value</span>: <span class="ident">Painter</span>) {
|
||||||
<span class="self">self</span>.<span class="ident">painter</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">value</span>);
|
<span class="self">self</span>.<span class="ident">painter</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">value</span>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Draw current board using painter if exists</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>) {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>) {
|
||||||
<span class="kw">match</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">painter</span> {
|
<span class="kw">match</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">painter</span> {
|
||||||
<span class="prelude-val">Some</span>(<span class="ident">p</span>) <span class="op">=</span><span class="op">></span> <span class="ident">p</span>.<span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">current</span>),
|
<span class="prelude-val">Some</span>(<span class="ident">p</span>) <span class="op">=</span><span class="op">></span> <span class="ident">p</span>.<span class="ident">draw</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">current</span>),
|
||||||
@ -391,6 +450,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<span class="doccomment">/// Create computer, get move from current board and update current board</span>
|
||||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">ai_move</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">ai_move</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
||||||
|
|
||||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">comp</span> <span class="op">=</span> <span class="ident">Computer::new</span>(<span class="self">self</span>.<span class="ident">search_depth</span>, <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">current_turn</span>);
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">comp</span> <span class="op">=</span> <span class="ident">Computer::new</span>(<span class="self">self</span>.<span class="ident">search_depth</span>, <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">current_turn</span>);
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
<span id="35">35</span>
|
<span id="35">35</span>
|
||||||
<span id="36">36</span>
|
<span id="36">36</span>
|
||||||
<span id="37">37</span>
|
<span id="37">37</span>
|
||||||
<span id="38">38</span>
|
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
</pre><div class="example-wrap"><pre class="rust ">
|
||||||
<span class="doccomment">//! Draught</span>
|
<span class="doccomment">//! Draught</span>
|
||||||
<span class="doccomment">//! </span>
|
<span class="doccomment">//! </span>
|
||||||
@ -47,7 +46,6 @@
|
|||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">board</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">board</span>;
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">utils</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">utils</span>;
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">game</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">game</span>;
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">player</span>;
|
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">paint</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">paint</span>;
|
||||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">comp</span>;
|
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">comp</span>;
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/player.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>player.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
|
||||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
|
||||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1">1</span>
|
|
||||||
<span id="2">2</span>
|
|
||||||
<span id="3">3</span>
|
|
||||||
<span id="4">4</span>
|
|
||||||
<span id="5">5</span>
|
|
||||||
<span id="6">6</span>
|
|
||||||
<span id="7">7</span>
|
|
||||||
<span id="8">8</span>
|
|
||||||
</pre><div class="example-wrap"><pre class="rust ">
|
|
||||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
|
|
||||||
<span class="kw">use</span> <span class="ident">wasm_bindgen::prelude</span>::<span class="kw-2">*</span>;
|
|
||||||
|
|
||||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
|
||||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
|
||||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Player</span> {
|
|
||||||
<span class="ident">score</span>: <span class="ident">usize</span>,
|
|
||||||
}</pre></div>
|
|
||||||
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
|
||||||
<script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
|
|
37
index.html
37
index.html
@ -26,6 +26,12 @@
|
|||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-select {
|
||||||
|
-webkit-user-select: none; /* Safari */
|
||||||
|
-ms-user-select: none; /* IE 10 and IE 11 */
|
||||||
|
user-select: none; /* Standard syntax */
|
||||||
|
}
|
||||||
|
|
||||||
#game-canvas {
|
#game-canvas {
|
||||||
width: 1000px;
|
width: 1000px;
|
||||||
height: 1000px;
|
height: 1000px;
|
||||||
@ -73,21 +79,21 @@
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h1>Draught 🚀</h1>
|
<h1>Draught 🚀</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body no-select">
|
||||||
<div class="row p-1">
|
<div class="row p-1">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<p class="text-muted">Working on an implementation of checkers in Rust WASM with a thin Js frontend, mainly as an exercise to learn Rust and to have a larger project in the language to fiddle with. The idea is to use the <a href="https://en.wikipedia.org/wiki/Minimax">minimax</a> algorithm to create an AI player that can operate with reasonable performance as a result of Rust's compiled performance.</p>
|
<p class="text-muted">An implementation of checkers in Rust WASM with a thin Js frontend, mainly as an exercise to learn Rust and to have a larger project in the language to fiddle with. Using the <a href="https://en.wikipedia.org/wiki/Minimax">minimax</a> algorithm for an AI player that can operate with reasonable performance as a result of Rust's compiled performance.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row p-3">
|
<div class="row p-3">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<a href="doc/draught" class="btn btn-secondary" target="_blank">Docs</a>
|
<a href="doc/draught" class="btn btn-secondary" target="_blank">Docs</a>
|
||||||
<button id="startBtn" class="btn btn-success">Start</button>
|
<button id="startBtn" class="btn btn-success" title="reset the game and start again">Start</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row p-3">
|
<div class="row p-3">
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" title="board width in cells">
|
||||||
<input type="number"
|
<input type="number"
|
||||||
id="width"
|
id="width"
|
||||||
name="width"
|
name="width"
|
||||||
@ -95,7 +101,7 @@
|
|||||||
class="form-control">
|
class="form-control">
|
||||||
<label for="width">width</label>
|
<label for="width">width</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" title="board height in cells">
|
||||||
<input type="number"
|
<input type="number"
|
||||||
id="height"
|
id="height"
|
||||||
name="height"
|
name="height"
|
||||||
@ -103,7 +109,7 @@
|
|||||||
class="form-control">
|
class="form-control">
|
||||||
<label for="height">height</label>
|
<label for="height">height</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" title="number of rows to populate with pieces per player">
|
||||||
<input type="number"
|
<input type="number"
|
||||||
id="play_rows"
|
id="play_rows"
|
||||||
name="play_rows"
|
name="play_rows"
|
||||||
@ -113,28 +119,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row p-3">
|
<div class="row p-3">
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" title="should the AI play?">
|
||||||
<input class="form-check-input" type="checkbox" value="" id="ai-checkbox" checked="checked">
|
<input class="form-check-input"
|
||||||
|
type="checkbox"
|
||||||
|
value=""
|
||||||
|
id="ai-checkbox"
|
||||||
|
checked="checked">
|
||||||
<label class="form-check-label" for="ai-checkbox">
|
<label class="form-check-label" for="ai-checkbox">
|
||||||
AI Player
|
AI Player
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" title="how many layers deep should the AI search (grows exponentially, be careful)">
|
||||||
<input type="number"
|
<input type="number"
|
||||||
id="ai_search_depth"
|
id="ai_search_depth"
|
||||||
name="ai_search_depth"
|
name="ai_search_depth"
|
||||||
min="1" max="10" value="4"
|
min="1" max="10" value="4"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
<label for="ai_search_depth">ai difficulty</label>
|
<label for="ai_search_depth">ai difficulty <small class="text-muted">moves ahead</small></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" title="how many nodes were expanded in the search tree">
|
||||||
<p class="text-muted" id="node-count"></p>
|
<p class="text-muted" id="node-count"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row p-3">
|
<div class="row p-3">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-6" title="current turn">
|
||||||
<h1 id="team-p"></h1>
|
<h1 id="team-p"></h1>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-6" title="who's winning">
|
||||||
|
<h1 id="winning-p"></h1>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row p-3">
|
<div class="row p-3">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
|
Loading…
Reference in New Issue
Block a user