marcusbuffett / command-line-chess

A python program to play chess against an AI in the terminal.
MIT License
500 stars 162 forks source link

When player chooses *Black*, AI should make the first move as *White* #38

Closed sohang3112 closed 2 years ago

sohang3112 commented 2 years ago

Bug

$ chess
What side would you like to play as [wB]? B
You will play as black

How deep should the AI look for moves?
Warning : values above 3 will be very slow. [2]? 3

8  R N B Q K B N R
7  ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲
6  · · · · · · · ·
5  · · · · · · · ·
4  · · · · · · · ·
3  · · · · · · · ·
2  ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲
1  R N B Q K B N R

   a b c d e f g h

It's your move. Type '?' for options. ?

Here, I chose B (Black) for player's side. The AI should have made the first move as White. But it told me (the player) to make the first move - which is not possible, because the first move is always made by White.

sohang3112 commented 2 years ago

I have made a Pull Request to fix this here. Please accept & merge the PR.