Matlab

所属分类:棋牌游戏
开发工具:matlab
文件大小:399KB
下载次数:4
上传日期:2012-04-09 12:34:36
上 传 者kongkuang0
说明:  matlab做的国际象棋希望能给大家带来方便理解。
(chess Matlab do hope we can bring to facilitate understanding.)

文件列表:
chess (0, 2006-03-30)
chess\addHistoryMove.m (1351, 2006-03-23)
chess\Bishop.m (7251, 2006-03-23)
chess\Chess.m (4595, 2006-03-30)
chess\ChessTutorial.pdf (68032, 2006-03-24)
chess\cursorListener.m (1382, 2006-03-23)
chess\displayCursor.m (1416, 2006-03-23)
chess\EDIs_move.m (6147, 2006-03-30)
chess\findPos.m (991, 2006-03-23)
chess\getColor.m (780, 2006-03-23)
chess\getFigureName.m (1350, 2006-03-23)
chess\has_moved.m (1337, 2006-03-23)
chess\html (0, 2006-03-24)
chess\html\addHistoryMove.html (4167, 2006-03-24)
chess\html\Bishop.html (5071, 2006-03-24)
chess\html\Chess.html (4465, 2006-03-24)
chess\html\cursorListener.html (4823, 2006-03-24)
chess\html\displayCursor.html (4624, 2006-03-24)
chess\html\EDIs_move.html (5826, 2006-03-24)
chess\html\findPos.html (4778, 2006-03-24)
chess\html\getColor.html (4312, 2006-03-24)
chess\html\getFigureName.html (4465, 2006-03-24)
chess\html\has_moved.html (4439, 2006-03-24)
chess\html\index.html (2935, 2006-03-24)
chess\html\is_in_check.html (4463, 2006-03-24)
chess\html\King.html (5019, 2006-03-24)
chess\html\Knight.html (5071, 2006-03-24)
chess\html\legal_move.html (5237, 2006-03-24)
chess\html\matrix2chess.html (4111, 2006-03-24)
chess\html\matrix2xy.html (4257, 2006-03-24)
chess\html\mirrorImage.html (4067, 2006-03-24)
chess\html\Pawn.html (5023, 2006-03-24)
chess\html\Queen.html (5045, 2006-03-24)
chess\html\remove_figure.html (4510, 2006-03-24)
chess\html\replaceRGBValue.html (4641, 2006-03-24)
chess\html\reset_cursor.html (3553, 2006-03-24)
chess\html\Rook.html (5021, 2006-03-24)
chess\html\script_Chess.png (4678, 2006-03-24)
chess\html\script_Chess_01.png (24103, 2006-03-24)
chess\html\script_Chess_02.png (8164, 2006-03-24)
... ...

Version 0.3 Summary: Play chess against "Greedy Edi". Matlab Release: V7 R14 SP2 Required Products: - Description: Play chess against "Greedy Edi". Get started... 1. extract zip file 2. change current directory to the new "chess" directory 3. Run "Chess" (optionally for text figures run Chess(2)) Some help ... a) How to move the chess figures ... 1. Position the mouse over the figure you like to move 2. Press the mouse button and keep it pressed 3. Move the mouse over the desired field and relase the mouse button b) How to play chess ... If you don't know anything about chess. I have included a little chess tutorial (ChessTutorial.pdf). Perhaps, at a later time you will find an updated version at (http://osiris.tuwien.ac.at/~wgarn/chess). c) Help about the functions If you like to change the program or if you like to know more about the implementation, then check out the html folder for help descriptions on the functions. The "index.html" file gives an overview of all the functions used. This help files were generated by using the "wg_publish_dir" function, which can be found at the Central File Exchange Depot. (http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=9687&objectType=FILE) What I still intend to do... - let "Greedy Edi" realize, when he is checked, that he can do something else beside running away. Additional Edi characters a) Careful Edi ... which looks out, whether he will be eaten b) Happy Edi ... looking tow and a half move ahead c) Smart Edi ... knowing strategy, tricks and learning on its own How could you help me... 1. By testing this program and telling me any wrong moves (wgarn@yahoo.com) x2. There is a transparency issue, which I could not figure out ... A transparent image with a patch as background colour??? I have include a m-script (TransparencyProblem.m), illustrating the problem. -> Thank's to Jérme. This problem is solved. Add 2nd axes and send them to the back :) 3. Finding other chess sets 4. Other constructive comments and contributions ;) I am proud of the following... 1. a "new" Matlab object orientated concept ... The chess figures m-functions represent objects. Of course I know that Matlab offer OO programming. But, I do not like copying everything. Hence I came out with the "persistent" structure idea. For instance, let us have a look at the knights. First we have only the "empty" function, which I call class. When calling the function "Knight('init',...)", an instance is derived from the class (actually: into the class). Assume you like to have a second knight, just call the "method" again. The function "findPos" is sufficient to identify the required instance (which is done internally). 2. the usage of function pointers The usage of function pointers (@Knight, @Queen,...) saved me a lot of work. 3. the cursor events I have never really used this Mouse events before, but it worked out pretty good. This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

近期下载者

相关文件


收藏者