Skip to content

Commit f56e0e3

Browse files
committed
🚨 fix more lint errors
1 parent d050ab2 commit f56e0e3

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

pleco/src/board/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ pub struct Board {
205205
half_moves: u16, // Total moves played
206206
depth: u16, // Current depth since last shallow_copy
207207
piece_counts: [[u8; PIECE_TYPE_CNT]; PLAYER_CNT], // Count of each Piece
208-
piece_locations: PieceLocations, // Mapping Squares to Pieces and Plauers
208+
piece_locations: PieceLocations, // Mapping Squares to Pieces and Players
209209
zobrist_history: Vec<u64>, // Historic Zobrist keys of the board
210210
threefold_repetition: bool, // Whether the board has been repeated 3 times
211211

@@ -700,7 +700,7 @@ impl Board {
700700
let mut next_arc_state = UniqueArc::new(self.state.partial_clone());
701701

702702
// Separate Block to allow dereferencing the BoardState
703-
// As there is garunteed only one owner of the Arc, this is allowed
703+
// As there is guaranteed only one owner of the Arc, this is allowed
704704
{
705705
let new_state: &mut BoardState = &mut next_arc_state;
706706

@@ -1242,7 +1242,7 @@ impl Board {
12421242
fn apply_castling(
12431243
&mut self,
12441244
player: Player,
1245-
k_src: SQ, // from, king startng spot
1245+
k_src: SQ, // from, king starting spot
12461246
to_r_orig: &mut SQ, // originally
12471247
r_src: &mut SQ,
12481248
r_dst: &mut SQ,

pleco/src/board/movegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Legality for PseudoLegal {
111111
}
112112
}
113113

114-
// Pieces to generate moves with inter-changably
114+
// Pieces to generate moves with interchangeably
115115
const STANDARD_PIECES: [PieceType; 4] = [PieceType::B, PieceType::N, PieceType::R, PieceType::Q];
116116
const DEFAULT_MOVES_LENGTH: usize = 32;
117117

pleco/src/bots/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub fn eval_board(board: &Board) -> ScoringMove {
120120
mod tests {
121121
use super::*;
122122

123-
// We test these, as both algorithms should give the same result no matter if paralleized
123+
// We test these, as both algorithms should give the same result no matter if parallelized
124124
// or not.
125125

126126
#[test]

pleco/src/helper/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn z_ep(sq: SQ) -> u64 {
193193
zobrist::z_ep(sq)
194194
}
195195

196-
/// Returns the Zobrish hash for a castling right.
196+
/// Returns the Zobrist hash for a castling right.
197197
///
198198
/// Undefined behavior will occur if the bits are greater than 15.
199199
#[inline(always)]

pleco/src/tools/tt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use super::prefetch_write;
4343
use super::PreFetchable;
4444
use core::piece_move::BitMove;
4545

46-
// TODO: investigate potention for SIMD in key lookup
46+
// TODO: investigate potential for SIMD in key lookup
4747
// Currently, there is now way to do this right now in rust without it being extensive.
4848

4949
pub type Key = u64;
@@ -352,7 +352,7 @@ impl TranspositionTable {
352352
/// Returns the current number of cycles a TT has gone through. Cycles is simply the
353353
/// number of times refresh has been called.
354354
#[inline]
355-
pub fn time_age_cylces(&self) -> u8 {
355+
pub fn time_age_cycles(&self) -> u8 {
356356
unsafe { (*self.time_age.get()).wrapping_shr(2) }
357357
}
358358

pleco/tests/board_hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl HashCorrect for PawnHashCorrect {
6666
}
6767
}
6868

69-
// Testing that applying / undoing a move leads to the same zobriust hash
69+
// Testing that applying / undoing a move leads to the same zobrist hash
7070
#[test]
7171
fn zobrist_correctness() {
7272
for _x in 0..15 {

pleco_engine/src/search/eval.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const PAWNLESS_FLANK: Score = Score(20, 80);
266266
const THREAT_BY_SAFE_PAWN: Score = Score(192, 175);
267267
const THREAT_BY_RANK: Score = Score(16, 3);
268268
const HANGING: Score = Score(48, 27);
269-
const WEAK_UNOPOSSED_PAWN: Score = Score(5, 25);
269+
const WEAK_UNOPPOSED_PAWN: Score = Score(5, 25);
270270
const SLIDER_ON_QUEEN: Score = Score(42, 21);
271271
const THREAT_BY_PAWN_PUSH: Score = Score(38, 22);
272272
const THREAT_BY_ATTACK_ON_QUEEN: Score = Score(38, 22);
@@ -961,7 +961,7 @@ impl<'a, 'b, T: Tracing> EvaluationInner<'a, 'b, T> {
961961
.piece_two_bb(PieceType::R, PieceType::Q, us)
962962
.is_not_empty()
963963
{
964-
score += WEAK_UNOPOSSED_PAWN * self.pawn_entry.weak_unopposed(them);
964+
score += WEAK_UNOPPOSED_PAWN * self.pawn_entry.weak_unopposed(them);
965965
}
966966

967967
// Find squares where our pawns can push on the next move

pleco_engine/src/search/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl Searcher {
293293

294294
// The per thread searching function
295295
fn search_root(&mut self) {
296-
// Early return. This shouldn't notmally happen.
296+
// Early return. This shouldn't normally happen.
297297
if self.stop() {
298298
return;
299299
}
@@ -948,7 +948,7 @@ impl Searcher {
948948
rm.score = NEG_INFINITE;
949949
}
950950
}
951-
// If we have a new best move at root, update the nmber of best_move changes.
951+
// If we have a new best move at root, update the number of best_move changes.
952952
if incr_bmc {
953953
self.best_move_changes += 1.0;
954954
}

pleco_engine/src/tables/pawn_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl PawnEntry {
377377
{
378378
0 // Blocked By King
379379
} else if rk_us == Rank::R1 {
380-
1 // Unopossed
380+
1 // Unopposed
381381
} else if rk_them as u8 == rk_us as u8 + 1 {
382382
2 // Blocked by Pawn
383383
} else {

pleco_engine/src/time/uci_timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl LimitsType {
2525
#[derive(Clone)]
2626
pub struct UCITimer {
2727
pub time_msec: [i64; PLAYER_CNT], // time each player has remaining
28-
pub inc_msec: [i64; PLAYER_CNT], // increments for each palyer after each turn
28+
pub inc_msec: [i64; PLAYER_CNT], // increments for each player after each turn
2929
pub moves_to_go: u32, // Moves to go until next time control sent
3030
}
3131

0 commit comments

Comments
 (0)