Skip to content

Commit

Permalink
add header to the code
Browse files Browse the repository at this point in the history
  • Loading branch information
zadium committed Dec 11, 2023
1 parent fc5f276 commit f4db285
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
9 changes: 9 additions & 0 deletions engine/chess_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
"""
@name: chess_api
@description: chess rest api server to accept fen format, to check move and result best move, using stockfish.
@author: Zai Dium
@update: 2022-02-16
@version: 1.1
@revision: 1
@localfile: ?defaultpath\Chess\[email protected]
@license: by-nc-sa [https://creativecommons.org/licenses/by-nc-sa/4.0/]
This Python script is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You should have received a copy of the license along with this work. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/>.
Expand Down
13 changes: 11 additions & 2 deletions engine/chess_console.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
"""
@name: chess_console
@description: chess in console, using stockfish.
@author: Zai Dium
@update: 2022-02-16
@version: 1.1
@revision: 1
@localfile: ?defaultpath\Chess\[email protected]
@license: by-nc-sa [https://creativecommons.org/licenses/by-nc-sa/4.0/]
This Python script is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You should have received a copy of the license along with this work. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/>.
Expand All @@ -14,8 +23,9 @@
from pystockfish import *
from colorama import init, Fore, Back, Style

init_fen = "rnbqkb1r/1ppp1ppp/p6n/4p3/2B1P3/5Q2/PPPP1PPP/RNB1K1NR w KQkq - 0 1"
#init_fen = "rnbqkbnr/pp2pppp/8/3p4/8/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1"
init_fen = "r1bqkbnr/p1pp1ppp/1pn5/4p3/2B1P3/5Q2/PPPP1PPP/RNB1K1NR w KQkq - 0 1"
#init_fen = "r1bqkbnr/p1pp1ppp/1pn5/4p3/2B1P3/5Q2/PPPP1PPP/RNB1K1NR w KQkq - 0 1"
## f3f7
deep = Engine(depth=6)

Expand Down Expand Up @@ -123,5 +133,4 @@ def print_state():
respond = deep.bestmove()
move = respond["move"]
try_move(move)

print_board()

0 comments on commit f4db285

Please sign in to comment.