Chess Master
Its a two player game, i am working on developing artificial intelligence based computer player.
American Chess rules are applied.
A 2D array is updated by the position of the chess pieces which are numbered (each piece corresponding to a number)
As the player selects a piece the corresponding number is checked for all possible places where it can move, then the program waits for the second place where it has to be moved.
After each turn the program calls the function "wholoses.m" which will see whether the king is there or not. I am working to change this logic as it should check for CHECK MATE also.
The main function to run is CHESS_on_MATLAB.m
that will call its fig itself
the main m file just calls function "playerturn.m" as the input is given by the user.
this function then calls different functions to check the position of the piece, win loss, etc
"checkfp.m" checks whether the position desired is possible or not, and gives the message if not possible.
Currently the winner has to kill the king while i realized that it should not be the case, it should detect the checkmate condition, so dont worry i am gonna update this in few coming days.
인용 양식
Suleman Shafqat (2024). Chess Master (https://www.mathworks.com/matlabcentral/fileexchange/30594-chess-master), MATLAB Central File Exchange. 검색됨 .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!