- Update test performance data in `board/move_test.go` with additional and higher depth analysis results for specific positions, ensuring no changes to test logic or structure.
- Simplify `.github/workflows/go.yml` by removing PR-specific actions, upgrading to Go 1.23, streamlining test result handling, and integrating `EnricoMi/publish-unit-test-result-action`.
[board/move_test.go]
- Added additional known performance data to specific test cases.
- Un-commented performance data values for select board positions.
- Adjusted data for positions like "Starting Position," "Kiwipete," and "6" by adding higher depth analysis results.
- No changes to test logic or structure, only updates to performance-related test data.
[.github/workflows/go.yml]
- Removed handling of pull requests and kept only push events triggering the workflow.
- Updated Go version from `^1.22` to `^1.23`.
- Consolidated steps for archiving and processing test results into a streamlined approach.
- Eliminated jobs for code coverage report and test summary.
- Integrated the `EnricoMi/publish-unit-test-result-action` for publishing test results.
- Reduced complexity by removing custom test summaries and PR comment posting logic.
- Simplified logic for handling test failures directly within the unit test step.
- Refactor test processing by enhancing `jq` filters and splitting summary handling for `push` events
- Improve conditional logic for event-specific actions in workflow
[.github/workflows/go.yml]
- Updated Go version setup to use `^1.22`.
- Changed how test results are processed, modifying `jq` filters for counting passed and failed tests.
- Split test summary functionality:
- Added a dedicated step to output test summaries specifically for `push` events in the GitHub Actions summary.
- Refined pull request comment posting for test summaries.
- Improved conditional logic to differentiate actions based on the event type (`push` vs `pull_request`).
- Update test command in GitHub Actions workflow to include the `./testdata` package
[.github/workflows/go.yml]
- Updated the command for running tests to include the `./testdata` package.
- Update "Run Tests with Coverage" to allow failures and set an environment variable if tests fail
- Ensure code coverage and test summary jobs always run using `if: always()`
- Add step to explicitly fail workflow when tests fail
- Adjust permissions for `pull-requests` in workflows
[.github/workflows/go.yml]
- Updated the "Run Tests with Coverage" step to allow failures and set an environment variable if tests fail.
- Changed code coverage and test summary jobs to always run with the `if: always()` condition.
- Added a step to fail the workflow explicitly if tests failed.
- Adjusted permissions for `pull-requests` in certain workflows.
- Simplify workflow trigger conditions and remove redundant event types in `.github/workflows/go.yml`
- Replace "Test" step with "Run Tests with Coverage" step, outputting results as JSON in `.github/workflows/go.yml`
- Introduce artifact archiving for test results (`test-results.json`) in `.github/workflows/go.yml`
- Refactor "Code Coverage Report" job for improved clarity and formatting in `.github/workflows/go.yml`
- Add a "Test Summary" job to parse test results and post PR comments in `.github/workflows/go.yml`
[.github/workflows/go.yml]
- Simplified workflow "trigger" conditions by removing extensive inline comments and unnecessary event types.
- Replaced the "Test" step with a new "Run Tests with Coverage" step that also outputs results as a JSON file.
- Introduced a new step to archive test results as a separate artifact ("test-results.json").
- Modified the "Code Coverage Report" job to adjust formatting and clarify steps without functional changes.
- Added a new "Test Summary" job:
- Downloads and parses test results for passed/failed counts using `jq`.
- Posts a test summary as a comment on pull requests using a sticky comment action.
```
Revamp CI workflow for improved clarity and functionality
- Rename the workflow from "Go Build and Test" to "CI" and update its trigger logic to better handle `push` and `pull_request` events.
- Refactor workflow jobs: rename `go-build-and-test` to `unit_tests` and introduce a new `code_coverage` job for pull request coverage reporting.
- Update dependencies to use the latest versions (`actions/checkout@v4`, `actions/setup-go@v4`, etc.) and simplify configuration (e.g., use `^1.22` for `go-version`).
- Add steps for generating and uploading code coverage details using `fgrosse/go-coverage-report@v1.1.1` and `actions/upload-artifact@v4`.
- Remove unused or redundant steps, such as searching for `go.mod` directories, and improve documentation with detailed comments about workflow purpose and trigger logic.
```
[.github/workflows/go.yml]
- Renamed the workflow from "Go Build and Test" to "CI".
- Updated the workflow triggers to include `pull_request` with events like `opened`, `reopened`, and `synchronize`, and restricted `push` events to the `main` branch.
- Added detailed explanation comments about the trigger logic and workflow purpose.
- Updated the `concurrency` section by removing it.
- Renamed the primary job from `go-build-and-test` to `unit_tests`.
- Replaced "Checkout code" with "Checkout repository" and updated to use `actions/checkout@v4`.
- Updated Go setup to use `actions/setup-go@v4` and simplified the `go-version` field to use `^1.22`.
- Added a step to run tests with code coverage output and specified a coverage profile file ("coverage.txt").
- Included a step to archive code coverage results using `actions/upload-artifact@v4`.
- Removed the step that searched for and processed directories with `go.mod`.
- Introduced a new `code_coverage` job to handle code coverage reporting specifically for pull requests, dependent on the `unit_tests` job.
- Configured permissions for `code_coverage` to allow commenting on pull requests.
- Added a step to generate a code coverage report using the `fgrosse/go-coverage-report@v1.1.1` action.
- Add `TestCreateMoveAlgebra` in `board_test.go` to validate move generation in algebraic notation, with coverage for various scenarios and panic handling.
- Remove outdated `TestMakeMoveStr` test from `board_test.go`.
- Introduce `CreateMoveAlgebra` method in `move.go` for algebraic notation move generation, with validation and fallback to `CreateMoveStr`.
[board/board_test.go]
- Added a new test `TestCreateMoveAlgebra` to validate move generation in algebraic notation, including setup, move creation, and verification of results.
- Ensured coverage for different scenarios like knight moves and pawn moves across the board.
- Added error handling to detect unexpected panics during test execution.
- Removed the `TestMakeMoveStr` test, which checked the proper movement of a pawn using `MakeMoveStr`, along with its associated validations.
[board/move.go]
- Added a new method `CreateMoveAlgebra` for generating a move based on algebraic notation.
- Determines behavior for pawns based on the active player color.
- Includes validation to ensure the move is valid, with error handling for invalid moves.
- Falls back to `CreateMoveStr` for longer algebra strings.
- Enhance `testdata/integration_test.go` with improved logging and subtest naming for better clarity.
- Refine castle move legality checks in `board/move.go` to ensure accurate column-based validation.
[testdata/integration_test.go]
- Updated log statement in `testData` function to include both the description and FEN string.
- Modified subtest naming to replace slashes in the FEN string with periods.
[board/move.go]
- Adjusted conditional logic for castle-related moves to check for different column coordinates when determining legality.
- No functional changes outside of castle move handling.
- Comment out the main function implementation in `main.go` to disable functionality for now.
- Remove the "indirect" comment from the dependency declaration in `go.mod`.
- Add tests for the `testdata` directory.
[main.go]
- Commented out the entire main function implementation, including code for initializing the board, retrieving moves, iterating over moves, and printing outputs.
- No functional code remains active in the main function.
[go.mod]
- Removed the "indirect" comment from the dependency declaration.
[.github/workflows/go.yml]
- Updated the "Set up Go environment" step to specify Go version 1.22.8.
- Added an additional command to run tests specifically on the `testdata` directory.
- Ensured consistency and expanded test coverage in the workflow.
[board/board_test.go]
- Removed an unnecessary log statement from an En Passant test case.
- Tests verify UndoMove behavior:
- Active player correctly switches between turns.
- Original board position is restored after undoing moves.
- Castling rights are properly updated upon undoing moves.
- Improved En Passant test cases:
- Validation that pawn restoration works after an undo.
- Correctly marks and restores En Passant availability from moves and FEN configurations.
- Verifies board state integrity after multiple moves and undos involving En Passant captures.
```
Add comprehensive test cases for chess scenarios and validate JSON parsing in integration tests
- Add `integration_test.go` to handle JSON test cases, parse data, and validate chess move generation against expected results.
- Add `checkmates.json` with test cases for various checkmate scenarios, including mirrors and edge cases.
- Add `famous.json` detailing positions and test sequences from historical chess games for validation.
- Add `standard.json` to test and verify early-game chess positions and standard move transitions.
- Add `promotions.json` with detailed cases for pawn promotions, including edge scenarios and forced moves.
- Add additional JSON files (`castling.json`, `taxing.json`, `pawns.json`, `stalemates.json`) with test data for specific chess rule validations and edge cases like castling, stalemates, and en passant captures.
```
[testdata/integration_test.go]
- Adds a new test file to validate JSON-defined chess scenarios against board states and expected moves.
- Defines structs for handling test data, including descriptions, starting positions, and expected outcomes.
- Implements a test function to read JSON files in the directory, parse them, and execute tests on the data.
- Introduces helper functions to parse JSON data and iterate through test cases.
- Adds logic to compare expected moves from JSON with generated moves from the chess board state.
- Includes error handling for file reading, JSON unmarshalling, and position validation from the chess board.
[testdata/checkmates.json]
- Added a new JSON file containing test cases for checkmate scenarios.
- Each test case includes a FEN description and an expected output.
- Descriptions and tests cover specific checkmate types: ladder mate, smothered mate, en passant situations, and minimal-piece mates.
- Added transposed positions for each checkmate scenario to validate mirrored setups.
[testdata/famous.json]
- Added new JSON file containing chess positions and test cases.
- Included a "description" field specifying the context of the chess problems.
- Each test case specifies a starting position (given by a FEN string) and a list of moves along with their corresponding resulting positions (also as FEN strings).
- Added detailed test cases for two famous chess games: "The Game of the Century" and "The Gold Coins Game".
- For "The Game of the Century", provided multiple legal move sequences and their outcomes from a specific mid-game position.
- For "The Gold Coins Game", included potential moves and their resulting positions leading to the iconic "Gold Coin move".
- Enriched some moves with descriptive comments for historical or tactical significance.
- Added various chess scenarios to thoroughly test a move generator's capability to handle diverse situations.
[testdata/standard.json]
- Added a new JSON file containing test cases for specific chess board positions.
- The JSON includes:
- Definitions of starting positions using FEN strings.
- Descriptions of the starting positions, such as "Standard starting position" and "Ruy Lopez opening".
- Expected potential moves with resulting FEN states after each move. These moves explore various legal possibilities from the starting positions.
- The file contains test cases primarily for validating early-game configurations and various move transitions in chess.
[testdata/promotions.json]
- Added a new file containing JSON data describing chess test cases focused on pawn promotions.
- Included multiple scenarios covering basic promotion, transposed positions, and edge cases such as forced promotion to escape check or mate.
- Detailed expected moves and resulting board configurations in FEN format for each scenario.
- Descriptions accompanied each test case to clarify the situations being tested, like promoting via capture, forced promotions, or specific checks on the king.
- Covered scenarios where multiple promotion options exist, including promotions resulting in check or checkmate.
[testdata/castling.json]
- Added a new JSON file for castling test cases.
- Created test cases for all possible castling scenarios, including:
- Normal castling for both sides.
- Castling when prohibited due to an attacking piece (rook, bishop, knight, queen, king, and pawn).
- Castling into or through check.
- Castling when the king or rooks have moved.
- Implemented edge cases, including en passant and pawn-promotion interference with castling rights.
- Included transposed positions to test symmetry and equivalence in board states.
- Supported scenarios where attacks on rooks do not affect castling ability.
- Verified that castling remains allowed despite irrelevant pawn attacks or unoccupied intermediate squares.
[testdata/taxing.json]
- Added a large JSON file containing test cases and expected results for chess positions.
- Introduced different scenarios to analyze edge cases:
- Positions with pieces in maximal quantity for a specific type (e.g., maximum knights, maximum queens, maximum bishops).
- Transposed positions to verify symmetric behavior.
- Special rules scenarios like prohibited en passant captures due to check.
- Organized data with a `description` for each scenario, `start` positions in FEN format, and corresponding `expected` moves with their resulting positions.
- Ensured diverse test coverage, including:
- Positions designed to stress test move generation.
- Positions covering intricate rules interactions like pawn structure scenarios (en passant).
- Positions with multiple complexity levels (low-mobility vs high-mobility positions).
[testdata/pawns.json]
- Added a new JSON file defining test cases involving pawn positions in chess.
- The test cases cover various scenarios with en passant possibilities, moves without en passant, and full pawn setups.
- Each test scenario details the starting board position (FEN), a description, and expected moves along with the resulting FEN after each move.
- Includes mirrored or transposed versions of positions to test symmetry and edge cases.
- Scenarios test both legal and illegal moves, focusing on edge cases like restricted en passant and pawn movement logic.
- Ensures test coverage for complex pawn interactions, including rows with dense pawn positions and potential captures.
- Scenarios also evaluate king movements in relation to pawns.
- Emphasizes positions where rule-specific mechanics, like en passant, are critical to validate correctness.
[testdata/stalemates.json]
- Added a new JSON test data file for stalemate cases in chess.
- Included multiple test cases with starting positions (FEN notation) and expected results.
- Each test case represents a specific stalemate scenario or its transpose (mirrored version).
- Some descriptions provide details about positions, such as the shortest stalemate possible.
- Empty arrays are used for expected outputs, implying no further data is expected from these stalemate setups.
- Rename `Board` struct to `Game` across the codebase for better clarity and alignment with functionality.
- Update `board/move.go`: Adjust method receivers and references to use `Game` instead of `Board`, ensuring consistency.
- Update `board/board.go`: Refactor struct fields, method implementations, and FEN-related logic to accommodate the `Game` struct. Remove unused `Bitboard` type and clarify metadata fields (`HalfMoves`, `FullMoves`).
- Update `.github/workflows/go.yml`: Simplify the test command.
- Refactor tests (`board/move_test.go`, `board/board_test.go`) to align with the renamed `Game` struct and associated changes.
- Refactor `Castlability` struct to `Castling` and update field names from `CanQueenSide`/`CanKingSide` to `QueenSide`/`KingSide` in `board/board.go`.
- Rename `getCastlability` function to `formatCastling` and adjust logic for renamed struct and fields in `board/board.go`.
- Update tests in `board/board_test.go` to reflect renaming of struct and fields, including `Castlability` to `Castling` and method changes for `KingSide`/`QueenSide`.
- Rename variables and update conditions for `KingSide`/`QueenSide` in `board/move.go`.
[board/move.go]
The `CanKingSide` variable was renamed to `KingSide` and updated in the condition.
The `CanQueenSide` variable was renamed to `QueenSide` and updated in the condition.
[board/board_test.go]
Changes method calls to replace `CanKingSide` and `CanQueenSide` with `KingSide` and `QueenSide`.
Updates struct fields from `Castlability` to `Castling` where applicable.
Adjusts function tests to use updated naming conventions for castling (`Castlability` to `Castling`).
Aligns expected variables and logic in tests with the updated struct fields and method names (`CanKingSide`/`CanQueenSide` to `KingSide`/`QueenSide`).
[board/board.go]
The struct `Castlability` was renamed to `Castling` and the field names were simplified from `CanQueenSide` to `QueenSide` and from `CanKingSide` to `KingSide`.
References to `Castlability` in declarations, assignments, and history tracking were updated to `Castling`.
The function `getCastlability` was renamed to `formatCastling` and updated to use the renamed struct and fields.
The usage of `CanQueenSide` and `CanKingSide` in logic was updated to `QueenSide` and `KingSide`.
General cleanup in comments and function names to align with the new struct and field naming conventions.
- Add inline comment marker to start of PrettySPrint function in board.go
[board/board.go]
Added an inline comment marker (//) at the start of the PrettySPrint function implementation.
Improve move generation and board state management
- Limit move generation loop to a maximum of 16 pieces on the board
- Adjust position checks for new piece limit
- Handle king movements accurately in legal move calculations
- Remove unnecessary empty line in UndoMove function
- Refactor code for better readability and clarity
- Enhance tracking of castling states
- Ensure correct handling of the en passant rule
- Update history of castling states after an undo
Refactor test logging and error handling in move tests
- Change logging method for performance test iterations to improve clarity
- Update error reporting to ensure tests fail immediately on calculation errors
- Remove unnecessary deferred function to streamline test execution
Enable parallel testing for improved performance
- Implement parallel testing in `move_test.go`
- Add error recovery mechanism to `perft` function test
- Clean up test data by removing commented-out values
- Introduce a new FEN scenario for Kiwipete - Passant
- Update `knownPerfs` to eliminate a commented value in the test case for 6
Improve en passant handling and simplify castling logic
- Update handling of en passant moves to assign the `EnPassant` field correctly
- Remove redundant assignment of `EnPassant` at the end of the method
- Clarify castling conditions for better understanding
- Simplify test cases by removing unnecessary scenarios
- Add a test case for handling en passant on double undo
- Verify accurate game state restoration after multiple undos
- Ensure proper marking and unmarking of en passant under various conditions
- Implement tests for en passant feature in board_test.go
- Cover scenarios for marking and unmarking pieces
- Add a test case for handling multiple undos in en passant
- Validate pawn movement and capturing during en passant
- Confirm correct pawn promotion within tests
- Enhance pieces.go to handle default piece type with an underscore
- Modify panic error message format from hexadecimal to binary
Refactor board logic and improve tests
- Refactor import statements in pieces.go
- Add String method to Piece type for better representation
- Add isEnPassant field to Move struct
- Update move logic to mark en passant captures
- Adjust handling of pawn moves related to en passant
- Change MakeMove to not return a move
- Update applyEnPassant to accept pointer to Move
- Track en passant captures within Move struct
- Remove redundant condition check in UndoMove
- Enhance readability of variable assignments
- Comment out parallel test execution for debugging
- Modify error handling for accurate performance logging
- Correct expected board state after undo in en passant scenario
- Clarify comments in tests regarding en passant logic
- Improve clarity of error messages in test assertions
- Simplify move string representation by removing intermediate coordinates
- Filter out pseudo moves where the capturing piece is a King
- Format checks for rook captures during castling correctly
- Improve readability and maintainability of the GetMoves function
- Refactor applyEnPassant function for clarity
- Store destination move coordinates in two variables
- Introduce checks for en passant conditions and capture logic
- Reset board.EnPassant appropriately
- Refactor main function to include board operations based on FEN notation
- Add error handling for board initialization
- Implement logic to generate and display moves from the chess board
- Print count of moves after each execution and provide a list of new moves
- Add a test for en passant pawn removal
- Validate en passant pawn restoration upon undo
- Ensure accurate board state reversion after a move
- Update castling state checks after undo
- Enable parallel execution for performance tests
- Update known performance values for specific tests
- Add a new test case for a chess position named Gaviota
- Add tests and functionality for en passant, pawn promotion, and undoing moves
- Refactor pawn movement logic for improved readability
- Update MakeMove and UndoMove to handle en passant and promotion
- Enhance test cases to cover new scenarios and improve performance tracking
- Update pawn promotion condition to utilize method for determining piece type
- Refactor castle condition checks for better readability
- Store castle availability using a pointer to minimize redundancy
- Ensure toggling of active player color after each move
- Add parallel execution to performance tests in move_test.go
- Modify loop condition to incorporate the last known performance value
- Remove commented entry from known performance data
- Add new test cases with corresponding FENs and known performance values
- Implement String method for Coordinate type.
- Enhance MakeMove function to improve pawn promotion handling.
- Change MakeMoveStr method receiver from value to pointer.
- Improve castling logic handling for piece movement.
- Remove unnecessary test cases from move tests.
- Introduce function for retrieving performance data in tests.
- Update performance tests to utilize new data retrieval function.
- Simplify performance test data structure.
- Refactor assertions in tests for improved readability.
- Add tests for castling functionality, covering updates and success scenarios.
- Implement tests for undoing moves and verifying active player changes.
- Validate revert functionality to restore the original game state.
- Enhance promotion tests to verify character representation of promoted pieces.
- Add pawn promotion logic to support multiple piece choices.
- Simplify promotion handling by defaulting to Queen for 0 promotionTo option.
- Enhance move generation to include promotion conditions.
- Add history tracking for castling moves
- Change the promotion handling logic to set the piece on the from position
- Improve UndoMove functionality to correctly restore the last move
- Include a list to keep record of all past moves
- Simplify the undo move logic by removing the parameter from the UndoMove function call
- Add a check to skip legal move validation when the enemy move is a castling move
- Simplify the UndoMove function call by removing the move argument in tests
- Update error message for clarity regarding "nodes"
- Add new test for castling logic in game
- Refactor castling logic to reset `CanKingSide` and `CanQueenSide` for the King piece
- Trim whitespace from FEN string input for cleaner parsing
- Clarify error messages for malformed FEN strings
- Improve error handling for converting half and full move counts from strings to integers
- Add tests for pawn move from e2 to e4
- Implement tests for castling scenarios, including king and rook placement
- Verify castling availability conditions after the move
- Add a function to check for castling moves in `move.go`
- Generate castling moves for both sides in `move.go`
- Refactor king move logic to incorporate castling in `move.go`
- Prevent out-of-bounds errors in king move logic in `move.go`
- Enhance the Move function to automatically capture pieces in `board.go`
- Handle rook movements affecting castling ability in `board.go`
- Manage king movements related to castling in `board.go`
- Restore castling conditions after castle actions in UndoMove logic in `board.go`
- Implement a helper function for applying castle moves in `board.go`
Refactor move tests for clarity and improved accuracy
- Separate testing concerns for better readability
- Rename TestMovePly to TestPerfs for clarity
- Add more test cases for thorough coverage
- Enhance performance testing structure for better data handling
- Improve error handling to use t.Fatal for critical failures
- Enhance test structure in move tests using a FEN map for inputs and expected counts
- Ensure dynamic values in tests reflect accurate expected move counts
- Clean up redundant code in specific test cases
- Expand test coverage with additional game positions and counts
- Clarify purpose by renaming GetMoves to GetImmediateMoves
- Implement new GetMoves method for legal moves considering enemy responses
- Validate moves by checking against potential capture threats
- Improve pawn move generation logic
- Add functionality for pawn captures along with regular moves
- Import strconv package for string conversion
- Add test case for FEN position "Nf3 g5"
- Introduce TestMovePly function for perft calculation testing
- Implement perft method for Board type to calculate move nodes
- Provide known perfect numbers for specific ply depths
- Change MakeMove and UndoMove methods to use pointer receivers
- Introduce Active property state change in MakeMove and UndoMove methods
- Update pawn move logic to check for empty squares before advancement
- Simplify filtering functions using piece capture information
- Improve code readability by removing unnecessary variable assignments
Implement tests for move functionality and simplify pawn movement logic
- Add a new test function for creating moves in `move_test.go`
- Implement tests for basic pawn movement and rook captures
- Validate move properties such as origin, target, piece type, and capture status
- Simplify the logic for obtaining legal moves in `move.go` by using game.getMovesFor
- Remove redundant checks for pawn positions on back ranks
- Clean up the pawn move generation code
- Refactor board movement and testing functionality
- Update tests to ensure accurate pawn movement
- Implement UndoMove method for move reversion
- Enhance CreateMove to be a method on the Board type
- Streamline CreateMoveStr to access Board's CreateMove
- Improve pawn movement logic for proper piece tracking and capturing
- Implement movement logic for Bishop, Rook, Queen, and King pieces
- Introduce sliding moves for Rook and Bishop
- Enhance King movement to include adjacent square considerations
- Add error handling for unknown piece types to prevent panics
- Create a function to filter sliding moves by position and piece color
- Implement new function for string-based move handling in the board logic.
- Add cases for basic moves "e4" and "e5" with error handling for unsupported strings.
- Create tests for move functionality with string inputs and verify pawn movement on the board.
- Add tests for the total number of moves at the starting position and for the sequence "e4" and "e5".
- Update cleanup after tests to reset the board state and adjust expected move counts accordingly.
- Validate knight moves to ensure accurate return values for specific pieces.
- Remove unnecessary print statement for setting color to black
- Refactor tests to consolidate color scenario handling
- Simplify pawn and knight move tests for color variation
- Add tests for other pieces from the starting position
- Improve test organization for enhanced readability and maintainability
- Rename parameters for clarity in CreateCoordInt and CreateCoordByte functions
- Add validation for row and column parameters in CreateCoordByte
- Update variable names in GetAlgebra and Get methods for consistency
- Refactor coordinate unpacking in Move method to use new parameter names
- Add a new test function to check equivalence between integer and byte coordinates
- Correct expected coordinate values for some test cases
- Update logic in FEN parsing test for accuracy
- Ensure proper alignment in test structure with parallel execution
- Refactor move_test.go to include better logging for error messages
- Introduce function to get starting moves for specific piece types
- Add tests for pawn and knight move calculations
- Improve readability by organizing import statements
- Add String method to Move for better string representation
- Implement pawn move logic with promotion considerations
- Add knight move logic to getMovesFor function
- Introduce filtering functions to manage enemy and ally moves
- Create generic filter function to handle move filtering
- Add tests for getting piece color, verifying correct color return for each piece
- Add tests for getting piece type, ensuring correct type is returned for each piece