From 7141249ea15ab842014b18f49b1bef08f4a6682b Mon Sep 17 00:00:00 2001 From: Coding with Tom <146443103+hcsalmon1@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:00:53 +0000 Subject: [PATCH] Create Board.cs --- C#/Cleaner and slower version/Board.cs | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 C#/Cleaner and slower version/Board.cs diff --git a/C#/Cleaner and slower version/Board.cs b/C#/Cleaner and slower version/Board.cs new file mode 100644 index 0000000..7594030 --- /dev/null +++ b/C#/Cleaner and slower version/Board.cs @@ -0,0 +1,36 @@ +namespace CEngineCopy +{ + internal class Board + { + public static ulong[] bitboard_array_global = new ulong[12]; + public static int ep_global; + public static bool[] castle_rights_global = new bool[4]; + public static bool is_white_global; + + public static void SetStartingPosition() + { + + ep_global = Constants.NO_SQUARE; + is_white_global = true; + castle_rights_global[0] = true; + castle_rights_global[1] = true; + castle_rights_global[2] = true; + castle_rights_global[3] = true; + + bitboard_array_global[Constants.WP] = Constants.WP_STARTING_POSITIONS; + bitboard_array_global[Constants.WN] = Constants.WN_STARTING_POSITIONS; + bitboard_array_global[Constants.WB] = Constants.WB_STARTING_POSITIONS; + bitboard_array_global[Constants.WR] = Constants.WR_STARTING_POSITIONS; + bitboard_array_global[Constants.WQ] = Constants.WQ_STARTING_POSITION; + bitboard_array_global[Constants.WK] = Constants.WK_STARTING_POSITION; + bitboard_array_global[Constants.BP] = Constants.BP_STARTING_POSITIONS; + bitboard_array_global[Constants.BN] = Constants.BN_STARTING_POSITIONS; + bitboard_array_global[Constants.BB] = Constants.BB_STARTING_POSITIONS; + bitboard_array_global[Constants.BR] = Constants.BR_STARTING_POSITIONS; + bitboard_array_global[Constants.BQ] = Constants.BQ_STARTING_POSITION; + bitboard_array_global[Constants.BK] = Constants.BK_STARTING_POSITION; + + } + + } +}