This commit is contained in:
Sarsoo 2021-07-02 14:37:40 +00:00
parent a8f6999cbb
commit ff9a8e126f
63 changed files with 1147 additions and 196 deletions

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.

Binary file not shown.

View File

@ -3,5 +3,5 @@
<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">&#9776;</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>
<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">&#x2212;</span>]</a></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.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="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_game.html">__wasm_bindgen_generated_init_game</a></li><li><a href="fn.init_game.html">init_game</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></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.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_game.html">__wasm_bindgen_generated_init_game</a></li><li><a href="fn.init_game.html">init_game</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.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.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>

View File

@ -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="Standard height of a checkers board is 8 squares"><meta name="keywords" content="rust, rustlang, rust-lang, STD_HEIGHT"><title>STD_HEIGHT in 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-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">board</a></p><div id="sidebar-vars" data-name="STD_HEIGHT" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_HEIGHT</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#23" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_HEIGHT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard height of a checkers board is 8 squares</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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_HEIGHT</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#25" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_HEIGHT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard height of a checkers board is 8 squares</p>
</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>

View File

@ -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="Standard width of a checkers board is 8 squares"><meta name="keywords" content="rust, rustlang, rust-lang, STD_WIDTH"><title>STD_WIDTH in 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-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">board</a></p><div id="sidebar-vars" data-name="STD_WIDTH" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_WIDTH</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#21" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard width of a checkers board is 8 squares</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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_WIDTH</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#23" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard width of a checkers board is 8 squares</p>
</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>

View File

@ -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">
<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">&#9776;</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#1-795" 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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#1-800" 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>
<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>

View File

@ -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="API documentation for the Rust `iter` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, iter"><title>draught::board::iter - 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">&#9776;</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 iter</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>::<wbr><a href="../index.html">board</a></p><div id="sidebar-vars" data-name="iter" 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="">iter</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#1-194" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</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="">iter</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#1-195" 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.PieceIterator.html" title="draught::board::iter::PieceIterator struct">PieceIterator</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RowIndexIterator.html" title="draught::board::iter::RowIndexIterator struct">RowIndexIterator</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RowSquareIterator.html" title="draught::board::iter::RowSquareIterator struct">RowSquareIterator</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>

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

View File

@ -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="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-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">&#9776;</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#1-147" 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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/comp/mod.rs.html#1-161" 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>
<table><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"></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>

File diff suppressed because one or more lines are too long

View File

@ -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_game` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, __wasm_bindgen_generated_init_game"><title>__wasm_bindgen_generated_init_game 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-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">&#9776;</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_game" 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_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">&#x2212;</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#31" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub extern &quot;C&quot; fn __wasm_bindgen_generated_init_game(<br>) -&gt; &lt;<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>&gt;::<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_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">&#x2212;</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 &quot;C&quot; fn __wasm_bindgen_generated_init_game(<br>) -&gt; &lt;<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>&gt;::<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>

View File

@ -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_game` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, init_game"><title>init_game 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-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">&#9776;</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_game" 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_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">&#x2212;</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#32-38" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn init_game()</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_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">&#x2212;</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_game()</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>

View File

@ -1,7 +1,8 @@
<!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 `game` mod in crate `draught`."><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-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">&#9776;</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#1-105" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</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 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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#1-143" 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>
<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>
<script src="../../main.js"></script></body></html>

View File

@ -1,44 +1,47 @@
<!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-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">&#9776;</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.previous_boards">previous_boards</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.current_board">current_board</a><a href="#method.current_turn">current_turn</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.previous_board">previous_board</a><a href="#method.push_new_board">push_new_board</a><a href="#method.set_current">set_current</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&lt;Game&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#21-24" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Game {
<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">&#9776;</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.painter">painter</a><a href="#structfield.previous_boards">previous_boards</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><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_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.set_current">set_current</a><a href="#method.set_painter">set_painter</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&lt;Game&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#24-28" 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>,
previous_boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>&gt;,
painter: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>&gt;,
}</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">
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.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>&lt;<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>&gt;</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#26-36" 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>(&amp;self, turn: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; &amp;<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#28-30" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a read-only copy of a previous turns board</p>
</div><h4 id="method.current_board" class="method"><code>pub fn <a href="#method.current_board" class="fnname">current_board</a>(&amp;self) -&gt; &amp;<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#33-35" 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#39-99" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.current_turn" class="method"><code>pub fn <a href="#method.current_turn" class="fnname">current_turn</a>(&amp;self) -&gt; <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#41-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Current turns team</p>
</div><h4 id="method.make_move" class="method"><code>pub fn <a href="#method.make_move" class="fnname">make_move</a>(&amp;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.make_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#46-65" 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>(&amp;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#68-71" 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>(&amp;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#74-77" 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>(&amp;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#80-83" 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>(&amp;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#86-88" 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>&nbsp;&nbsp;&nbsp;&nbsp;width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a><br>) -&gt; <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#91-98" 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#20" 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>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <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#20" 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#101-105" 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>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <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#102-104" 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>&lt;<a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>&gt; 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#19" 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>) -&gt; Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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#19" 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
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.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>&lt;<a class="struct" href="../board/struct.Board.html" title="struct draught::board::Board">Board</a>&gt;</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>&lt;<a class="struct" href="../paint/struct.Painter.html" title="struct draught::paint::Painter">Painter</a>&gt;</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#30-40" 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>(&amp;self, turn: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; &amp;<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#32-34" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a read-only copy of a previous turns board</p>
</div><h4 id="method.current_board" class="method"><code>pub fn <a href="#method.current_board" class="fnname">current_board</a>(&amp;self) -&gt; &amp;<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#37-39" 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#43-137" 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>(&amp;self) -&gt; <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#45-47" title="goto source code">[src]</a></h4><div class="docblock"><p>Get pointer to current boards 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>(&amp;self) -&gt; <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#50-52" title="goto source code">[src]</a></h4><div class="docblock"><p>Get pointer to current boards squares</p>
</div><h4 id="method.current_turn" class="method"><code>pub fn <a href="#method.current_turn" class="fnname">current_turn</a>(&amp;self) -&gt; <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#55-57" title="goto source code">[src]</a></h4><div class="docblock"><p>Current turns team</p>
</div><h4 id="method.make_move" class="method"><code>pub fn <a href="#method.make_move" class="fnname">make_move</a>(&amp;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.make_move" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#60-79" 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>(&amp;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#82-85" 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>(&amp;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#88-91" 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>(&amp;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#94-97" 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>(&amp;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#100-102" 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>&nbsp;&nbsp;&nbsp;&nbsp;width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a><br>) -&gt; <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#105-113" 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>&nbsp;&nbsp;&nbsp;&nbsp;width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;first_turn: <a class="enum" href="../board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;canvas_id: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;canvas_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;canvas_height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><br>) -&gt; <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#115-125" 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>(&amp;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#127-129" title="goto source code">[src]</a></h4><h4 id="method.draw" class="method"><code>pub fn <a href="#method.draw" class="fnname">draw</a>(&amp;self)</code><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#131-136" 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#23" 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>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <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#23" 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#139-143" 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>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <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#140-142" 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>&lt;<a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>&gt; 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#22" 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>) -&gt; Self</code><a href="#method.from" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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#22" 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>) -&gt; Self</code><a href="#method.from_abi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-IntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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
</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>) -&gt; Self</code><a href="#method.from_abi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-IntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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) -&gt; <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/game/mod.rs.html#19" 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
</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) -&gt; <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/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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: &amp;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>) -&gt; <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/game/mod.rs.html#19" 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
</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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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: &amp;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>) -&gt; <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/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionIntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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>() -&gt; 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/game/mod.rs.html#19" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns an ABI instance indicating “none”, which JS will interpret as
</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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionIntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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>() -&gt; 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/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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></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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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>&lt;'static, <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>&gt;</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>&amp;Self</code> parameter. This is
required to ensure that the lifetimes dont 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>) -&gt; 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/game/mod.rs.html#19" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefMutFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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="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>) -&gt; 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/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefMutFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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>&lt;'static, <a class="struct" href="struct.Game.html" title="struct draught::game::Game">Game</a>&gt;</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>) -&gt; 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/game/mod.rs.html#19" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-WasmDescribe" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#19" 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/game/mod.rs.html#19" 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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <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><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>) -&gt; 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/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-WasmDescribe" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#22" 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/game/mod.rs.html#22" 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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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.Game.html" title="struct draught::game::Game">Game</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; 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) -&gt; 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>

View File

@ -4,10 +4,12 @@
<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">&#x2212;</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>
<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>
<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></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>
<table><tr class="module-item"><td><a class="mod" href="board/index.html" title="draught::board mod">board</a></td><td class="docblock-short"><p>Board module for components related to the checkers board and game structure</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"></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="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="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>
<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>
<table><tr class="module-item"><td><a class="fn" href="fn.__wasm_bindgen_generated_init_game.html" title="draught::__wasm_bindgen_generated_init_game fn">__wasm_bindgen_generated_init_game</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.init_game.html" title="draught::init_game fn">init_game</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>

View File

@ -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">
<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">&#9776;</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">&#x2212;</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#25-29" 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">&#x2212;</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">
<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">&gt;</span> { ... };
}</pre></div>

View File

@ -0,0 +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="Default hex colour value for black pieces"><meta name="keywords" content="rust, rustlang, rust-lang, BLACK_PIECE"><title>BLACK_PIECE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="BLACK_PIECE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">BLACK_PIECE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#33" title="goto source code">[src]</a></span></h1><pre class="rust const">const BLACK_PIECE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#ed0000&quot;;</pre><div class="docblock"><p>Default hex colour value for black pieces</p>
</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>

View File

@ -0,0 +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="Default hex colour value for black piece outline"><meta name="keywords" content="rust, rustlang, rust-lang, BLACK_PIECE_OUTLINE"><title>BLACK_PIECE_OUTLINE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="BLACK_PIECE_OUTLINE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">BLACK_PIECE_OUTLINE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#38" title="goto source code">[src]</a></span></h1><pre class="rust const">const BLACK_PIECE_OUTLINE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#a60000&quot;;</pre><div class="docblock"><p>Default hex colour value for black piece outline</p>
</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>

View File

@ -0,0 +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="Default hex colour value for black square background"><meta name="keywords" content="rust, rustlang, rust-lang, BLACK_SQUARE"><title>BLACK_SQUARE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="BLACK_SQUARE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">BLACK_SQUARE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#21" title="goto source code">[src]</a></span></h1><pre class="rust const">const BLACK_SQUARE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#000000&quot;;</pre><div class="docblock"><p>Default hex colour value for black square background</p>
</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>

View File

@ -0,0 +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="Whether to outline black squares"><meta name="keywords" content="rust, rustlang, rust-lang, DRAW_OUTLINE"><title>DRAW_OUTLINE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="DRAW_OUTLINE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">DRAW_OUTLINE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#28" title="goto source code">[src]</a></span></h1><pre class="rust const">const DRAW_OUTLINE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = true;</pre><div class="docblock"><p>Whether to outline black squares</p>
</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>

View File

@ -0,0 +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="Whether to outline pieces"><meta name="keywords" content="rust, rustlang, rust-lang, DRAW_PIECE_OUTLINES"><title>DRAW_PIECE_OUTLINES in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="DRAW_PIECE_OUTLINES" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">DRAW_PIECE_OUTLINES</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#40" title="goto source code">[src]</a></span></h1><pre class="rust const">const DRAW_PIECE_OUTLINES: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> = true;</pre><div class="docblock"><p>Whether to outline pieces</p>
</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>

View File

@ -0,0 +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="Line width when outlining black squares"><meta name="keywords" content="rust, rustlang, rust-lang, OUTLINE_WIDTH"><title>OUTLINE_WIDTH in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="OUTLINE_WIDTH" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">OUTLINE_WIDTH</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#26" title="goto source code">[src]</a></span></h1><pre class="rust const">const OUTLINE_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 3.0;</pre><div class="docblock"><p>Line width when outlining black squares</p>
</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>

View File

@ -0,0 +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="Margin from square to define piece radius"><meta name="keywords" content="rust, rustlang, rust-lang, PIECE_MARGIN"><title>PIECE_MARGIN in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="PIECE_MARGIN" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">PIECE_MARGIN</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#45" title="goto source code">[src]</a></span></h1><pre class="rust const">const PIECE_MARGIN: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 10.0;</pre><div class="docblock"><p>Margin from square to define piece radius</p>
</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>

View File

@ -0,0 +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="Line width for outlining pieces"><meta name="keywords" content="rust, rustlang, rust-lang, PIECE_OUTLINE_WIDTH"><title>PIECE_OUTLINE_WIDTH in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="PIECE_OUTLINE_WIDTH" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">PIECE_OUTLINE_WIDTH</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#42" title="goto source code">[src]</a></span></h1><pre class="rust const">const PIECE_OUTLINE_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 3.0;</pre><div class="docblock"><p>Line width for outlining pieces</p>
</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>

View File

@ -0,0 +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="Default hex colour value for outline of black squares"><meta name="keywords" content="rust, rustlang, rust-lang, SQUARE_OUTLINE"><title>SQUARE_OUTLINE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="SQUARE_OUTLINE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">SQUARE_OUTLINE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#24" title="goto source code">[src]</a></span></h1><pre class="rust const">const SQUARE_OUTLINE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#9c9c9c&quot;;</pre><div class="docblock"><p>Default hex colour value for outline of black squares</p>
</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>

View File

@ -0,0 +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="Default hex colour value for white pieces"><meta name="keywords" content="rust, rustlang, rust-lang, WHITE_PIECE"><title>WHITE_PIECE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="WHITE_PIECE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">WHITE_PIECE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#31" title="goto source code">[src]</a></span></h1><pre class="rust const">const WHITE_PIECE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#dbdbdb&quot;;</pre><div class="docblock"><p>Default hex colour value for white pieces</p>
</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>

View File

@ -0,0 +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="Default hex colour value for white piece outline"><meta name="keywords" content="rust, rustlang, rust-lang, WHITE_PIECE_OUTLINE"><title>WHITE_PIECE_OUTLINE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="WHITE_PIECE_OUTLINE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">WHITE_PIECE_OUTLINE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#36" title="goto source code">[src]</a></span></h1><pre class="rust const">const WHITE_PIECE_OUTLINE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#9c9c9c&quot;;</pre><div class="docblock"><p>Default hex colour value for white piece outline</p>
</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>

View File

@ -0,0 +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="Default hex colour value for white square background"><meta name="keywords" content="rust, rustlang, rust-lang, WHITE_SQUARE"><title>WHITE_SQUARE in draught::paint - 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 constant"><!--[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">&#9776;</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>::<wbr><a href="index.html">paint</a></p><div id="sidebar-vars" data-name="WHITE_SQUARE" data-ty="constant" 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">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">paint</a>::<wbr><a class="constant" href="">WHITE_SQUARE</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#19" title="goto source code">[src]</a></span></h1><pre class="rust const">const WHITE_SQUARE: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;#FFFFFF&quot;;</pre><div class="docblock"><p>Default hex colour value for white square background</p>
</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>

View File

@ -0,0 +1,21 @@
<!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="Components for painting board states onto HTML canvases"><meta name="keywords" content="rust, rustlang, rust-lang, paint"><title>draught::paint - 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">&#9776;</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 paint</p><div class="sidebar-elems"><div class="block items"><ul><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="paint" 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="">paint</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/draught/paint.rs.html#1-330" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Components for painting board states onto HTML canvases</p>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Painter.html" title="draught::paint::Painter struct">Painter</a></td><td class="docblock-short"><p>Used to paint boards onto HTML canvases</p>
</td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<table><tr class="module-item"><td><a class="constant" href="constant.BLACK_PIECE.html" title="draught::paint::BLACK_PIECE constant">BLACK_PIECE</a></td><td class="docblock-short"><p>Default hex colour value for black pieces</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.BLACK_PIECE_OUTLINE.html" title="draught::paint::BLACK_PIECE_OUTLINE constant">BLACK_PIECE_OUTLINE</a></td><td class="docblock-short"><p>Default hex colour value for black piece outline</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.BLACK_SQUARE.html" title="draught::paint::BLACK_SQUARE constant">BLACK_SQUARE</a></td><td class="docblock-short"><p>Default hex colour value for black square background</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.DRAW_OUTLINE.html" title="draught::paint::DRAW_OUTLINE constant">DRAW_OUTLINE</a></td><td class="docblock-short"><p>Whether to outline black squares</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.DRAW_PIECE_OUTLINES.html" title="draught::paint::DRAW_PIECE_OUTLINES constant">DRAW_PIECE_OUTLINES</a></td><td class="docblock-short"><p>Whether to outline pieces</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.OUTLINE_WIDTH.html" title="draught::paint::OUTLINE_WIDTH constant">OUTLINE_WIDTH</a></td><td class="docblock-short"><p>Line width when outlining black squares</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.PIECE_MARGIN.html" title="draught::paint::PIECE_MARGIN constant">PIECE_MARGIN</a></td><td class="docblock-short"><p>Margin from square to define piece radius</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.PIECE_OUTLINE_WIDTH.html" title="draught::paint::PIECE_OUTLINE_WIDTH constant">PIECE_OUTLINE_WIDTH</a></td><td class="docblock-short"><p>Line width for outlining pieces</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.SQUARE_OUTLINE.html" title="draught::paint::SQUARE_OUTLINE constant">SQUARE_OUTLINE</a></td><td class="docblock-short"><p>Default hex colour value for outline of black squares</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.WHITE_PIECE.html" title="draught::paint::WHITE_PIECE constant">WHITE_PIECE</a></td><td class="docblock-short"><p>Default hex colour value for white pieces</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.WHITE_PIECE_OUTLINE.html" title="draught::paint::WHITE_PIECE_OUTLINE constant">WHITE_PIECE_OUTLINE</a></td><td class="docblock-short"><p>Default hex colour value for white piece outline</p>
</td></tr><tr class="module-item"><td><a class="constant" href="constant.WHITE_SQUARE.html" title="draught::paint::WHITE_SQUARE constant">WHITE_SQUARE</a></td><td class="docblock-short"><p>Default hex colour value for white square background</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>

View File

@ -0,0 +1 @@
initSidebarItems({"constant":[["BLACK_PIECE","Default hex colour value for black pieces"],["BLACK_PIECE_OUTLINE","Default hex colour value for black piece outline"],["BLACK_SQUARE","Default hex colour value for black square background"],["DRAW_OUTLINE","Whether to outline black squares"],["DRAW_PIECE_OUTLINES","Whether to outline pieces"],["OUTLINE_WIDTH","Line width when outlining black squares"],["PIECE_MARGIN","Margin from square to define piece radius"],["PIECE_OUTLINE_WIDTH","Line width for outlining pieces"],["SQUARE_OUTLINE","Default hex colour value for outline of black squares"],["WHITE_PIECE","Default hex colour value for white pieces"],["WHITE_PIECE_OUTLINE","Default hex colour value for white piece outline"],["WHITE_SQUARE","Default hex colour value for white square background"]],"struct":[["Painter","Used to paint boards onto HTML canvases"]]});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
initSidebarItems({"fn":[["__wasm_bindgen_generated_init_game",""],["init_game",""]],"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",""],["player",""],["utils",""]]});
initSidebarItems({"fn":[["__wasm_bindgen_generated_init_game",""],["init_game",""]],"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",""]]});

View File

@ -1,3 +1,3 @@
(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>&lt;<a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>&gt; 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>&lt;<a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>&gt; 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;}})()

View File

@ -1,3 +1,3 @@
(function() {var implementors = {};
implementors["draught"] = [{"text":"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=\"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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> + <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>&gt; <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=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a>&lt;T&gt;","synthetic":false,"types":["draught::board::Direction"]},{"text":"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=\"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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/comp/struct.Computer.html\" title=\"struct draught::comp::Computer\">Computer</a>","synthetic":false,"types":["draught::comp::Computer"]}];
implementors["draught"] = [{"text":"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=\"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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> + <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>&gt; <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=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a>&lt;T&gt;","synthetic":false,"types":["draught::board::Direction"]},{"text":"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=\"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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</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://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/paint/struct.Painter.html\" title=\"struct draught::paint::Painter\">Painter</a>","synthetic":false,"types":["draught::paint::Painter"]},{"text":"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=\"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/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/comp/struct.Computer.html\" title=\"struct draught::comp::Computer\">Computer</a>","synthetic":false,"types":["draught::comp::Computer"]}];
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

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -1,3 +1,3 @@
(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"]}];
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"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
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","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","player.rs","utils.rs"]};
createSourceSidebar();

View File

@ -85,7 +85,7 @@
<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">std::fmt</span>::{<span class="ident">Display</span>, <span class="ident">Write</span>};
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</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>

View File

@ -195,8 +195,9 @@
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board</span>::{<span class="ident">Board</span>, <span class="ident">Piece</span>, <span class="ident">Square</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board</span>::{<span class="ident">Board</span>, <span class="ident">Square</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums</span>::<span class="kw-2">*</span>;
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RowIndexIterator</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span> {
@ -302,9 +303,10 @@
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span> {
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums::SquareState</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::Piece</span>;
<span class="kw">use</span> <span class="ident">wasm_bindgen_test</span>::<span class="kw-2">*</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::log</span>;
<span class="comment">// use crate::log;</span>
<span class="macro">wasm_bindgen_test_configure!</span>(<span class="ident">run_in_browser</span>);

View File

@ -796,6 +796,11 @@
<span id="793">793</span>
<span id="794">794</span>
<span id="795">795</span>
<span id="796">796</span>
<span id="797">797</span>
<span id="798">798</span>
<span id="799">799</span>
<span id="800">800</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Board module for components related to the checkers board and game structure</span>
@ -813,6 +818,8 @@
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>, <span class="ident">Write</span>};
<span class="kw">use</span> <span class="ident">std::option::Option</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::log</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>;
@ -918,8 +925,8 @@
<span class="attribute">#[<span class="ident">wasm_bindgen</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">BrdIdx</span> {
<span class="ident">row</span>: <span class="ident">usize</span>,
<span class="ident">col</span>: <span class="ident">usize</span>
<span class="kw">pub</span> <span class="ident">row</span>: <span class="ident">usize</span>,
<span class="kw">pub</span> <span class="ident">col</span>: <span class="ident">usize</span>
}
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
@ -1580,10 +1587,13 @@
<span class="kw">for</span> <span class="ident">j</span> <span class="kw">in</span> <span class="number">0</span>..<span class="self">self</span>.<span class="ident">width</span> {
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cell_index</span>(<span class="ident">i</span>, <span class="ident">j</span>);
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="ident">idx</span>) {
<span class="ident">Empty</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="macro">write!</span>(<span class="ident">string</span>, <span class="string">&quot;_ &quot;</span>); },
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="macro">write!</span>(<span class="ident">string</span>, <span class="string">&quot;{} &quot;</span>, <span class="self">self</span>.<span class="ident">cell</span>(<span class="ident">idx</span>).<span class="ident">occupant</span>.<span class="ident">unwrap</span>().<span class="ident">team</span>); },
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">&gt;</span> { <span class="macro">write!</span>(<span class="ident">string</span>, <span class="string">&quot;. &quot;</span>); },
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="ident">idx</span>) {
<span class="ident">Empty</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">write!</span>(<span class="ident">string</span>, <span class="string">&quot;_ &quot;</span>),
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">write!</span>(<span class="ident">string</span>, <span class="string">&quot;{} &quot;</span>, <span class="self">self</span>.<span class="ident">cell</span>(<span class="ident">idx</span>).<span class="ident">occupant</span>.<span class="ident">unwrap</span>().<span class="ident">team</span>),
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">write!</span>(<span class="ident">string</span>, <span class="string">&quot;. &quot;</span>),
};
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span> <span class="ident">result</span> {
<span class="macro">log!</span>(<span class="string">&quot;Error printing cell state, ({}, {}), {}&quot;</span>, <span class="ident">i</span>, <span class="ident">j</span>, <span class="ident">err</span>);
}
}
<span class="ident">string</span>.<span class="ident">push</span>(<span class="string">&#39;\n&#39;</span>);

View File

@ -148,25 +148,39 @@
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! AI player logic</span>
<span class="kw">use</span> <span class="ident">indextree</span>::{<span class="ident">Arena</span>, <span class="ident">NodeId</span>, <span class="ident">Node</span>};
<span class="kw">use</span> <span class="ident">indextree</span>::{<span class="ident">Arena</span>, <span class="ident">NodeId</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="comment">// use wasm_bindgen::prelude::*;</span>
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::log</span>;
<span class="comment">// use crate::log;</span>
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board</span>::{<span class="ident">Square</span>, <span class="ident">Board</span>, <span class="ident">BrdIdx</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums</span>::{<span class="ident">SquareState</span>, <span class="ident">MoveType</span>, <span class="ident">Moveable</span>, <span class="ident">Team</span>, <span class="ident">Strength</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board</span>::{<span class="ident">Board</span>, <span class="ident">BrdIdx</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums</span>::{<span class="ident">MoveType</span>, <span class="ident">Moveable</span>, <span class="ident">Team</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::iter</span>::{<span class="ident">PieceIterator</span>};
<span class="kw">use</span> <span class="ident">Team</span>::<span class="kw-2">*</span>;
<span class="kw">use</span> <span class="ident">Strength</span>::<span class="kw-2">*</span>;
<span class="kw">use</span> <span class="ident">SquareState</span>::<span class="kw-2">*</span>;
<span class="comment">// use Team::*;</span>
<span class="comment">// use Strength::*;</span>
<span class="comment">// use SquareState::*;</span>
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>, <span class="ident">Write</span>};
<span class="comment">// use std::fmt::{Display, Write};</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>;
@ -267,9 +281,23 @@
<span class="ident">moves</span>
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">gen_tree</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">board</span>: <span class="ident">Board</span>) {
<span class="comment">// pub fn gen_tree(&amp;mut self, tree: &amp;mut Arena&lt;Board&gt;, board: Board) {</span>
}
<span class="comment">// let boards = self.get_move_boards(&amp;board);</span>
<span class="comment">// let root_id = vec!(tree.new_node(board));</span>
<span class="comment">// let ids = self.insert_boards(boards);</span>
<span class="comment">// for d in 0..self.search_depth {</span>
<span class="comment">// for root in root_id.iter(){</span>
<span class="comment">// for id in ids.into_iter() {</span>
<span class="comment">// root.append(id, tree);</span>
<span class="comment">// }</span>
<span class="comment">// }</span>
<span class="comment">// }</span>
<span class="comment">// }</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">insert_boards</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">boards</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Board</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">NodeId</span><span class="op">&gt;</span> {

View File

@ -106,7 +106,47 @@
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<span id="120">120</span>
<span id="121">121</span>
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
</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="kw">use</span> <span class="kw">crate</span><span class="ident">::board::Board</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
@ -115,12 +155,13 @@
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::log</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board</span>::{<span class="ident">Square</span>, <span class="ident">BrdIdx</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums</span>::{<span class="ident">SquareState</span>, <span class="ident">Moveable</span>, <span class="ident">Team</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums</span>::{<span class="ident">Moveable</span>, <span class="ident">Team</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::paint::Painter</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="comment">// use Team::*;</span>
<span class="comment">// use SquareState::*;</span>
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</span>, <span class="ident">Write</span>};
<span class="kw">use</span> <span class="ident">std::fmt</span>::{<span class="ident">Display</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>;
@ -130,6 +171,7 @@
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Game</span> {
<span class="ident">current</span>: <span class="ident">Board</span>,
<span class="ident">previous_boards</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Board</span><span class="op">&gt;</span>,
<span class="ident">painter</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Painter</span><span class="op">&gt;</span>
}
<span class="kw">impl</span> <span class="ident">Game</span> {
@ -146,6 +188,16 @@
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
<span class="kw">impl</span> <span class="ident">Game</span> {
<span class="doccomment">/// Get pointer to current board&#39;s squares</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_board_cells</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="kw-2">*</span><span class="kw">const</span> <span class="ident">Square</span> {
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cells</span>()
}
<span class="doccomment">/// Get pointer to current board&#39;s squares</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_board_len</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">usize</span> {
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">num_cells</span>()
}
<span class="doccomment">/// Current turn&#39;s team</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_turn</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Team</span> {
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">current_turn</span>
@ -203,6 +255,30 @@
<span class="ident">Board::new</span>(<span class="ident">width</span>, <span class="ident">height</span>, <span class="ident">first_turn</span>), <span class="ident">piece_rows</span>,
),
<span class="ident">previous_boards</span>: <span class="ident">Vec::with_capacity</span>(<span class="number">10</span>),
<span class="ident">painter</span>: <span class="prelude-val">None</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">canvas_id</span>: <span class="kw-2">&amp;</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">&gt;</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">Board::new</span>(<span class="ident">width</span>, <span class="ident">height</span>, <span class="ident">first_turn</span>), <span class="ident">piece_rows</span>,
),
<span class="ident">previous_boards</span>: <span class="ident">Vec::with_capacity</span>(<span class="number">10</span>),
<span class="ident">painter</span>: <span class="prelude-val">Some</span>(
<span class="ident">Painter::new</span>(<span class="ident">canvas_width</span>, <span class="ident">canvas_height</span>, <span class="ident">canvas_id</span>)
),
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_painter</span>(<span class="kw-2">&amp;</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="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="kw">match</span> <span class="kw-2">&amp;</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">&gt;</span> <span class="ident">p</span>.<span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">current</span>),
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">log!</span>(<span class="string">&quot;No painter to draw board with&quot;</span>)
}
}
}
@ -211,6 +287,7 @@
<span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">std::fmt::Formatter</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">std::fmt::Result</span>{
<span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;{}&quot;</span>, <span class="self">self</span>.<span class="ident">current</span>)
}
}</pre></div>
}
</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>

View File

@ -48,6 +48,7 @@
<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">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">comp</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
@ -55,6 +56,8 @@
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">board::Board</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">game::Game</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">comp::Computer</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">paint::Painter</span>;
<span class="comment">// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global</span>
<span class="comment">// allocator.</span>
@ -72,11 +75,8 @@
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">init_game</span>() {
<span class="macro">log!</span>(<span class="string">&quot;initialising wasm&quot;</span>);
<span class="macro">log!</span>(<span class="string">&quot;Initialising WebAssembly&quot;</span>);
<span class="ident">utils::set_panic_hook</span>();
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">&quot;random_init&quot;</span>)]</span>
<span class="macro">log!</span>(<span class="string">&quot;random layout enabled&quot;</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>

View File

@ -0,0 +1,666 @@
<!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/paint.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>paint.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">&#9776;</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>
<span id="9"> 9</span>
<span id="10"> 10</span>
<span id="11"> 11</span>
<span id="12"> 12</span>
<span id="13"> 13</span>
<span id="14"> 14</span>
<span id="15"> 15</span>
<span id="16"> 16</span>
<span id="17"> 17</span>
<span id="18"> 18</span>
<span id="19"> 19</span>
<span id="20"> 20</span>
<span id="21"> 21</span>
<span id="22"> 22</span>
<span id="23"> 23</span>
<span id="24"> 24</span>
<span id="25"> 25</span>
<span id="26"> 26</span>
<span id="27"> 27</span>
<span id="28"> 28</span>
<span id="29"> 29</span>
<span id="30"> 30</span>
<span id="31"> 31</span>
<span id="32"> 32</span>
<span id="33"> 33</span>
<span id="34"> 34</span>
<span id="35"> 35</span>
<span id="36"> 36</span>
<span id="37"> 37</span>
<span id="38"> 38</span>
<span id="39"> 39</span>
<span id="40"> 40</span>
<span id="41"> 41</span>
<span id="42"> 42</span>
<span id="43"> 43</span>
<span id="44"> 44</span>
<span id="45"> 45</span>
<span id="46"> 46</span>
<span id="47"> 47</span>
<span id="48"> 48</span>
<span id="49"> 49</span>
<span id="50"> 50</span>
<span id="51"> 51</span>
<span id="52"> 52</span>
<span id="53"> 53</span>
<span id="54"> 54</span>
<span id="55"> 55</span>
<span id="56"> 56</span>
<span id="57"> 57</span>
<span id="58"> 58</span>
<span id="59"> 59</span>
<span id="60"> 60</span>
<span id="61"> 61</span>
<span id="62"> 62</span>
<span id="63"> 63</span>
<span id="64"> 64</span>
<span id="65"> 65</span>
<span id="66"> 66</span>
<span id="67"> 67</span>
<span id="68"> 68</span>
<span id="69"> 69</span>
<span id="70"> 70</span>
<span id="71"> 71</span>
<span id="72"> 72</span>
<span id="73"> 73</span>
<span id="74"> 74</span>
<span id="75"> 75</span>
<span id="76"> 76</span>
<span id="77"> 77</span>
<span id="78"> 78</span>
<span id="79"> 79</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>
<span id="87"> 87</span>
<span id="88"> 88</span>
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<span id="120">120</span>
<span id="121">121</span>
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</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>
<span id="235">235</span>
<span id="236">236</span>
<span id="237">237</span>
<span id="238">238</span>
<span id="239">239</span>
<span id="240">240</span>
<span id="241">241</span>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
<span id="273">273</span>
<span id="274">274</span>
<span id="275">275</span>
<span id="276">276</span>
<span id="277">277</span>
<span id="278">278</span>
<span id="279">279</span>
<span id="280">280</span>
<span id="281">281</span>
<span id="282">282</span>
<span id="283">283</span>
<span id="284">284</span>
<span id="285">285</span>
<span id="286">286</span>
<span id="287">287</span>
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</span>
<span id="291">291</span>
<span id="292">292</span>
<span id="293">293</span>
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
<span id="299">299</span>
<span id="300">300</span>
<span id="301">301</span>
<span id="302">302</span>
<span id="303">303</span>
<span id="304">304</span>
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
<span id="315">315</span>
<span id="316">316</span>
<span id="317">317</span>
<span id="318">318</span>
<span id="319">319</span>
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</span>
<span id="325">325</span>
<span id="326">326</span>
<span id="327">327</span>
<span id="328">328</span>
<span id="329">329</span>
<span id="330">330</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Components for painting board states onto HTML canvases</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</span>::{<span class="ident">JsCast</span>, <span class="ident">JsValue</span>};
<span class="kw">use</span> <span class="ident">web_sys::HtmlCanvasElement</span>;
<span class="kw">use</span> <span class="ident">web_sys::CanvasRenderingContext2d</span>;
<span class="kw">use</span> <span class="ident">std::f64</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::log</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board</span>::{<span class="ident">Board</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::iter::PieceIterator</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::board::enums::Team</span>::<span class="kw-2">*</span>;
<span class="doccomment">/// Default hex colour value for white square background</span>
<span class="kw">const</span> <span class="ident">WHITE_SQUARE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#FFFFFF&quot;</span>;
<span class="doccomment">/// Default hex colour value for black square background</span>
<span class="kw">const</span> <span class="ident">BLACK_SQUARE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#000000&quot;</span>;
<span class="doccomment">/// Default hex colour value for outline of black squares</span>
<span class="kw">const</span> <span class="ident">SQUARE_OUTLINE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#9c9c9c&quot;</span>;
<span class="doccomment">/// Line width when outlining black squares</span>
<span class="kw">const</span> <span class="ident">OUTLINE_WIDTH</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="number">3.0</span>;
<span class="doccomment">/// Whether to outline black squares</span>
<span class="kw">const</span> <span class="ident">DRAW_OUTLINE</span>: <span class="ident">bool</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="doccomment">/// Default hex colour value for white pieces</span>
<span class="kw">const</span> <span class="ident">WHITE_PIECE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#dbdbdb&quot;</span>;
<span class="doccomment">/// Default hex colour value for black pieces</span>
<span class="kw">const</span> <span class="ident">BLACK_PIECE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#ed0000&quot;</span>;
<span class="doccomment">/// Default hex colour value for white piece outline</span>
<span class="kw">const</span> <span class="ident">WHITE_PIECE_OUTLINE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#9c9c9c&quot;</span>;
<span class="doccomment">/// Default hex colour value for black piece outline</span>
<span class="kw">const</span> <span class="ident">BLACK_PIECE_OUTLINE</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;#a60000&quot;</span>;
<span class="doccomment">/// Whether to outline pieces</span>
<span class="kw">const</span> <span class="ident">DRAW_PIECE_OUTLINES</span>: <span class="ident">bool</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="doccomment">/// Line width for outlining pieces</span>
<span class="kw">const</span> <span class="ident">PIECE_OUTLINE_WIDTH</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="number">3.0</span>;
<span class="doccomment">/// Margin from square to define piece radius</span>
<span class="kw">const</span> <span class="ident">PIECE_MARGIN</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="number">10.0</span>;
<span class="doccomment">/// Used to paint boards onto HTML canvases</span>
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Painter</span> {
<span class="ident">canvas</span>: <span class="ident">HtmlCanvasElement</span>,
<span class="ident">context</span>: <span class="ident">CanvasRenderingContext2d</span>,
<span class="ident">white_square</span>: <span class="ident">JsValue</span>,
<span class="ident">black_square</span>: <span class="ident">JsValue</span>,
<span class="ident">white_piece</span>: <span class="ident">JsValue</span>,
<span class="ident">black_piece</span>: <span class="ident">JsValue</span>,
<span class="ident">white_piece_line</span>: <span class="ident">JsValue</span>,
<span class="ident">black_piece_line</span>: <span class="ident">JsValue</span>,
<span class="ident">piece_lines</span>: <span class="ident">bool</span>,
<span class="ident">piece_line_width</span>: <span class="ident">f64</span>,
<span class="ident">square_outline</span>: <span class="ident">JsValue</span>,
<span class="ident">outline_width</span>: <span class="ident">f64</span>,
<span class="ident">draw_outline</span>: <span class="ident">bool</span>,
<span class="ident">width</span>: <span class="ident">u32</span>,
<span class="ident">height</span>: <span class="ident">u32</span>,
}
<span class="kw">impl</span> <span class="ident">Painter</span> {
<span class="doccomment">/// Get a canvas by element ID</span>
<span class="kw">fn</span> <span class="ident">get_canvas</span>(<span class="ident">canvas_id</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">HtmlCanvasElement</span> {
<span class="comment">// JS WINDOW</span>
<span class="kw">let</span> <span class="ident">window</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">web_sys::window</span>(){
<span class="prelude-val">Some</span>(<span class="ident">win</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">win</span>,
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;No Js window returned&quot;</span>),
};
<span class="comment">// JS DOCUMENT</span>
<span class="kw">let</span> <span class="ident">document</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">window</span>.<span class="ident">document</span>() {
<span class="prelude-val">Some</span>(<span class="ident">doc</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">doc</span>,
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;No Js window document returned&quot;</span>),
};
<span class="comment">// CANVAS</span>
<span class="kw">let</span> <span class="ident">canvas</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">document</span>.<span class="ident">get_element_by_id</span>(<span class="ident">canvas_id</span>) {
<span class="prelude-val">Some</span>(<span class="ident">el</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">el</span>,
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;No element found for {}&quot;</span>, <span class="ident">canvas_id</span>),
};
<span class="kw">let</span> <span class="ident">canvas</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">canvas</span>.<span class="ident">dyn_into</span>::<span class="op">&lt;</span><span class="ident">web_sys::HtmlCanvasElement</span><span class="op">&gt;</span>() {
<span class="prelude-val">Ok</span>(<span class="ident">el</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">el</span>,
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;Failed to cast canvas {:?}&quot;</span>, <span class="ident">err</span>),
};
<span class="ident">canvas</span>
}
<span class="doccomment">/// Get a 2D canvas context for a given canvas</span>
<span class="kw">fn</span> <span class="ident">get_canvas_context</span>(<span class="ident">canvas</span>: <span class="kw-2">&amp;</span><span class="ident">HtmlCanvasElement</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">CanvasRenderingContext2d</span> {
<span class="comment">// CANVAS CONTEXT</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">canvas</span>.<span class="ident">get_context</span>(<span class="string">&quot;2d&quot;</span>) {
<span class="prelude-val">Ok</span>(<span class="ident">op</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="ident">op</span> {
<span class="comment">// UNWRAP OPTION</span>
<span class="prelude-val">Some</span>(<span class="ident">object</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">object</span>,
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;Nothing found when unwrapping canvas context&quot;</span>),
},
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;Error when getting canvas context: {:?}&quot;</span>, <span class="ident">err</span>),
};
<span class="comment">// CAST CONTEXT</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">context</span>.<span class="ident">dyn_into</span>::<span class="op">&lt;</span><span class="ident">web_sys::CanvasRenderingContext2d</span><span class="op">&gt;</span>() {
<span class="prelude-val">Ok</span>(<span class="ident">dyn_cast</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">dyn_cast</span>,
<span class="prelude-val">Err</span>(<span class="ident">cast_err</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;Error when casting canvas context: {:?}&quot;</span>, <span class="ident">cast_err</span>)
};
<span class="ident">context</span>
}
}
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
<span class="kw">impl</span> <span class="ident">Painter</span> {
<span class="doccomment">/// Default constructor which queries for canvas by ID</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">u32</span>, <span class="ident">height</span>: <span class="ident">u32</span>, <span class="ident">canvas_id</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Painter</span> {
<span class="kw">let</span> <span class="ident">canvas</span> <span class="op">=</span> <span class="ident">Painter::get_canvas</span>(<span class="ident">canvas_id</span>);
<span class="ident">canvas</span>.<span class="ident">set_width</span>(<span class="ident">width</span>);
<span class="ident">canvas</span>.<span class="ident">set_height</span>(<span class="ident">height</span>);
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Painter::get_canvas_context</span>(<span class="kw-2">&amp;</span><span class="ident">canvas</span>);
<span class="ident">Painter</span> {
<span class="ident">canvas</span>,
<span class="ident">context</span>,
<span class="ident">width</span>, <span class="ident">height</span>,
<span class="ident">white_square</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">WHITE_SQUARE</span>),
<span class="ident">black_square</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">BLACK_SQUARE</span>),
<span class="ident">white_piece</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">WHITE_PIECE</span>),
<span class="ident">black_piece</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">BLACK_PIECE</span>),
<span class="ident">white_piece_line</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">WHITE_PIECE_OUTLINE</span>),
<span class="ident">black_piece_line</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">BLACK_PIECE_OUTLINE</span>),
<span class="ident">piece_lines</span>: <span class="ident">DRAW_PIECE_OUTLINES</span>,
<span class="ident">piece_line_width</span>: <span class="ident">PIECE_OUTLINE_WIDTH</span>,
<span class="ident">square_outline</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">SQUARE_OUTLINE</span>),
<span class="ident">outline_width</span>: <span class="ident">OUTLINE_WIDTH</span>,
<span class="ident">draw_outline</span>: <span class="ident">DRAW_OUTLINE</span>,
}
}
<span class="doccomment">/// Constructor with given canvas element</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">u32</span>, <span class="ident">height</span>: <span class="ident">u32</span>, <span class="ident">canvas</span>: <span class="ident">HtmlCanvasElement</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Painter</span> {
<span class="ident">canvas</span>.<span class="ident">set_width</span>(<span class="ident">width</span>);
<span class="ident">canvas</span>.<span class="ident">set_height</span>(<span class="ident">height</span>);
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Painter::get_canvas_context</span>(<span class="kw-2">&amp;</span><span class="ident">canvas</span>);
<span class="ident">Painter</span> {
<span class="ident">canvas</span>,
<span class="ident">context</span>,
<span class="ident">width</span>, <span class="ident">height</span>,
<span class="ident">white_square</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">WHITE_SQUARE</span>),
<span class="ident">black_square</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">BLACK_SQUARE</span>),
<span class="ident">white_piece</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">WHITE_PIECE</span>),
<span class="ident">black_piece</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">BLACK_PIECE</span>),
<span class="ident">white_piece_line</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">WHITE_PIECE_OUTLINE</span>),
<span class="ident">black_piece_line</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">BLACK_PIECE_OUTLINE</span>),
<span class="ident">piece_lines</span>: <span class="ident">DRAW_PIECE_OUTLINES</span>,
<span class="ident">piece_line_width</span>: <span class="ident">PIECE_OUTLINE_WIDTH</span>,
<span class="ident">square_outline</span>: <span class="ident">JsValue::from_str</span>(<span class="ident">SQUARE_OUTLINE</span>),
<span class="ident">outline_width</span>: <span class="ident">OUTLINE_WIDTH</span>,
<span class="ident">draw_outline</span>: <span class="ident">DRAW_OUTLINE</span>,
}
}
<span class="doccomment">/// Set new square outline colour value</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_square_outline</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">value</span>: <span class="ident">JsValue</span>) {
<span class="self">self</span>.<span class="ident">square_outline</span> <span class="op">=</span> <span class="ident">value</span>;
}
<span class="doccomment">/// Set new line width for outlining squares</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_outline_width</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">value</span>: <span class="ident">f64</span>) {
<span class="self">self</span>.<span class="ident">outline_width</span> <span class="op">=</span> <span class="ident">value</span>;
}
<span class="doccomment">/// Set whether squares are outlined</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_draw_outline</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">value</span>: <span class="ident">bool</span>) {
<span class="self">self</span>.<span class="ident">draw_outline</span> <span class="op">=</span> <span class="ident">value</span>;
}
<span class="doccomment">/// Reset the canvas dimensions to the given width and height</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">reset_dimensions</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="self">self</span>.<span class="ident">canvas</span>.<span class="ident">set_width</span>(<span class="self">self</span>.<span class="ident">width</span>);
<span class="self">self</span>.<span class="ident">canvas</span>.<span class="ident">set_height</span>(<span class="self">self</span>.<span class="ident">height</span>);
}
<span class="doccomment">/// Check whether given canvas dimensions divide evenly by given board dimenions</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_board_dim</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">board</span>: <span class="kw-2">&amp;</span><span class="ident">Board</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ans</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">usize</span> <span class="op">%</span> <span class="ident">board</span>.<span class="ident">height</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> {
<span class="macro">log!</span>(<span class="string">&quot;Canvas and board heights do not evenly divide, Canvas({}) / Board({}) = {} px/cell&quot;</span>, <span class="self">self</span>.<span class="ident">height</span>, <span class="ident">board</span>.<span class="ident">height</span>, <span class="self">self</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">f32</span> <span class="op">/</span> <span class="ident">board</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">f32</span>);
<span class="ident">ans</span> <span class="op">=</span> <span class="bool-val">false</span>;
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">usize</span> <span class="op">%</span> <span class="ident">board</span>.<span class="ident">width</span> <span class="op">!</span><span class="op">=</span> <span class="number">0</span> {
<span class="macro">log!</span>(<span class="string">&quot;Canvas and board widths do not evenly divide, Canvas({}) / Board({}) = {} px/cell&quot;</span>, <span class="self">self</span>.<span class="ident">width</span>, <span class="ident">board</span>.<span class="ident">width</span>, <span class="self">self</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">f32</span> <span class="op">/</span> <span class="ident">board</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">f32</span>);
<span class="ident">ans</span> <span class="op">=</span> <span class="bool-val">false</span>;
}
<span class="ident">ans</span>
}
<span class="doccomment">/// Draw a board onto the canvas</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">board</span>: <span class="kw-2">&amp;</span><span class="ident">Board</span>) {
<span class="self">self</span>.<span class="ident">validate_board_dim</span>(<span class="ident">board</span>);
<span class="kw">let</span> <span class="ident">cell_height</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">usize</span> <span class="op">/</span> <span class="ident">board</span>.<span class="ident">height</span>;
<span class="kw">let</span> <span class="ident">cell_width</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">usize</span> <span class="op">/</span> <span class="ident">board</span>.<span class="ident">width</span>;
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_fill_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">white_square</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">fill_rect</span>(<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="self">self</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">f64</span>, <span class="self">self</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">f64</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_fill_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">black_square</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_stroke_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">square_outline</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_line_width</span>(<span class="self">self</span>.<span class="ident">outline_width</span>);
<span class="comment">// Draw black squares onto canvas</span>
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">board</span>.<span class="ident">height</span> {
<span class="kw">for</span> <span class="ident">j</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">board</span>.<span class="ident">width</span> {
<span class="kw">if</span> <span class="ident">i</span> <span class="op">%</span> <span class="number">2</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
<span class="kw">if</span> <span class="ident">j</span> <span class="op">%</span> <span class="number">2</span> <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">fill_rect</span>(
(<span class="ident">j</span> <span class="op">*</span> <span class="ident">cell_width</span>) <span class="kw">as</span> <span class="ident">f64</span>,
(<span class="ident">i</span> <span class="op">*</span> <span class="ident">cell_height</span>) <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_height</span> <span class="kw">as</span> <span class="ident">f64</span>
);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">draw_outline</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">stroke_rect</span>(
(<span class="ident">j</span> <span class="op">*</span> <span class="ident">cell_width</span>) <span class="kw">as</span> <span class="ident">f64</span>,
(<span class="ident">i</span> <span class="op">*</span> <span class="ident">cell_height</span>) <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_height</span> <span class="kw">as</span> <span class="ident">f64</span>
);
}
}
}
<span class="kw">else</span> {
<span class="kw">if</span> <span class="ident">j</span> <span class="op">%</span> <span class="number">2</span> <span class="op">=</span><span class="op">=</span> <span class="number">0</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">fill_rect</span>(
(<span class="ident">j</span> <span class="op">*</span> <span class="ident">cell_width</span>) <span class="kw">as</span> <span class="ident">f64</span>,
(<span class="ident">i</span> <span class="op">*</span> <span class="ident">cell_height</span>) <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_height</span> <span class="kw">as</span> <span class="ident">f64</span>
);
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">draw_outline</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">stroke_rect</span>(
(<span class="ident">j</span> <span class="op">*</span> <span class="ident">cell_width</span>) <span class="kw">as</span> <span class="ident">f64</span>,
(<span class="ident">i</span> <span class="op">*</span> <span class="ident">cell_height</span>) <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span>,
<span class="ident">cell_height</span> <span class="kw">as</span> <span class="ident">f64</span>
);
}
}
}
}
}
<span class="comment">// Draw pieces onto canvas</span>
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">square</span>) <span class="kw">in</span> <span class="ident">PieceIterator::new</span>(<span class="ident">board</span>) {
<span class="kw">match</span> <span class="ident">square</span>.<span class="ident">occupant</span> {
<span class="prelude-val">Some</span>(<span class="ident">piece</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">brd_idx</span> <span class="op">=</span> <span class="ident">board</span>.<span class="ident">board_index</span>(<span class="ident">idx</span>);
<span class="kw">match</span> <span class="ident">piece</span>.<span class="ident">team</span> {
<span class="ident">Black</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_fill_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">black_piece</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_stroke_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">black_piece_line</span>);
},
<span class="ident">White</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_fill_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">white_piece</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_stroke_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">white_piece_line</span>);
},
}
<span class="kw">let</span> <span class="ident">center_x</span>: <span class="ident">f64</span> <span class="op">=</span> (<span class="ident">brd_idx</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">*</span> <span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">+</span> (<span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="number">2.0</span>;
<span class="kw">let</span> <span class="ident">center_y</span>: <span class="ident">f64</span> <span class="op">=</span> (<span class="ident">brd_idx</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">*</span> <span class="ident">cell_height</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">+</span> (<span class="ident">cell_height</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> <span class="number">2.0</span>;
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">begin_path</span>();
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">context</span>.<span class="ident">arc</span>(
<span class="ident">center_x</span>,
<span class="ident">center_y</span>,
(<span class="ident">cell_width</span> <span class="kw">as</span> <span class="ident">f64</span> <span class="op">/</span> <span class="number">2.0</span>) <span class="op">-</span> <span class="ident">PIECE_MARGIN</span>, <span class="comment">// radius </span>
<span class="number">0.0</span>, <span class="comment">// start angle</span>
<span class="ident">f64::consts::PI</span> <span class="op">*</span> <span class="number">2.0</span>) <span class="comment">// end angle</span>
{
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">res</span>,
<span class="prelude-val">Err</span>(<span class="ident">err</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">log!</span>(<span class="string">&quot;Failed to draw piece, idx: {}, square: {:?}, {:?}&quot;</span>, <span class="ident">idx</span>, <span class="ident">square</span>, <span class="ident">err</span>),
};
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">fill</span>();
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">piece_lines</span> {
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">set_line_width</span>(<span class="self">self</span>.<span class="ident">piece_line_width</span>);
<span class="self">self</span>.<span class="ident">context</span>.<span class="ident">stroke</span>()
}
},
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">panic!</span>(<span class="string">&quot;No piece found when attempting to draw, idx: {}, square: {:?}&quot;</span>, <span class="ident">idx</span>, <span class="ident">square</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>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<title>game of life</title>
<title>draught</title>
<style>
body {
/* position: absolute; */