From e9f9c06edb1b0c2fc94e5ff9a6cea6cf70876f0b Mon Sep 17 00:00:00 2001 From: Rak Laptudirm Date: Sat, 25 May 2024 20:29:39 +0530 Subject: [PATCH] chore: fix a bunch of doc issues --- ataxx/src/move.rs | 13 +++++++------ ataxx/src/position.rs | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ataxx/src/move.rs b/ataxx/src/move.rs index 4419f2d..30efe01 100644 --- a/ataxx/src/move.rs +++ b/ataxx/src/move.rs @@ -152,10 +152,11 @@ impl FromStr for Move { type Err = MoveParseError; /// from_str converts the given string representation of a Move into a [Move]. - /// The formats supported are '0000' for a [Move::PASS], for a singular - /// Move, and for a jump Move. For how and - /// are parsed, take a look at [`Square::FromStr`](Square::from_str). This - /// function can be treated as the inverse of [`Move::Display`]. + /// The formats supported are '0000' for a [Move::PASS], `` for a + /// singular Move, and `` for a jump Move. For how `` + /// and `` are parsed, take a look at + /// [`Square::FromStr`](Square::from_str). This function can be treated as the + /// inverse of the [`fmt::Display`] trait for [Move]. /// ``` /// use ataxx::*; /// use std::str::FromStr; @@ -239,8 +240,8 @@ impl fmt::Debug for Move { /// MoveStore is a trait implemented by types which are able to store [Move]s inside /// themselves and are thus usable in move-generation methods in -/// [Board](super::Board) like -/// [`Board::generate_moves_into`](super::Board::generate_moves_into). +/// [Position](super::Position) like +/// [`Position::generate_moves_into`](super::Position::generate_moves_into). pub trait MoveStore { /// push adds the given Move to the MoveStore. fn push(&mut self, m: Move); diff --git a/ataxx/src/position.rs b/ataxx/src/position.rs index a53e3fd..db77def 100644 --- a/ataxx/src/position.rs +++ b/ataxx/src/position.rs @@ -27,8 +27,9 @@ use crate::{ PieceParseError, }; -/// Position represents the snapshot of an Ataxx Board, the state of the Board -/// at a single point in time. It is the functional backend of the [Board] type. +/// Position represents the snapshot of an Ataxx Board, the state of the an +/// ataxx game at a single point in time. It also provides all of the methods +/// necessary to manipulate such a snapshot. #[derive(Copy, Clone)] pub struct Position { /// bitboards stores [BitBoard]s for the piece configuration of each [Piece]. @@ -162,7 +163,7 @@ impl Position { } /// winner returns the Piece which has won the game. It returns [`Piece::None`] - /// if the game is a draw. If [`Board::is_game_over`] is false, then the + /// if the game is a draw. If [`Position::is_game_over`] is false, then the /// behavior of this function is undefined. /// ``` /// use ataxx::*;