-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flimsybird: Extract variables to another file
To allow easier trial and error.
- Loading branch information
1 parent
786b039
commit 8a3e3c1
Showing
2 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use cheng::Piece; | ||
|
||
pub const fn piece_value(piece: Piece) -> i32 { | ||
match piece { | ||
Piece::Pawn => 100, | ||
Piece::Knight => 300, | ||
Piece::Bishop => 325, | ||
Piece::Rook => 500, | ||
Piece::Queen => 900, | ||
Piece::King => 0, | ||
} | ||
} | ||
pub const KING_SHIELD: i32 = 65; | ||
pub const ADVANCE_PAWN_GAIN: i32 = 10; | ||
pub const MAX_GAIN_DIFF_MOVES: i32 = 100; | ||
pub const MOVE_DIFF_WEIGHT: i32 = 5; |