📄 stopcursor.html
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML is auto-generated from an M-file.
To make changes, update the M-file and republish this document.
-->
<title>stopCursor</title>
<meta name="generator" content="MATLAB 7.0.4">
<meta name="date" content="2006-03-24">
<meta name="m-file" content="script_stopCursor"><style>
body {
background-color: white;
margin:10px;
}
h1 {
color: #990000;
font-size: x-large;
}
h2 {
color: #990000;
font-size: medium;
}
p.footer {
text-align: right;
font-size: xx-small;
font-weight: lighter;
font-style: italic;
color: gray;
}
pre.codeinput {
margin-left: 30px;
}
span.keyword {color: #0000FF}
span.comment {color: #228B22}
span.string {color: #A020F0}
span.untermstring {color: #B20000}
span.syscmd {color: #B28C00}
pre.showbuttons {
margin-left: 30px;
border: solid black 2px;
padding: 4px;
background: #EBEFF3;
}
pre.codeoutput {
color: gray;
font-style: italic;
}
pre.error {
color: red;
}
/* Make the text shrink to fit narrow windows, but not stretch too far in
wide windows. On Gecko-based browsers, the shrink-to-fit doesn't work. */
p,h1,h2,div {
/* for MATLAB's browser */
width: 600px;
/* for Mozilla, but the "width" tag overrides it anyway */
max-width: 600px;
/* for IE */
width:expression(document.body.clientWidth > 620 ? "600px": "auto" );
}
</style></head>
<body>
<h1>stopCursor</h1>
<introduction>
<p>stopCursor Stops the cursor from moving and proceeds with the chess game.</p>
</introduction>
<h2>Contents</h2>
<div>
<ul>
<li><a href="#1">Syntax</a></li>
<li><a href="#2">Description</a></li>
<li><a href="#4">Input and *Output:*</a></li>
<li><a href="#6">Example</a></li>
<li><a href="#7">See also</a></li>
<li><a href="#8">Signature</a></li>
</ul>
</div>
<h2>Syntax<a name="1"></a></h2><pre>stopCursor(varargin)</pre><h2>Description<a name="2"></a></h2>
<p>The cursors motion is stopped and the game logic is executed.</p>
<p>This function is called from the Mouse Button Up Callback, and causes the mouse to stop moving. It checks whether the move
(currently stored in the cursor) is legal. If it is legal the half-move is executed, otherwise the cursor color is set to
red, indicating that it was illegal. If the half-move was legal, EDI moves. All moves are recorded here. Also the decision
of who won the game is made. Hence, this function is one of the central control parts of the chess program.
</p>
<h2>Input and *Output:*<a name="4"></a></h2>
<div>
<ul>
<li>global board ... chess board and related information</li>
<li>global history ... game history</li>
<li>global game ... status of the game</li>
<li>varargin ... currently not used</li>
</ul>
</div>
<h2>Example<a name="6"></a></h2>
<p>Stops a moving cursor and executes the move (stored in the cursor structure). <tt>stopCursor</tt></p>
<h2>See also<a name="7"></a></h2>
<p><a href="cursorListener.html">cursorListener</a>, <a href="setCursor.html">setCursor</a>, <a href="reset_cursor.html">reset_cursor</a></p>
<h2>Signature<a name="8"></a></h2>
<div>
<ul>
<li><b>Author:</b> W.Garn
</li>
<li><b>E-Mail:</b> <a href="mailto:wgarn@yahoo.com">wgarn@yahoo.com</a> Date: 2006/03/23 12:00:00
</li>
</ul>
</div>
<div>
<ul>
<li><b>Copyright</b> 2006 W.Garn
</li>
</ul>
</div>
<p class="footer"><br>
Published with wg_publish; V1.0<br></p>
<!--
##### SOURCE BEGIN #####
%% stopCursor
% stopCursor Stops the cursor from moving and proceeds with the chess game.
%% Syntax
% stopCursor(varargin)
%% Description
% The cursors motion is stopped and the game logic is executed.
%%
% This function is called from the Mouse Button Up Callback, and causes the
% mouse to stop moving. It checks whether the move (currently stored in the
% cursor) is legal. If it is legal the half-move is executed, otherwise the
% cursor color is set to red, indicating that it was illegal.
% If the half-move was legal, EDI moves. All moves are recorded here. Also
% the decision of who won the game is made.
% Hence, this function is one of the central control parts of the chess
% program.
%%
%%
%% Input and *Output:*
%%
%%
% * global board ... chess board and related information
% * global history ... game history
% * global game ... status of the game
% * varargin ... currently not used
%%
%% Example
% Stops a moving cursor and executes the move (stored in the cursor structure).
% |stopCursor|
%%
%% See also
% cursorListener, setCursor, reset_cursor
%%
%% Signature
%%
% * *Author:* W.Garn
% * *E-Mail:* wgarn@yahoo.com
% Date: 2006/03/23 12:00:00
%%
%%
% * *Copyright* 2006 W.Garn
%
##### SOURCE END #####
-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -