Skip to content

Commit

Permalink
add cooke pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jun 15, 2024
1 parent 70999c5 commit 0c956bb
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub enum PieceSet {
Celtic,
Chess7,
Chessnut,
Cooke,
Companion,
Disguised,
Dubrovny,
Expand Down Expand Up @@ -93,7 +94,7 @@ pub enum PieceSet {
}

pub struct ByPieceSet<T> {
inner: [T; 34],
inner: [T; 35],
}

impl<T> ByPieceSet<T> {
Expand All @@ -113,6 +114,7 @@ impl<T> ByPieceSet<T> {
Celtic,
Chess7,
Chessnut,
Cooke,
Companion,
Disguised,
Dubrovny,
Expand Down Expand Up @@ -161,6 +163,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Celtic => include_bytes!("../theme/sprites/blue-celtic.gif"),
Chess7 => include_bytes!("../theme/sprites/blue-chess7.gif"),
Chessnut => include_bytes!("../theme/sprites/blue-chessnut.gif"),
Cooke => include_bytes!("../theme/sprites/blue-cooke.gif"),
Companion => include_bytes!("../theme/sprites/blue-companion.gif"),
Dubrovny => include_bytes!("../theme/sprites/blue-dubrovny.gif"),
Disguised => include_bytes!("../theme/sprites/blue-disguised.gif"),
Expand Down Expand Up @@ -197,6 +200,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Celtic => include_bytes!("../theme/sprites/brown-celtic.gif"),
Chess7 => include_bytes!("../theme/sprites/brown-chess7.gif"),
Chessnut => include_bytes!("../theme/sprites/brown-chessnut.gif"),
Cooke => include_bytes!("../theme/sprites/brown-cooke.gif"),
Companion => include_bytes!("../theme/sprites/brown-companion.gif"),
Disguised => include_bytes!("../theme/sprites/brown-disguised.gif"),
Dubrovny => include_bytes!("../theme/sprites/brown-dubrovny.gif"),
Expand Down Expand Up @@ -233,6 +237,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Celtic => include_bytes!("../theme/sprites/green-celtic.gif"),
Chess7 => include_bytes!("../theme/sprites/green-chess7.gif"),
Chessnut => include_bytes!("../theme/sprites/green-chessnut.gif"),
Cooke => include_bytes!("../theme/sprites/green-cooke.gif"),
Companion => include_bytes!("../theme/sprites/green-companion.gif"),
Disguised => include_bytes!("../theme/sprites/green-disguised.gif"),
Dubrovny => include_bytes!("../theme/sprites/green-dubrovny.gif"),
Expand Down Expand Up @@ -269,6 +274,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Celtic => include_bytes!("../theme/sprites/ic-celtic.gif"),
Chess7 => include_bytes!("../theme/sprites/ic-chess7.gif"),
Chessnut => include_bytes!("../theme/sprites/ic-chessnut.gif"),
Cooke => include_bytes!("../theme/sprites/ic-cooke.gif"),
Companion => include_bytes!("../theme/sprites/ic-companion.gif"),
Disguised => include_bytes!("../theme/sprites/ic-disguised.gif"),
Dubrovny => include_bytes!("../theme/sprites/ic-dubrovny.gif"),
Expand Down Expand Up @@ -305,6 +311,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Celtic => include_bytes!("../theme/sprites/pink-celtic.gif"),
Chess7 => include_bytes!("../theme/sprites/pink-chess7.gif"),
Chessnut => include_bytes!("../theme/sprites/pink-chessnut.gif"),
Cooke => include_bytes!("../theme/sprites/pink-cooke.gif"),
Companion => include_bytes!("../theme/sprites/pink-companion.gif"),
Disguised => include_bytes!("../theme/sprites/pink-disguised.gif"),
Dubrovny => include_bytes!("../theme/sprites/pink-dubrovny.gif"),
Expand Down Expand Up @@ -341,6 +348,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Celtic => include_bytes!("../theme/sprites/purple-celtic.gif"),
Chess7 => include_bytes!("../theme/sprites/purple-chess7.gif"),
Chessnut => include_bytes!("../theme/sprites/purple-chessnut.gif"),
Cooke => include_bytes!("../theme/sprites/purple-cooke.gif"),
Companion => include_bytes!("../theme/sprites/purple-companion.gif"),
Disguised => include_bytes!("../theme/sprites/purple-disguised.gif"),
Dubrovny => include_bytes!("../theme/sprites/purple-dubrovny.gif"),
Expand Down
1 change: 1 addition & 0 deletions theme/make-sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"celtic",
"chess7",
"chessnut",
"cooke",
"companion",
"disguised",
"dubrovny",
Expand Down
1 change: 1 addition & 0 deletions theme/piece/cooke/bB.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions theme/piece/cooke/bK.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions theme/piece/cooke/bN.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0c956bb

Please sign in to comment.