Skip to content

Modify get_board_visual function#134

Open
HyoungSooo wants to merge 3 commits intozhelyabuzhsky:masterfrom
HyoungSooo:master
Open

Modify get_board_visual function#134
HyoungSooo wants to merge 3 commits intozhelyabuzhsky:masterfrom
HyoungSooo:master

Conversation

@HyoungSooo
Copy link

Hello zhelyabuzhsky!

I am making a chess game using the stockfish engine in the terminal.
Changed the visual aspect of the chess board as it appears in the terminal.
We added a parameter to the function, which allows you to use both the alphabet version and the 2D character version.
with created test code and it will be passed

2d charactor version

+---+---+---+---+---+---+---+---+
| ♖ | ♘ | ♗ | ♕ | ♔ | ♗ | ♘ | ♖ | 8
+---+---+---+---+---+---+---+---+
| ♙ | ♙ | ♙ |   |   | ♙ | ♙ | ♙ | 7
+---+---+---+---+---+---+---+---+
|   |   |   |   | ♙ |   |   |   | 6
+---+---+---+---+---+---+---+---+
|   |   |   | ♙ |   |   |   |   | 5
+---+---+---+---+---+---+---+---+
|   |   |   | ♟ | ♟ |   |   |   | 4
+---+---+---+---+---+---+---+---+
|   |   |   |   |   |   |   |   | 3
+---+---+---+---+---+---+---+---+
| ♟ | ♟ | ♟ |   |   | ♟ | ♟ | ♟ | 2
+---+---+---+---+---+---+---+---+
| ♜ | ♞ | ♝ | ♛ | ♚ | ♝ | ♞ | ♜ | 1
+---+---+---+---+---+---+---+---+
  a   b   c   d   e   f   g   h

@HyoungSooo
Copy link
Author

test failed on this function test_invalid_fen_king_attacked
test failed fen is "8/8/8/3k4/3K4/8/8/8 b - - 0 1"

but i found stockfish version 9 was return True when call stockfish.is_fen_valid("8/8/8/3k4/3K4/8/8/8 b - - 0 1")
is this correct?

@github-actions
Copy link

Coverage report

The coverage rate went from 86% to 94% ⬆️
The branch rate is 85%.

100% of new lines are covered.

Diff Coverage details (click to unfold)

stockfish/models.py

100% of new lines are covered (94% of the complete file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant