We all know about the chess game if not please first read about chess.
In the chess game there are total 8x8=64 blocks and 2 teams. First = White and second = Black
- Python
- Basic knowlage about chess-game
In game we are use one librarie.
- Numpy Array
- Create folder and clone repo.
- Create environment.
python3 -m venv env
- Activate environment.
source env/bin/activate
- Install requirement.txt.
pip install requirement.txt
- Run game.
python chess_game.py
- In terminal.
[['S' '1' '2' '3' '4' '5' '6' '7' '8'] ['a' '♖' '♙' '-' '-' '-' '-' '♟' '♜'] ['b' '♘' '♙' '-' '-' '-' '-' '♟' '♞'] ['c' '♗' '♙' '-' '-' '-' '-' '♟' '♝'] ['d' '♔' '♙' '-' '-' '-' '-' '♟' '♚'] ['e' '♕' '♙' '-' '-' '-' '-' '♟' '♛'] ['f' '♗' '♙' '-' '-' '-' '-' '♟' '♝'] ['g' '♘' '♙' '-' '-' '-' '-' '♟' '♞'] ['h' '♖' '♙' '-' '-' '-' '-' '♟' '♜']] $ current_row : $ current_col : $ next_row : $ next_col :
- Enter value like this.
[['S' '1' '2' '3' '4' '5' '6' '7' '8'] ['a' '♖' '-' '♙' '-' '-' '-' '♟' '♜'] ['b' '♘' '♙' '-' '-' '-' '-' '♟' '♞'] ['c' '♗' '♙' '-' '-' '-' '-' '♟' '♝'] ['d' '♔' '♙' '-' '-' '-' '-' '♟' '♚'] ['e' '♕' '♙' '-' '-' '-' '-' '♟' '♛'] ['f' '♗' '♙' '-' '-' '-' '-' '♟' '♝'] ['g' '♘' '♙' '-' '-' '-' '-' '♟' '♞'] ['h' '♖' '♙' '-' '-' '-' '-' '♟' '♜']] $ current_row : 1 $ current_col : 2 $ next_row : 1 $ next_col : 3
- if current_row or next_col enter 0 so, you out of the game.
- if user enter more than 8 number so, you out of the game.
- if current_row, current_col, next_row and next_col match same value so, you out of the game.