From f39c113ef9e3768220d2e30453b42ee68cf8a429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Varga=20D=C3=A1vid=20Lajos?= Date: Wed, 19 Nov 2025 16:13:34 +0100 Subject: [PATCH] implemented method append for struct MoveBuffer --- engine/src/bitboard/movebuffer.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/bitboard/movebuffer.rs b/engine/src/bitboard/movebuffer.rs index 8c463cf..61a7844 100644 --- a/engine/src/bitboard/movebuffer.rs +++ b/engine/src/bitboard/movebuffer.rs @@ -20,6 +20,11 @@ impl MoveBuffer { self.buffer[self.count] = bitmove; self.count += 1; } + #[inline] + pub fn append(&mut self, other: &MoveBuffer) { + self.buffer[self.count..self.count + other.count()].copy_from_slice(other.contents()); + self.count += other.count(); + } #[inline(always)] pub fn clear(&mut self) { self.count = 0;