Apple's Chess 2.0 Source Code Available 63
Petrochard writes "For all of you programmers who are big chess fans, check out Apple's release of Chess 2.0's source code. It would be cool if somebody could make a Simpson's Chess mod." Chess is based on sjeng (logic) and glChess (interface).
The Licensce (Score:0, Informative)
in MacOS X 10.3 "Panther". This project consists of two components:
The Chess engine, "sjeng", and the graphical frontend.
"sjeng", contained in the "sjeng" subdirectory, is distributed under the
terms of the GNU General Public License. See sjeng/COPYING for
details.
The graphical frontend, i.e., all files not in the "sjeng"
subdirectory (including files derived from glChess which Apple has
permission to relicense under the following terms), are distributed
under the terms of the Apple Sample Code License:
IMPORTANT: This Apple software is supplied to you by Apple Computer,
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
In consideration of your agreement to abide by the following terms,
and subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the
Apple Software, with or without modifications, in source and/or binary
forms; provided that if you redistribute the Apple Software in its
entirety and without modifications, you must retain this notice and
the following text and disclaimers in all such redistributions of the
Apple Software. Neither the name, trademarks, service marks or logos
of Apple Computer, Inc. may be used to endorse or promote products
derived from the Apple Software without specific prior written
permission from Apple. Except as expressly stated in this notice, no
other rights or licenses, express or implied, are granted by Apple
herein, including but not limited to any patent rights that may be
infringed by your derivative works or by other works in which the
Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Re:Thats Nice of Them (Score:3, Informative)
Transparent Window Hack (Score:4, Informative)
Open Terminal.app and set MBC_DEBUG as an environment variable to 16:
With bash:
set MBC_DEBUG=16
with tcsh:
setenv MBC_DEBUG 16
Now, open Chess.app from the Terminal:
open
There will be a new menu item (Floating Board) under the "Game" menu. Selecting this menu item will toggle the floating board on and off.
There seems to be a bug with the mouse behavior (I can't move any pieces) and I assume this is why this feature was removed. I found that you can get around this bug by doing the following:
Start a game with the normal window.
Play at least one move.
Switch to the floating board.
Select "Take Back Move" from the "Moves" window.
You should now be able to move the pieces as normal.
Re:Transparent window? (Score:4, Informative)
Comment out lines 741 through 744 of MBCController.mm -- funny, you've gotta love Objective-C++ -- half my work's in it too. You listening apple? Hire me
Specifically:
[[fFloatingMenuItem menu] removeItem:fFloatingMenuItem];
[[fFloatingView window] release];
fFloatingMenuItem = nil;
fFloatingView = nil;
I found these pretty quickly -- particularly since the menu item *is* in the nib file, that meant I could just run a search for [someMenu removeItem: ] and whammo, there it was. You can thank me later.
Above those lines is a call to getenv() looking up the string "MBC_DEBUG" so I gather you could simply set the parameter in your
Anyway, the above instructions will return the command-F floating window effect.
Try to use it... then you'll understand why apple took it out. It's sad, because from a performance standpoint it's *fine*, the trouble is there's no way to drag or resize the window!
Re:Transparent window? (Score:3, Informative)
Re:Windowless Chess (Score:3, Informative)
Re:GNU Chess (Score:2, Informative)
It probably doesn't hurt that Sjeng takes advantage of multiple processors and GnuChess does not.
Ian