Chess Master

版本 1.4.0.0 (144.4 KB) 作者: Suleman Shafqat
Simple logic, easy to understand code, well commented 4 beginners, must try once.
4.4K 次下载
更新时间 2011/3/22

查看许可证

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 版本兼容性
创建方式 R2009b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Board games 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.4.0.0

Description

1.1.0.0

Summary
Description
Tags

1.0.0.0