├── Base.lproj
├── About.xib
├── Board.xib
└── MainMenu.xib
├── Chess.entitlements
├── Chess.order
├── Chess.xcconfig
├── ChessTuner-Bridging-Header.h
├── Chess_SelfTest.scpt
├── MBCSharePlayDelegates.swift
├── MBCSharePlayManager.swift
├── MBCSharePlayMessages.swift
├── MBChess-Bridging-Header.h
├── MBChess.xcodeproj
├── neeri.mode1v3
├── neeri.pbxuser
├── project.pbxproj
└── xcshareddata
│ └── xcschemes
│ └── MBChess.xcscheme
├── MBChess
└── Images.xcassets
│ ├── AppIcon.appiconset
│ ├── Contents.json
│ ├── icon_128x128.png
│ ├── icon_128x128@2x.png
│ ├── icon_16x16.png
│ ├── icon_16x16@2x.png
│ ├── icon_256x256.png
│ ├── icon_256x256@2x.png
│ ├── icon_32x32.png
│ ├── icon_32x32@2x.png
│ ├── icon_512x512.png
│ └── icon_512x512@2x.png
│ └── Contents.json
├── README
├── Resources
├── Chess.plist
├── Chess.txt
├── ChessTuner-Info.plist
├── Defaults.plist
├── Icons
│ ├── Chess_128x128.png
│ ├── Chess_128x128@2x.png
│ ├── Chess_16x16.png
│ ├── Chess_16x16@2x.png
│ ├── Chess_256x256.png
│ ├── Chess_256x256@2x.png
│ ├── Chess_32x32.png
│ ├── Chess_32x32@2x.png
│ ├── Chess_512x512.png
│ └── Chess_512x512@2x.png
├── MBChess-Info.plist
├── MTL
│ ├── Board
│ │ ├── BoardMarble.jpg
│ │ ├── BoardMetal.jpg
│ │ ├── BoardShadow.jpg
│ │ └── BoardWood.jpg
│ ├── Digit Grid
│ │ ├── DigitGrid.png
│ │ └── DigitGridNormals.jpg
│ ├── Move Arrows
│ │ ├── hintMoveArrow.png
│ │ └── lastMoveArrow.png
│ ├── Piece PBR Maps
│ │ ├── bishopN.jpg
│ │ ├── bishopR_AO.jpg
│ │ ├── kingN.jpg
│ │ ├── kingR_AO.jpg
│ │ ├── knightN.jpg
│ │ ├── knightR_AO.jpg
│ │ ├── pawnN.jpg
│ │ ├── pawnR_AO.jpg
│ │ ├── queenN.jpg
│ │ ├── queenR_AO.jpg
│ │ ├── rookN.jpg
│ │ └── rookR_AO.jpg
│ ├── Piece Selection
│ │ └── PieceSelection.png
│ ├── PiecesBlack
│ │ ├── BlackPieceMarble.jpg
│ │ ├── BlackPieceMetal.jpg
│ │ └── BlackPieceWood.jpg
│ └── PiecesWhite
│ │ ├── WhitePieceMarble.jpg
│ │ ├── WhitePieceMetal.jpg
│ │ └── WhitePieceWood.jpg
├── Meshes
│ ├── bishop.usdc
│ ├── board.usdc
│ ├── king.usdc
│ ├── knight.usdc
│ ├── pawn.usdc
│ ├── queen.usdc
│ ├── rook.usdc
│ └── shadowDisk.usdc
├── SpeechHelp.plist
├── background.pdf
├── container-migration.plist
├── irradiance.png
└── pach
├── Sources
├── MBCAbout.h
├── MBCAbout.mm
├── MBCAnimation.h
├── MBCAnimation.mm
├── MBCBoard.h
├── MBCBoard.mm
├── MBCBoardAnimation.h
├── MBCBoardAnimation.mm
├── MBCBoardCommon.h
├── MBCBoardCommon.mm
├── MBCBoardEnums.h
├── MBCBoardMTLView.h
├── MBCBoardMTLView.mm
├── MBCBoardMTLViewAccessibility.h
├── MBCBoardMTLViewAccessibility.mm
├── MBCBoardMTLViewDraw.h
├── MBCBoardMTLViewDraw.mm
├── MBCBoardMTLViewMouse.h
├── MBCBoardMTLViewMouse.mm
├── MBCBoardView.h
├── MBCBoardView.mm
├── MBCBoardViewAccessibility.h
├── MBCBoardViewAccessibility.mm
├── MBCBoardViewDraw.h
├── MBCBoardViewDraw.mm
├── MBCBoardViewInterface.h
├── MBCBoardViewModels.h
├── MBCBoardViewModels.mm
├── MBCBoardViewMouse.h
├── MBCBoardViewMouse.mm
├── MBCBoardViewTextures.h
├── MBCBoardViewTextures.mm
├── MBCBoardWin.h
├── MBCBoardWin.mm
├── MBCController.h
├── MBCController.mm
├── MBCDebug.cp
├── MBCDebug.h
├── MBCDocument.h
├── MBCDocument.mm
├── MBCDrawStyle.h
├── MBCDrawStyle.m
├── MBCEngine.h
├── MBCEngine.mm
├── MBCEngineCommands.h
├── MBCEngineCommands.l
├── MBCFloatingBoardWindow.h
├── MBCFloatingBoardWindow.mm
├── MBCGameInfo.h
├── MBCGameInfo.mm
├── MBCInteractivePlayer.h
├── MBCInteractivePlayer.mm
├── MBCLanguageModel.h
├── MBCLanguageModel.mm
├── MBCMathUtilities.h
├── MBCMathUtilities.m
├── MBCMeshLoader.h
├── MBCMeshLoader.mm
├── MBCMetalCamera.h
├── MBCMetalCamera.mm
├── MBCMetalMaterials.h
├── MBCMetalMaterials.mm
├── MBCMetalRenderer.h
├── MBCMetalRenderer.mm
├── MBCMoveAnimation.h
├── MBCMoveAnimation.mm
├── MBCMoveGenerator.h
├── MBCMoveGenerator.mm
├── MBCMoveTableView.h
├── MBCMoveTableView.mm
├── MBCMoveTableViewAccessibility.h
├── MBCMoveTableViewAccessibility.mm
├── MBCPlayer.h
├── MBCPlayer.mm
├── MBCRecordingController.h
├── MBCRecordingController.mm
├── MBCRemotePlayer.h
├── MBCRemotePlayer.mm
├── MBCRenderable.h
├── MBCRenderable.mm
├── MBCShaderTypes.h
├── MBCShaders.metal
├── MBCShadersArrow.metal
├── MBCShadersDecal.metal
├── MBCShadersGround.metal
├── MBCStretchyTextCell.h
├── MBCStretchyTextCell.mm
├── MBCTuner.h
├── MBCTuner.mm
├── MBCUserDefaults.h
├── MBCUserDefaults.mm
└── main.mm
├── Styles
├── Fur
│ ├── BlackPiece.png
│ ├── BlackPiece@2x.png
│ ├── Piece.plist
│ ├── WhitePiece.png
│ └── WhitePiece@2x.png
├── Grass
│ ├── BlackBoard.png
│ ├── BlackBoard@2x.png
│ ├── Board.plist
│ ├── Border.png
│ ├── Border@2x.png
│ ├── WhiteBoard.png
│ └── WhiteBoard@2x.png
├── Marble
│ ├── BlackBoard.png
│ ├── BlackBoard@2x.png
│ ├── BlackPiece.png
│ ├── BlackPiece@2x.png
│ ├── Board.plist
│ ├── Border.png
│ ├── Border@2x.png
│ ├── Piece.plist
│ ├── WhiteBoard.png
│ ├── WhiteBoard@2x.png
│ ├── WhitePiece.png
│ └── WhitePiece@2x.png
├── Metal
│ ├── BlackBoard.png
│ ├── BlackBoard@2x.png
│ ├── BlackPiece.png
│ ├── BlackPiece@2x.png
│ ├── Board.plist
│ ├── Border.png
│ ├── Border@2x.png
│ ├── Piece.plist
│ ├── WhiteBoard.png
│ ├── WhiteBoard@2x.png
│ ├── WhitePiece.png
│ └── WhitePiece@2x.png
└── Wood
│ ├── BlackBoard.png
│ ├── BlackBoard@2x.png
│ ├── BlackPiece.png
│ ├── BlackPiece@2x.png
│ ├── Board.plist
│ ├── Border.png
│ ├── Border@2x.png
│ ├── Piece.plist
│ ├── WhiteBoard.png
│ └── WhitePiece.png
├── Textures
├── Lettering.png
├── Lettering_Blur.png
├── selected_piece_texture.png
└── selected_piece_texture@2x.png
├── Tuner.xib
├── contributors
├── en.lproj
├── ChessTuner-InfoPlist.strings
├── Localizable.strings
├── MBChess-InfoPlist.strings
└── Spoken.strings
└── sjeng
├── AUTHORS
├── BUGS
├── COPYING
├── ChangeLog
├── INSTALL
├── Makefile.am
├── Makefile.in
├── NEWS
├── README
├── THANKS
├── TODO
├── aclocal.m4
├── attacks.c
├── blob2.c
├── book.c
├── books
├── Makefile
├── Makefile.am
├── Makefile.in
├── bug.opn
├── build-book
├── losers.opn
├── nbook.pgn
├── normal.op2
├── normal.opn
├── normal.pgn
├── start.pgn
├── suicide.opn
└── zhbook.pgn
├── config.h
├── configure
├── configure.in
├── crazy.c
├── depcomp
├── draw.c
├── ecache.c
├── epd.c
├── eval.c
├── extvars.h
├── install-sh
├── learn.c
├── leval.c
├── missing
├── mkinstalldirs
├── moves.c
├── neval.c
├── newbook.c
├── partner.c
├── proof.c
├── protos.h
├── rcfile.c
├── search.c
├── see.c
├── segtb.c
├── seval.c
├── sjeng.ChessEngine.order
├── sjeng.c
├── sjeng.h
├── sjeng.rc
├── squares.h
├── stamp-h
├── stamp-h.in
├── tests
├── Makefile
├── Makefile.am
├── Makefile.in
├── bk.epd
├── bt2630.epd
├── ecm98.epd
├── lct2.epd
└── wac.epd
├── ttable.c
└── utils.c
/Chess.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.group-session
6 |
7 | com.apple.developer.game-center
8 |
9 | com.apple.security.app-sandbox
10 |
11 | com.apple.security.files.user-selected.read-write
12 |
13 | com.apple.security.network.client
14 |
15 | com.apple.security.device.microphone
16 |
17 | com.apple.private.tcc.allow
18 |
19 | kTCCServiceMicrophone
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Chess.xcconfig:
--------------------------------------------------------------------------------
1 | #include "/AppleInternal/XcodeConfig/PlatformSupport.xcconfig"
2 | #include? "ChessOptional.xcconfig"
3 |
4 | CODE_SIGN_IDENTITY = -
5 |
--------------------------------------------------------------------------------
/ChessTuner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 | #import
5 |
--------------------------------------------------------------------------------
/Chess_SelfTest.scpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Chess_SelfTest.scpt
--------------------------------------------------------------------------------
/MBCSharePlayDelegates.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBCSharePlayDelegates.swift
3 | // MBCSharePlayDelegates
4 | //
5 |
6 | import Foundation
7 |
8 | @objc(MBCSharePlayManagerBoardWindowDelegate)
9 | public protocol MBCSharePlayManagerBoardWindowDelegate: AnyObject {
10 | func connectedToSharePlaySession(numParticipants: Int)
11 | func receivedStartSelectionMessage(message: StartSelectionMessage)
12 | func receivedEndSelectionMessage(message: EndSelectionMessage)
13 | func sendNotificationForGameEnded()
14 | func createBoardStateMessage() -> SharePlayBoardStateMessage
15 | func receivedBoardStateMessage(fen: String, moves: String, holding: String)
16 | func sessionDidEnd()
17 | func receivedTakeBackMessage()
18 | }
19 |
20 | @objc(MBCSharePlayConnectionDelegate)
21 | public protocol MBCSharePlayConnectionDelegate: AnyObject {
22 | func sharePlayConnectionEstablished()
23 | func sharePlayDidDisconnectSession(message: SharePlaySettingsMessage)
24 | }
25 |
--------------------------------------------------------------------------------
/MBCSharePlayMessages.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MBCSharePlayMessages.swift
3 | // MBCSharePlayMessages
4 | //
5 |
6 | import Foundation
7 | import os.log
8 |
9 | @objc(StartSelectionMessage)
10 | public class StartSelectionMessage: NSObject, Codable {
11 | @objc public var square: CUnsignedChar
12 | }
13 |
14 | @objc(EndSelectionMessage)
15 | public class EndSelectionMessage: NSObject, Codable {
16 | @objc public var square: CUnsignedChar
17 | @objc public var animate: Bool
18 | }
19 |
20 | @objc(SharePlaySettingsMessage)
21 | public class SharePlaySettingsMessage: NSObject, Codable {
22 | @objc public var isPlayer: Bool
23 | @objc public var disconnecting: Bool
24 | }
25 |
26 | @objc(SharePlayBoardStateMessage)
27 | public class SharePlayBoardStateMessage: NSObject, Codable {
28 | @objc public var fen: String
29 | @objc public var holding: String
30 | @objc public var moves: String
31 | @objc public var numMoves: Int32
32 |
33 | @objc public init(fen: String, holding: String, moves:String, numMoves:Int32) {
34 | self.fen = fen
35 | self.holding = holding
36 | self.moves = moves
37 | self.numMoves = numMoves
38 | }
39 | }
40 |
41 | enum MessageType: Int, Codable {
42 | case takeBack
43 | }
44 |
45 | struct GenericMessage: Codable {
46 | let type: MessageType
47 | }
48 |
49 | struct BoardMessage: Codable {
50 | let fen: String
51 | let holding: String
52 | let moves: String
53 | let numMoves: Int32
54 | }
55 |
--------------------------------------------------------------------------------
/MBChess-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
--------------------------------------------------------------------------------
/MBChess.xcodeproj/xcshareddata/xcschemes/MBChess.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
41 |
42 |
43 |
44 |
54 |
55 |
56 |
58 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "icon_16x16.png",
5 | "idiom" : "mac",
6 | "scale" : "1x",
7 | "size" : "16x16"
8 | },
9 | {
10 | "filename" : "icon_16x16@2x.png",
11 | "idiom" : "mac",
12 | "scale" : "2x",
13 | "size" : "16x16"
14 | },
15 | {
16 | "filename" : "icon_32x32.png",
17 | "idiom" : "mac",
18 | "scale" : "1x",
19 | "size" : "32x32"
20 | },
21 | {
22 | "filename" : "icon_32x32@2x.png",
23 | "idiom" : "mac",
24 | "scale" : "2x",
25 | "size" : "32x32"
26 | },
27 | {
28 | "filename" : "icon_128x128.png",
29 | "idiom" : "mac",
30 | "scale" : "1x",
31 | "size" : "128x128"
32 | },
33 | {
34 | "filename" : "icon_128x128@2x.png",
35 | "idiom" : "mac",
36 | "scale" : "2x",
37 | "size" : "128x128"
38 | },
39 | {
40 | "filename" : "icon_256x256.png",
41 | "idiom" : "mac",
42 | "scale" : "1x",
43 | "size" : "256x256"
44 | },
45 | {
46 | "filename" : "icon_256x256@2x.png",
47 | "idiom" : "mac",
48 | "scale" : "2x",
49 | "size" : "256x256"
50 | },
51 | {
52 | "filename" : "icon_512x512.png",
53 | "idiom" : "mac",
54 | "scale" : "1x",
55 | "size" : "512x512"
56 | },
57 | {
58 | "filename" : "icon_512x512@2x.png",
59 | "idiom" : "mac",
60 | "scale" : "2x",
61 | "size" : "512x512"
62 | }
63 | ],
64 | "info" : {
65 | "author" : "xcode",
66 | "version" : 1
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_128x128.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_16x16.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_256x256.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_32x32.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_512x512.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/MBChess/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png
--------------------------------------------------------------------------------
/MBChess/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | This is the source code for Apple's Chess.app Version 3.0, as shipped
2 | in MacOS X 10.8. This project consists of two components:
3 | The Chess engine, "sjeng", and the graphical frontend.
4 |
5 | "sjeng", contained in the "sjeng" subdirectory, is distributed under the
6 | terms of the GNU General Public License. See sjeng/COPYING for
7 | details.
8 |
9 | The graphical frontend, i.e., all files not in the "sjeng"
10 | subdirectory (including files derived from glChess which Apple has
11 | permission to relicense under the following terms), are distributed
12 | under the terms of the Apple Sample Code License:
13 |
14 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
15 | Inc. ("Apple") in consideration of your agreement to the following
16 | terms, and your use, installation, modification or redistribution of
17 | this Apple software constitutes acceptance of these terms. If you do
18 | not agree with these terms, please do not use, install, modify or
19 | redistribute this Apple software.
20 |
21 | In consideration of your agreement to abide by the following terms,
22 | and subject to these terms, Apple grants you a personal, non-exclusive
23 | license, under Apple's copyrights in this original Apple software (the
24 | "Apple Software"), to use, reproduce, modify and redistribute the
25 | Apple Software, with or without modifications, in source and/or binary
26 | forms; provided that if you redistribute the Apple Software in its
27 | entirety and without modifications, you must retain this notice and
28 | the following text and disclaimers in all such redistributions of the
29 | Apple Software. Neither the name, trademarks, service marks or logos
30 | of Apple Computer, Inc. may be used to endorse or promote products
31 | derived from the Apple Software without specific prior written
32 | permission from Apple. Except as expressly stated in this notice, no
33 | other rights or licenses, express or implied, are granted by Apple
34 | herein, including but not limited to any patent rights that may be
35 | infringed by your derivative works or by other works in which the
36 | Apple Software may be incorporated.
37 |
38 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
39 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
40 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
41 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
42 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
43 |
44 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
45 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
46 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
47 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
48 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
49 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
50 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
51 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 |
--------------------------------------------------------------------------------
/Resources/Chess.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | OpenSourceImportDate
7 | 2002-08-22
8 | OpenSourceLicense
9 | GPL
10 | OpenSourceLicenseFile
11 | Chess.txt
12 | OpenSourceModifications
13 |
14 | rdar://problem/3381109
15 | rdar://problem/3344423
16 |
17 | OpenSourceProject
18 | sjeng
19 | OpenSourceSHA1
20 | 99f82103ece238d78b8c0c96a943cffc0811d654
21 | OpenSourceURL
22 | http://sjeng.org/ftp/Sjeng-Free-11.2.tar.gz
23 | OpenSourceVersion
24 | 11.2
25 | OpenSourceWebsiteURL
26 | http://sjeng.org/
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Resources/ChessTuner-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleDocumentTypes
8 |
9 |
10 | CFBundleTypeExtensions
11 |
12 | game
13 |
14 | CFBundleTypeIconFile
15 | chess.icns
16 | CFBundleTypeName
17 | game
18 | CFBundleTypeOSTypes
19 |
20 | cfen
21 |
22 | CFBundleTypeRole
23 | Editor
24 | LSItemContentTypes
25 |
26 | com.apple.chess.game
27 |
28 | LSTypeIsPackage
29 |
30 | NSDocumentClass
31 | MBCDocument
32 | NSExportableAs
33 |
34 | moves
35 |
36 | NSExportableTypes
37 |
38 | com.apple.chess.pgn
39 |
40 | NSPersistentStoreTypeKey
41 | Binary
42 |
43 |
44 | CFBundleTypeExtensions
45 |
46 | pgn
47 |
48 | CFBundleTypeIconFile
49 | chess.icns
50 | CFBundleTypeName
51 | moves
52 | CFBundleTypeOSTypes
53 |
54 | cpgn
55 |
56 | CFBundleTypeRole
57 | None
58 | LSItemContentTypes
59 |
60 | com.apple.chess.pgn
61 |
62 | LSTypeIsPackage
63 |
64 |
65 |
66 | CFBundleExecutable
67 | Chess Tuner
68 | CFBundleGetInfoString
69 | 2.4.3, Copyright 2003-2010 Apple Inc.
70 | CFBundleHelpBookFolder
71 | Chess.help
72 | CFBundleHelpBookName
73 | com.apple.Chess.help
74 | CFBundleIconFile
75 | chess.icns
76 | CFBundleIdentifier
77 | com.apple.ChessTuner
78 | CFBundleInfoDictionaryVersion
79 | 6.0
80 | CFBundleName
81 | Chess
82 | CFBundlePackageType
83 | APPL
84 | CFBundleShortVersionString
85 | 2.4.3
86 | CFBundleSignature
87 | mbch
88 | CFBundleVersion
89 | 2.4.3
90 | NSHumanReadableCopyright
91 | Copyright 2003-2010 Apple Inc.
92 | NSMainNibFile
93 | MainMenu
94 | NSPrincipalClass
95 | NSApplication
96 | NSSupportsSuddenTermination
97 |
98 | UTExportedTypeDeclarations
99 |
100 |
101 | UTTypeConformsTo
102 |
103 | public.utf8-plain-text
104 |
105 | UTTypeIdentifier
106 | com.apple.chess.game
107 | UTTypeTagSpecification
108 |
109 | public.filename-extension
110 | game
111 |
112 |
113 |
114 | UTTypeConformsTo
115 |
116 | public.utf8-plain-text
117 |
118 | UTTypeIdentifier
119 | com.apple.chess.pgn
120 | UTTypeTagSpecification
121 |
122 | public.filename-extension
123 | pgn
124 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/Resources/Defaults.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SharePlayEnabled
6 |
7 | AppleFullScreenEnabled
8 |
9 | MBCAlternateVoice
10 | com.apple.speech.synthesis.voice.Victoria
11 | MBCBoardAngle
12 | 60
13 | MBCBoardSpin
14 | 180
15 | MBCBoardStyle
16 | Wood
17 | MBCEnableVariations
18 |
19 | MBCFloatingBoard
20 |
21 | MBCListenForMoves
22 |
23 | MBCPieceStyle
24 | Wood
25 | MBCSearchTime
26 | 1
27 | MBCShowMoveInTitle
28 |
29 | MBCSpeakHumanMoves
30 |
31 | MBCSpeakMoves
32 |
33 | MBCNewGamePlayers
34 | 1
35 | MBCNewGameVariant
36 | 0
37 | MBCNewGameSides
38 | 2
39 | MBCShowGameLog
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Resources/Icons/Chess_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_128x128.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_128x128@2x.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_16x16.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_16x16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_16x16@2x.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_256x256.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_256x256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_256x256@2x.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_32x32.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_32x32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_32x32@2x.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_512x512.png
--------------------------------------------------------------------------------
/Resources/Icons/Chess_512x512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Icons/Chess_512x512@2x.png
--------------------------------------------------------------------------------
/Resources/MBChess-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleDocumentTypes
8 |
9 |
10 | CFBundleTypeExtensions
11 |
12 | game
13 |
14 | CFBundleTypeName
15 | game
16 | CFBundleTypeOSTypes
17 |
18 | cfen
19 |
20 | CFBundleTypeRole
21 | Editor
22 | LSItemContentTypes
23 |
24 | com.apple.chess.game
25 |
26 | LSTypeIsPackage
27 |
28 | NSDocumentClass
29 | MBCDocument
30 | NSExportableAs
31 |
32 | moves
33 |
34 | NSExportableTypes
35 |
36 | com.apple.chess.pgn
37 |
38 | NSPersistentStoreTypeKey
39 | Binary
40 |
41 |
42 | CFBundleTypeExtensions
43 |
44 | pgn
45 |
46 | CFBundleTypeName
47 | moves
48 | CFBundleTypeOSTypes
49 |
50 | cpgn
51 |
52 | CFBundleTypeRole
53 | None
54 | LSItemContentTypes
55 |
56 | com.apple.chess.pgn
57 |
58 | LSTypeIsPackage
59 |
60 |
61 |
62 | CFBundleExecutable
63 | Chess
64 | CFBundleGetInfoString
65 | $(CURRENT_PROJECT_VERSION), Copyright 2003–2024 Apple Inc.
66 | CFBundleHelpBookFolder
67 | Chess.help
68 | CFBundleHelpBookName
69 | com.apple.Chess.help
70 | CFBundleIdentifier
71 | com.apple.Chess
72 | CFBundleInfoDictionaryVersion
73 | 6.0
74 | CFBundleName
75 | Chess
76 | CFBundlePackageType
77 | APPL
78 | CFBundleShortVersionString
79 | $(MARKETING_VERSION)
80 | CFBundleSignature
81 | mbch
82 | CFBundleVersion
83 | $(CURRENT_PROJECT_VERSION)
84 | HPDHelpProjectIdentifier
85 | chess
86 | LSApplicationCategoryType
87 | public.app-category.board-games
88 | LSHasLocalizedDisplayName
89 |
90 | LSMinimumSystemVersion
91 | 10.9.0
92 | MBCBuildTag
93 | Chess-$(RC_ProjectSourceVersion)
94 | NSHumanReadableCopyright
95 | Copyright 2003–2024 Apple Inc.
96 | NSMainNibFile
97 | MainMenu
98 | NSPrincipalClass
99 | NSApplication
100 | NSSupportsSuddenTermination
101 |
102 | UTExportedTypeDeclarations
103 |
104 |
105 | UTTypeConformsTo
106 |
107 | public.utf8-plain-text
108 |
109 | UTTypeDescription
110 | Composed document icon for the .game document type
111 | UTTypeIdentifier
112 | com.apple.chess.game
113 | UTTypeTagSpecification
114 |
115 | public.filename-extension
116 | game
117 |
118 |
119 |
120 | UTTypeConformsTo
121 |
122 | public.utf8-plain-text
123 |
124 | UTTypeDescription
125 | Composed document icon for the .pgn document type
126 | UTTypeIdentifier
127 | com.apple.chess.pgn
128 | UTTypeTagSpecification
129 |
130 | public.filename-extension
131 | pgn
132 |
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/Resources/MTL/Board/BoardMarble.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Board/BoardMarble.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Board/BoardMetal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Board/BoardMetal.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Board/BoardShadow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Board/BoardShadow.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Board/BoardWood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Board/BoardWood.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Digit Grid/DigitGrid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Digit Grid/DigitGrid.png
--------------------------------------------------------------------------------
/Resources/MTL/Digit Grid/DigitGridNormals.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Digit Grid/DigitGridNormals.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Move Arrows/hintMoveArrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Move Arrows/hintMoveArrow.png
--------------------------------------------------------------------------------
/Resources/MTL/Move Arrows/lastMoveArrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Move Arrows/lastMoveArrow.png
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/bishopN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/bishopN.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/bishopR_AO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/bishopR_AO.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/kingN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/kingN.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/kingR_AO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/kingR_AO.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/knightN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/knightN.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/knightR_AO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/knightR_AO.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/pawnN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/pawnN.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/pawnR_AO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/pawnR_AO.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/queenN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/queenN.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/queenR_AO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/queenR_AO.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/rookN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/rookN.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece PBR Maps/rookR_AO.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece PBR Maps/rookR_AO.jpg
--------------------------------------------------------------------------------
/Resources/MTL/Piece Selection/PieceSelection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/Piece Selection/PieceSelection.png
--------------------------------------------------------------------------------
/Resources/MTL/PiecesBlack/BlackPieceMarble.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/PiecesBlack/BlackPieceMarble.jpg
--------------------------------------------------------------------------------
/Resources/MTL/PiecesBlack/BlackPieceMetal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/PiecesBlack/BlackPieceMetal.jpg
--------------------------------------------------------------------------------
/Resources/MTL/PiecesBlack/BlackPieceWood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/PiecesBlack/BlackPieceWood.jpg
--------------------------------------------------------------------------------
/Resources/MTL/PiecesWhite/WhitePieceMarble.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/PiecesWhite/WhitePieceMarble.jpg
--------------------------------------------------------------------------------
/Resources/MTL/PiecesWhite/WhitePieceMetal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/PiecesWhite/WhitePieceMetal.jpg
--------------------------------------------------------------------------------
/Resources/MTL/PiecesWhite/WhitePieceWood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/MTL/PiecesWhite/WhitePieceWood.jpg
--------------------------------------------------------------------------------
/Resources/Meshes/bishop.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/bishop.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/board.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/board.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/king.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/king.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/knight.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/knight.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/pawn.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/pawn.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/queen.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/queen.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/rook.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/rook.usdc
--------------------------------------------------------------------------------
/Resources/Meshes/shadowDisk.usdc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/Meshes/shadowDisk.usdc
--------------------------------------------------------------------------------
/Resources/SpeechHelp.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PlacementHint1
6 | CommandInfoArray
7 |
8 | Text<Piece> <Square> to/takes <Square> (e.g. Knight g1 to f3)
9 | TextCastle kingside
10 | TextCastle queenside
11 | TextDrop <Piece> at <Square> (e.g. Drop knight at c7) [Crazyhouse only]
12 | TextTake back move
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Resources/background.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/background.pdf
--------------------------------------------------------------------------------
/Resources/container-migration.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Move
6 |
7 | ${ApplicationSupport}/Chess
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Resources/irradiance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Resources/irradiance.png
--------------------------------------------------------------------------------
/Resources/pach:
--------------------------------------------------------------------------------
1 | --- Info-ChessTuner.plist 2008-11-20 22:34:05.000000000 +0100
2 | +++ Info-MBChess.plist 2008-11-21 00:07:14.000000000 +0100
3 | @@ -25,8 +25,20 @@
4 |
5 | com.apple.chess.game
6 |
7 | + LSTypeIsPackage
8 | +
9 | NSDocumentClass
10 | MBCDocument
11 | + NSExportableAs
12 | +
13 | + moves
14 | +
15 | + NSExportableTypes
16 | +
17 | + com.apple.chess.pgn
18 | +
19 | + NSPersistentStoreTypeKey
20 | + Binary
21 |
22 |
23 | CFBundleTypeExtensions
24 | @@ -43,10 +55,22 @@
25 |
26 | CFBundleTypeRole
27 | None
28 | + LSItemContentTypes
29 | +
30 | + com.apple.chess.pgn
31 | +
32 | + LSTypeIsPackage
33 | +
34 |
35 |
36 | CFBundleExecutable
37 | Chess Tuner
38 | + CFBundleGetInfoString
39 | + 2.4.2, Copyright 2003-2009 Apple Inc.
40 | + CFBundleHelpBookFolder
41 | + ChessHelp
42 | + CFBundleHelpBookName
43 | + Chess Help
44 | CFBundleIconFile
45 | chess.icns
46 | CFBundleIdentifier
47 | @@ -58,14 +82,47 @@
48 | CFBundlePackageType
49 | APPL
50 | CFBundleShortVersionString
51 | - 2.0
52 | + 2.4.2
53 | CFBundleSignature
54 | mbch
55 | CFBundleVersion
56 | - 2.4
57 | + 2.4.2
58 | + NSHumanReadableCopyright
59 | + Copyright 2003-2009 Apple Inc.
60 | NSMainNibFile
61 | MainMenu
62 | NSPrincipalClass
63 | NSApplication
64 | + NSSupportsSuddenTermination
65 | +
66 | + UTExportedTypeDeclarations
67 | +
68 | +
69 | + UTTypeConformsTo
70 | +
71 | + public.utf8-plain-text
72 | +
73 | + UTTypeIdentifier
74 | + com.apple.chess.game
75 | + UTTypeTagSpecification
76 | +
77 | + public.filename-extension
78 | + game
79 | +
80 | +
81 | +
82 | + UTTypeConformsTo
83 | +
84 | + public.utf8-plain-text
85 | +
86 | + UTTypeIdentifier
87 | + com.apple.chess.pgn
88 | + UTTypeTagSpecification
89 | +
90 | + public.filename-extension
91 | + pgn
92 | +
93 | +
94 | +
95 |
96 |
97 |
--------------------------------------------------------------------------------
/Sources/MBCAbout.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCAbout.h
3 | Contains: Show the about box
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 |
48 | @interface MBCAbout : NSWindowController
49 | {
50 | IBOutlet id fLicense;
51 | }
52 |
53 | - (IBAction) downloadSource:(id)sender;
54 |
55 | - (NSString *)version;
56 | - (NSString *)buildTag;
57 |
58 | @end
59 |
60 | // Local Variables:
61 | // mode:ObjC
62 | // End:
63 |
--------------------------------------------------------------------------------
/Sources/MBCAbout.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCAbout.mm
3 | Contains: Show the about box
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCAbout.h"
47 |
48 | @implementation MBCAbout
49 |
50 | - (id)init
51 | {
52 | self = [super initWithWindowNibName:@"About"];
53 |
54 | return self;
55 | }
56 |
57 | - (void)windowDidLoad
58 | {
59 | [fLicense setString:
60 | [NSString stringWithContentsOfURL:
61 | [[NSBundle mainBundle]
62 | URLForResource: @"COPYING" withExtension:nil]
63 | encoding:NSUTF8StringEncoding
64 | error:nil]];
65 | [fLicense alignLeft:self];
66 | [fLicense setEditable:NO];
67 | [fLicense scrollRangeToVisible:NSMakeRange(0,0)];
68 | }
69 |
70 | - (NSString *)version
71 | {
72 | return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
73 | }
74 |
75 | - (NSString *)buildTag
76 | {
77 | return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MBCBuildTag"];
78 | }
79 |
80 | - (IBAction) downloadSource:(id)sender
81 | {
82 | NSURL * url =
83 | [NSURL
84 | URLWithString:@"http://www.opensource.apple.com/releases/"];
85 | [[NSWorkspace sharedWorkspace] openURL:url];
86 | }
87 |
88 | - (NSFont *) licenseFont
89 | {
90 | return [NSFont userFixedPitchFontOfSize:10.0];
91 | }
92 |
93 | @end
94 |
95 | // Local Variables:
96 | // mode:ObjC
97 | // End:
98 |
--------------------------------------------------------------------------------
/Sources/MBCAnimation.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCAnimation.h
3 | Contains: Basic infrastructure for animations.
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 |
48 | #import
49 |
50 | #import "MBCBoardViewInterface.h"
51 | #import "MBCBoardCommon.h"
52 |
53 | @interface MBCAnimation : NSObject {
54 | struct timeval fStart;
55 | float fTime;
56 | float fLastElapsed;
57 | @protected
58 | NSView * fView;
59 | }
60 |
61 | - (void) runWithTime:(float)seconds view:(NSView *)view;
62 | - (void) cancel;
63 |
64 | @end
65 |
66 | @interface MBCAnimation ( Clients )
67 |
68 | - (void) startState;
69 | - (void) step: (float)pctDone;
70 | - (void) endState;
71 |
72 | @end
73 |
74 | // Local Variables:
75 | // mode:ObjC
76 | // End:
77 |
--------------------------------------------------------------------------------
/Sources/MBCBoard.mm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Sources/MBCBoard.mm
--------------------------------------------------------------------------------
/Sources/MBCBoardAnimation.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardAnimation.h
3 | Contains: Animate the board rotating by 180 degrees
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCAnimation.h"
47 | #import "MBCBoardViewInterface.h"
48 |
49 | @interface MBCBoardAnimation : MBCAnimation {
50 | float fFromAzimuth;
51 | float fToAzimuth;
52 | float fDelta;
53 | }
54 |
55 | + (id) boardAnimation:(NSView *)view;
56 |
57 | - (void) step: (float)pctDone;
58 | - (void) endState;
59 |
60 | - (void) dealloc;
61 |
62 | @end
63 |
64 | // Local Variables:
65 | // mode:ObjC
66 | // End:
67 |
--------------------------------------------------------------------------------
/Sources/MBCBoardAnimation.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardAnimation.mm
3 | Contains: Animate the board rotating by 180 degrees
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 | #import "MBCBoardAnimation.h"
46 |
47 | #include
48 |
49 | @implementation MBCBoardAnimation
50 |
51 | + (id) boardAnimation:(NSView *)view
52 | {
53 | MBCBoardAnimation * a = [[MBCBoardAnimation alloc] init];
54 |
55 | a->fFromAzimuth = view.azimuth;
56 | a->fToAzimuth = fmod(a->fFromAzimuth + 180.0f, 360.0f);
57 | a->fDelta = 180.0f;
58 | [a runWithTime:2.0 view:view];
59 |
60 | return a;
61 | }
62 |
63 | - (void) step: (float)pctDone
64 | {
65 | fView.azimuth = fFromAzimuth+fDelta*pctDone;
66 | [fView needsUpdate];
67 | }
68 |
69 | - (void) endState
70 | {
71 | fView.azimuth = fToAzimuth;
72 | [super endState];
73 | }
74 |
75 | - (void) dealloc
76 | {
77 | [super dealloc];
78 | }
79 |
80 | @end
81 |
82 | // Local Variables:
83 | // mode:ObjC
84 | // End:
85 |
--------------------------------------------------------------------------------
/Sources/MBCBoardMTLViewDraw.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardMTLViewDraw.h
3 | Contains: Manages the draw related data updates for Metal rendering.
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCBoardMTLView.h"
47 |
48 | #import
49 |
50 | @interface MBCBoardMTLView (Draw)
51 |
52 | /*!
53 | @abstract prepareSceneDataForRenderer
54 | @discussion This is called per frame to update piece and board data to send to the renderer.
55 | */
56 | - (void)prepareSceneDataForRenderer;
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Sources/MBCBoardMTLViewMouse.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardMTLViewMouse.h
3 | Contains: Mouse handling for OpenGL chess board view
4 | Copyright: © 2002-2010 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCBoardMTLView.h"
47 |
48 | struct MBCPosition;
49 |
50 | @interface MBCBoardMTLView (Mouse)
51 |
52 | /*!
53 | @abstract approximateBoundsOfSquare:
54 | @param square Square code on the board
55 | @discussion Will convert the given board square from world coordinates to screen space coordinates as a NSRect
56 | */
57 | - (NSRect)approximateBoundsOfSquare:(MBCSquare)square;
58 |
59 | /*!
60 | @abstract mouseToPosition:
61 | @param mouse Screen position for the mouse
62 | @discussion Will convert the given mouse screen position to coordinates in the world
63 | */
64 | - (MBCPosition)mouseToPosition:(NSPoint)mouse;
65 |
66 | /*!
67 | @abstract mouseDown:
68 | @param event The event for mouseDown
69 | @discussion Called when initially click mouse
70 | */
71 | - (void)mouseDown:(NSEvent *)event;
72 |
73 | /*!
74 | @abstract mouseMoved:
75 | @param event The event for mouseMoved
76 | @discussion Called when move the mouse
77 | */
78 | - (void)mouseMoved:(NSEvent *)event;
79 |
80 | /*!
81 | @abstract mouseUp:
82 | @param event The event for mouseUp
83 | @discussion Called when release mouse click
84 | */
85 | - (void)mouseUp:(NSEvent *)event;
86 |
87 | /*!
88 | @abstract dragAndRedraw:forceRedraw:
89 | @param force
90 | @discussion Called to handle mouse drag while clicking. Depending upon which region is
91 | clicked will either do piece selection/moving or rotate the board (via camera movement).
92 | */
93 | - (void)dragAndRedraw:(NSEvent *)event forceRedraw:(BOOL)force;
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/Sources/MBCBoardViewAccessibility.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardViewDraw.h
3 | Contains: Accessibility navigation for chess board
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCBoardView.h"
47 |
48 | @interface MBCBoardAccessibilityProxy : NSObject
49 | {
50 | MBCBoardView * fView;
51 | MBCSquare fSquare;
52 | }
53 |
54 | + (id) proxyWithView:(MBCBoardView *)view square:(MBCSquare)square;
55 | - (id) initWithView:(MBCBoardView *)view square:(MBCSquare)square;
56 |
57 | @end
58 |
59 | @interface MBCBoardView (Accessibility)
60 |
61 | - (NSString *) describeSquare:(MBCSquare)square;
62 | - (void) selectSquare:(MBCSquare)square;
63 |
64 | @end
65 |
66 | // Local Variables:
67 | // mode:ObjC
68 | // End:
69 |
--------------------------------------------------------------------------------
/Sources/MBCBoardViewDraw.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardViewDraw.h
3 | Contains: Drawing the OpenGL chess board view
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCBoardView.h"
47 |
48 | @interface MBCBoardView ( Draw )
49 |
50 | - (void) drawPosition; // Draw the whole board and pieces
51 |
52 | @end
53 |
54 | // Local Variables:
55 | // mode:ObjC
56 | // End:
57 |
--------------------------------------------------------------------------------
/Sources/MBCBoardViewModels.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardViewModels.h
3 | Contains: Piece model handling for OpenGL chess board view
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCBoardView.h"
47 |
48 | @interface MBCBoardView ( Models )
49 |
50 | - (void) generateModelLists;
51 |
52 | @end
53 |
54 | // Local Variables:
55 | // mode:ObjC
56 | // End:
57 |
--------------------------------------------------------------------------------
/Sources/MBCBoardViewMouse.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardViewMouse.h
3 | Contains: Mouse handling for OpenGL chess board view
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCBoardView.h"
47 |
48 | @interface MBCBoardView ( Mouse )
49 |
50 | - (NSRect) approximateBoundsOfSquare:(MBCSquare)square;
51 | - (MBCPosition) mouseToPosition:(NSPoint)mouse;
52 | - (void) mouseDown:(NSEvent *)event;
53 | - (void) mouseMoved:(NSEvent *)event;
54 | - (void) mouseUp:(NSEvent *)event;
55 | - (void) dragAndRedraw:(NSEvent *)event forceRedraw:(BOOL)force;
56 |
57 | @end
58 |
59 | // Local Variables:
60 | // mode:ObjC
61 | // End:
62 |
--------------------------------------------------------------------------------
/Sources/MBCBoardViewTextures.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardViewTextures.h
3 | Contains: Texture handling for OpenGL chess board view.
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 | /* MBCBoardViewTextures */
46 |
47 | #import "MBCBoardView.h"
48 |
49 | @interface MBCBoardView ( Textures )
50 |
51 | - (void) loadColors;
52 | - (void) loadStyles;
53 |
54 | #ifdef CHESS_TUNER
55 | - (void) savePieceStyles;
56 | - (void) saveBoardStyles;
57 | #endif
58 |
59 | @end
60 |
61 | // Local Variables:
62 | // mode:ObjC
63 | // End:
64 |
--------------------------------------------------------------------------------
/Sources/MBCController.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCController.h
3 | Contains: Managing the entire user interface
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 | #import
48 | #import
49 |
50 | #import "MBCBoard.h"
51 |
52 | #ifdef CHESS_TUNER
53 | #import "Chess_Tuner-Swift.h"
54 | #else
55 | #import "Chess-Swift.h"
56 | #endif
57 |
58 | @class MBCBoard;
59 | @class MBCBoardView;
60 | @class MBCEngine;
61 | @class MBCInteractivePlayer;
62 | @class NSSpeechSynthesizer;
63 | @class MBCDocument;
64 |
65 | @interface MBCController : NSObject
66 | {
67 | IBOutlet NSObjectController * fCurrentDocument;
68 |
69 | NSMutableArray * fMatchesToLoad;
70 | NSArray * fExistingMatches;
71 | NSMutableDictionary * fAchievements;
72 | }
73 |
74 | @property (nonatomic, assign) GKLocalPlayer * localPlayer;
75 | @property (nonatomic) BOOL logMouse;
76 | @property (nonatomic) BOOL dumpLanguageModels;
77 | @property (assign) IBOutlet NSMenuItem * sharePlaySessionMenuItem;
78 |
79 |
80 | - (id) init;
81 | - (void) awakeFromNib;
82 | - (IBAction) newGame:(id)sender;
83 | - (void)startNewOnlineGame:(GKTurnBasedMatch *)match withDocument:(MBCDocument *)doc;
84 | - (void) loadMatch:(NSString *)matchID;
85 | - (void) setValue:(float)value forAchievement:(NSString *)ident;
86 | - (void) updateApplicationBadge;
87 | - (void)stopRecordingForWindow:(NSWindow *)window;
88 | - (NSWindowController *)currentWindowController;
89 |
90 | #if HAS_FLOATING_BOARD
91 | - (IBAction) toggleFloating:(id)sender;
92 | #endif
93 |
94 | @end
95 |
96 | // Local Variables:
97 | // mode:ObjC
98 | // End:
99 |
--------------------------------------------------------------------------------
/Sources/MBCDebug.cp:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCDebug.cp
3 | Contains: Debug flags
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #include "MBCDebug.h"
47 |
48 | #include
49 |
50 | int MBCDebug::sDebugFlags;
51 |
52 | void
53 | MBCDebug::Update()
54 | {
55 | if (const char * dbg = getenv("MBC_DEBUG"))
56 | sDebugFlags = atoi(dbg);
57 | else
58 | sDebugFlags = 0;
59 | }
60 |
61 | void
62 | MBCDebug::SetDebugFlags(int flag, bool val)
63 | {
64 | if (val)
65 | sDebugFlags |= flag;
66 | else
67 | sDebugFlags &= ~flag;
68 | }
69 |
--------------------------------------------------------------------------------
/Sources/MBCDebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCDebug.h
3 | Contains: Debug flags
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | class MBCDebug {
47 | public:
48 | static void Update();
49 | static bool ShowDebugMenu() { return DebugFlags() & 1; }
50 | static bool LogMouse() { return DebugFlags() & 2; }
51 | static void SetLogMouse(bool val) { SetDebugFlags(2, val); }
52 | static bool LogStart() { return DebugFlags() & 4; }
53 | static bool DumpLanguageModels() { return DebugFlags() & 8; }
54 | static void SetDumpLanguageModels(bool val) { SetDebugFlags(8, val); }
55 | static bool Use1xTextures() { return DebugFlags() & 16; }
56 | private:
57 | static int DebugFlags() { return sDebugFlags; }
58 | static void SetDebugFlags(int flag, bool val);
59 | static int sDebugFlags;
60 | };
61 |
--------------------------------------------------------------------------------
/Sources/MBCEngineCommands.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCEngineCommands.h
3 | Contains: Encode commands sent by chess engine.
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #ifdef __cplusplus
47 | #import "MBCBoard.h"
48 |
49 | extern "C" {
50 | #else
51 | typedef unsigned MBCCompactMove;
52 | #endif
53 |
54 | extern MBCCompactMove MBCEncodeMove(const char * move, int ponder);
55 | extern MBCCompactMove MBCEncodeDrop(const char * drop, int ponder);
56 | extern MBCCompactMove MBCEncodeIllegal();
57 | extern MBCCompactMove MBCEncodeLegal();
58 | extern MBCCompactMove MBCEncodePong();
59 | extern MBCCompactMove MBCEncodeStartGame();
60 | extern MBCCompactMove MBCEncodeWhiteWins();
61 | extern MBCCompactMove MBCEncodeBlackWins();
62 | extern MBCCompactMove MBCEncodeDraw();
63 | extern MBCCompactMove MBCEncodeTakeback();
64 |
65 | extern void MBCIgnoredText(const char * text);
66 | extern int MBCReadInput(char * buf, int max_size);
67 |
68 | typedef void * MBCLexerInstance;
69 | extern void MBCLexerInit(MBCLexerInstance*scanner);
70 | extern void MBCLexerDestroy(MBCLexerInstance scanner);
71 | extern MBCCompactMove MBCLexerScan(MBCLexerInstance scanner);
72 |
73 | #ifdef __cplusplus
74 | }
75 | #endif
76 |
--------------------------------------------------------------------------------
/Sources/MBCEngineCommands.l:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCEngineCommands.l
3 | Contains: Encode commands sent by chess engine.
4 | Copyright: © 2003-2024 by Apple Computer, Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Computer, Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 | %{
46 | #include "MBCEngineCommands.h"
47 |
48 | #define YY_SKIP_YYWRAP 1
49 | #define YY_NO_UNPUT 1
50 | #define YY_DECL MBCCompactMove yylex(yyscan_t yyscanner)
51 | #define YY_INPUT(buf,res,max_size) res = MBCReadInput(buf, max_size)
52 | #define yywrap(x) 1
53 | %}
54 |
55 | ROW ([1-8])
56 | COL ([a-h])
57 | PIECE ([prnbqkPRNBQK])
58 | %%
59 | "move "{COL}{ROW}{COL}{ROW}\n { return MBCEncodeMove(yytext+yyleng-5, 0); }
60 | "move "{PIECE}@{COL}{ROW}\n { return MBCEncodeDrop(yytext+yyleng-5, 0); }
61 | "move "{COL}{ROW}{COL}{ROW}{PIECE}\n { return MBCEncodeMove(yytext+yyleng-6, 0); }
62 | "ponder "{COL}{ROW}{COL}{ROW}\n { return MBCEncodeMove(yytext+yyleng-5, 1); }
63 | "ponder "{PIECE}@{COL}{ROW}\n { return MBCEncodeDrop(yytext+yyleng-5, 1); }
64 | "ponder "{COL}{ROW}{COL}{ROW}{PIECE}\n { return MBCEncodeMove(yytext+yyleng-6, 1); }
65 | "Illegal move":.*\n { return MBCEncodeIllegal(); }
66 | "Legal move":.*\n { return MBCEncodeLegal(); }
67 | "pong ".*\n { return MBCEncodePong(); }
68 | "tellics set 1 Sjeng ".*\n { return MBCEncodeStartGame(); }
69 | 1-0.*\n { return MBCEncodeWhiteWins(); }
70 | 0-1.*\n { return MBCEncodeBlackWins(); }
71 | "1/2-1/2".*\n { return MBCEncodeDraw(); }
72 | .*\n { MBCIgnoredText(yytext);}
73 | %%
74 |
75 | void MBCLexerInit(MBCLexerInstance * scanner)
76 | {
77 | yylex_init((yyscan_t*)scanner);
78 | }
79 |
80 | void MBCLexerDestroy(MBCLexerInstance scanner)
81 | {
82 | yylex_destroy((yyscan_t)scanner);
83 | }
84 |
85 | MBCCompactMove MBCLexerScan(MBCLexerInstance scanner)
86 | {
87 | return yylex((yyscan_t)scanner);
88 | }
89 | // Local Variables:
90 | // mode:C
91 | // End:
92 |
--------------------------------------------------------------------------------
/Sources/MBCFloatingBoardWindow.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCFloatingBoardWindow.h
3 | Contains: The board window for the floating board
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 |
48 | @interface MBCFloatingBoardWindow : NSWindow
49 | {
50 | }
51 |
52 | @end
53 |
54 | // Local Variables:
55 | // mode:ObjC
56 | // End:
57 |
--------------------------------------------------------------------------------
/Sources/MBCFloatingBoardWindow.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCFloatingBoardWindow.mm
3 | Contains: The board window for the floating board
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCFloatingBoardWindow.h"
47 |
48 | @implementation MBCFloatingBoardWindow
49 |
50 | //
51 | // Adapted from RoundTransparentWindow sample code
52 | //
53 | - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle
54 | backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
55 | {
56 | //
57 | // Call NSWindow's version of this function, but pass in the all-important
58 | // value of NSBorderlessWindowMask for the styleMask so that the window
59 | // doesn't have a title bar
60 | //
61 | MBCFloatingBoardWindow* result =
62 | [super initWithContentRect: contentRect
63 | styleMask: NSBorderlessWindowMask
64 | backing: bufferingType defer: flag];
65 | //
66 | // Set the background color to clear so that (along with the setOpaque
67 | // call below) we can see through the parts of the window that we're not // drawing into.
68 | //
69 | [result setBackgroundColor: [NSColor clearColor]];
70 | //
71 | // Let's start with no transparency for all drawing into the window
72 | //
73 | [result setAlphaValue:0.999];
74 | //
75 | // but let's turn off opaqueness so that we can see through the parts of
76 | // the window that we're not drawing into
77 | //
78 | [result setOpaque:NO];
79 | //
80 | // and while we're at it, make sure the window has a shadow, which will
81 | // automatically be the shape of our custom content.
82 | //
83 | [result setHasShadow: YES];
84 | return result;
85 | }
86 |
87 | //
88 | // Custom windows that use the NSBorderlessWindowMask can't become key by
89 | // default. Therefore, controls in such windows won't ever be enabled by
90 | // default. Thus, we override this method to change that.
91 | //
92 | - (BOOL) canBecomeKeyWindow
93 | {
94 | return YES;
95 | }
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/Sources/MBCLanguageModel.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCLanguageModel.h
3 | Contains: Build and interpret speech recognition language model
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCMoveGenerator.h"
47 |
48 | #import
49 |
50 | /*
51 | * An MBCLanguageModel builds a speech recognition language model from a
52 | * collection of legal moves, and derives the move from a recognition
53 | * result.
54 | */
55 | @interface MBCLanguageModel : NSObject {
56 | SRRecognitionSystem fSystem;
57 | SRLanguageObject fToModel;
58 | SRLanguageObject fPromotionModel;
59 | MBCMoveCollection * fMoves;
60 | }
61 |
62 | - (id) initWithRecognitionSystem:(SRRecognitionSystem)system;
63 | - (void) buildLanguageModel:(SRLanguageModel)model
64 | fromMoves:(MBCMoveCollection *)moves
65 | takeback:(BOOL)takeback;
66 | - (MBCMove *) recognizedMove:(SRRecognitionResult)result;
67 |
68 | @end
69 |
70 | // Local Variables:
71 | // mode:ObjC
72 | // End:
73 |
--------------------------------------------------------------------------------
/Sources/MBCMoveAnimation.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCMoveAnimation.h
3 | Contains: Animate a piece moving on the board
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCAnimation.h"
47 |
48 | @class MBCBoard;
49 |
50 | @interface MBCMoveAnimation : MBCAnimation {
51 | MBCPiece fPiece;
52 | MBCMove * fMove;
53 | MBCPosition fFrom;
54 | MBCPosition fDelta;
55 | }
56 |
57 | + (id) moveAnimation:(MBCMove *)move board:(MBCBoard *)board view:(NSView *)view;
58 |
59 | - (void) step: (float)pctDone;
60 | - (void) endState;
61 |
62 | - (void) dealloc;
63 |
64 | @end
65 |
66 | // Local Variables:
67 | // mode:ObjC
68 | // End:
69 |
--------------------------------------------------------------------------------
/Sources/MBCMoveAnimation.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCMoveAnimation.mm
3 | Contains: Animate a piece moving on the board
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCMoveAnimation.h"
47 | #import "MBCPlayer.h"
48 |
49 | #include
50 |
51 | @implementation MBCMoveAnimation
52 |
53 | + (id) moveAnimation:(MBCMove *)move board:(MBCBoard *)board view:(NSView *)view
54 | {
55 | MBCMoveAnimation * a = [[MBCMoveAnimation alloc] init];
56 | a->fMove = [move retain];
57 | a->fPiece = move->fCommand == kCmdDrop
58 | ? move->fPiece : [board oldContents:move->fFromSquare];
59 |
60 | [a runWithTime:1.0 view:view];
61 |
62 | return a;
63 | }
64 |
65 | - (void) startState
66 | {
67 | [super startState];
68 |
69 | if (fMove->fCommand == kCmdDrop)
70 | fFrom = [fView squareToPosition:fMove->fPiece+kInHandSquare];
71 | else
72 | fFrom = [fView squareToPosition:fMove->fFromSquare];
73 | fDelta = [fView squareToPosition:fMove->fToSquare] - fFrom;
74 |
75 | [fView selectPiece:fPiece at:fMove->fFromSquare to:fMove->fToSquare];
76 | [fView moveSelectionTo:&fFrom];
77 | }
78 |
79 | - (void) step: (float)pctDone
80 | {
81 | MBCPosition pos = fFrom;
82 | pos[0] += pctDone*fDelta[0];
83 | pos[2] += pctDone*fDelta[2];
84 |
85 | [fView moveSelectionTo:&pos];
86 | }
87 |
88 | - (void) endState
89 | {
90 | [fView unselectPiece];
91 | [[NSNotificationQueue defaultQueue]
92 | enqueueNotification:
93 | [NSNotification
94 | notificationWithName:MBCEndMoveNotification
95 | object:[[[fView window] windowController] document] userInfo:(id)fMove]
96 | postingStyle: NSPostWhenIdle];
97 | [super endState];
98 | }
99 |
100 | - (void) dealloc
101 | {
102 | [fMove release];
103 | [super dealloc];
104 | }
105 |
106 | @end
107 |
108 | // Local Variables:
109 | // mode:ObjC
110 | // End:
111 |
--------------------------------------------------------------------------------
/Sources/MBCMoveTableView.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCMoveTableView.h
3 | Contains: Table view that selectively draws column separators
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 |
48 | @interface MBCMoveTableView : NSTableView {
49 | bool fInGridDrawing;
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/Sources/MBCMoveTableView.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCMoveTableView.mm
3 | Contains: Table view that selectively draws column separators
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCMoveTableView.h"
47 |
48 | @implementation MBCMoveTableView
49 |
50 | - (void)drawGridInClipRect:(NSRect)clipRect
51 | {
52 | fInGridDrawing = true;
53 | [super drawGridInClipRect:clipRect];
54 | fInGridDrawing = false;
55 | }
56 |
57 | - (NSIndexSet *)columnIndexesInRect:(NSRect)rect
58 | {
59 | //
60 | // We only want to draw certain columns
61 | //
62 | NSIndexSet * origColumns = [super columnIndexesInRect:rect];
63 | if (fInGridDrawing) {
64 | NSMutableIndexSet * filtered = [origColumns mutableCopy];
65 | if ([[[[self tableColumns] objectAtIndex:0] identifier] isEqual:@"Move"]) {
66 | //
67 | // Left to right languages, move # is first
68 | //
69 | [filtered removeIndex:2];
70 | [filtered removeIndex:3];
71 | [filtered removeIndex:5];
72 | [filtered removeIndex:6];
73 | } else {
74 | //
75 | // Right to left languages, move # is last
76 | //
77 | [filtered removeIndex:1];
78 | [filtered removeIndex:2];
79 | [filtered removeIndex:4];
80 | [filtered removeIndex:5];
81 | }
82 | return [filtered autorelease];
83 | } else {
84 | return origColumns;
85 | }
86 | }
87 |
88 | @end
89 |
--------------------------------------------------------------------------------
/Sources/MBCMoveTableViewAccessibility.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCBoardViewDraw.h
3 | Contains: Accessibility navigation for chess board
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCGameInfo.h"
47 |
48 | @interface MBCMoveAccessibilityProxy : NSObject
49 | {
50 | @public
51 | MBCGameInfo * fInfo;
52 | int fMove;
53 | }
54 |
55 | + (id) proxyWithInfo:(MBCGameInfo *)info move:(int)move;
56 | - (id) initWithInfo:(MBCGameInfo *)info move:(int)move;
57 |
58 | @end
59 |
60 | // Local Variables:
61 | // mode:ObjC
62 | // End:
63 |
--------------------------------------------------------------------------------
/Sources/MBCPlayer.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCPlayer.mm
3 | Contains: Infrastructure for agents participating in game
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | /*
47 | */
48 |
49 | #import "MBCPlayer.h"
50 |
51 | NSString * const MBCGameLoadNotification = @"MBCGameLoad";
52 | NSString * const MBCGameStartNotification = @"MBCGameStart";
53 | NSString * const MBCWhiteMoveNotification = @"MBCWhMove";
54 | NSString * const MBCBlackMoveNotification = @"MBCBlMove";
55 | NSString * const MBCUncheckedWhiteMoveNotification = @"MBCUWMove";
56 | NSString * const MBCUncheckedBlackMoveNotification = @"MBCUBMove";
57 | NSString * const MBCIllegalMoveNotification = @"MBCIlMove";
58 | NSString * const MBCEndMoveNotification = @"MBCEnMove";
59 | NSString * const MBCTakebackNotification = @"MBCTakeback";
60 | NSString * const MBCGameEndNotification = @"MBCGameEnd";
61 |
62 | NSString * const kMBCHumanPlayer = @"human";
63 | NSString * const kMBCEnginePlayer = @"program";
64 |
65 | @implementation MBCPlayer
66 |
67 | @synthesize document = fDocument;
68 |
69 | - (void) startGame:(MBCVariant)variant playing:(MBCSide)sideToPlay
70 | {
71 | }
72 |
73 | @end
74 |
75 | // Local Variables:
76 | // mode:ObjC
77 | // End:
78 |
--------------------------------------------------------------------------------
/Sources/MBCRemotePlayer.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCRemotePlayer.h
3 | Contains: Proxy for GameKit remote player participating in game
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 |
48 | #import "MBCPlayer.h"
49 |
50 | @interface MBCRemotePlayer : MBCPlayer {
51 | BOOL fHasObservers;
52 | }
53 |
54 | - (void) startGame:(MBCVariant)variant playing:(MBCSide)sideToPlay;
55 |
56 | @end
57 |
58 | // Local Variables:
59 | // mode:ObjC
60 | // End:
61 |
--------------------------------------------------------------------------------
/Sources/MBCStretchyTextCell.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCStretchyTextCell.h
3 | Contains: Text cell that can draw outside its boundary
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 |
48 | @interface MBCStretchyTextCell : NSTextFieldCell {
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Sources/MBCStretchyTextCell.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCStretchyTextCell.mm
3 | Contains: Text cell that can draw outside its boundary
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import "MBCStretchyTextCell.h"
47 |
48 |
49 | @implementation MBCStretchyTextCell
50 |
51 | - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
52 | {
53 | if ([[self stringValue] length] > 2) {
54 | cellFrame.origin.x -= 50;
55 | cellFrame.size.width += 100;
56 | } else {
57 | cellFrame.origin.x -= 3;
58 | cellFrame.size.width += 6;
59 | }
60 | [super drawInteriorWithFrame:cellFrame inView:controlView];
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/Sources/MBCTuner.h:
--------------------------------------------------------------------------------
1 | /*
2 | File: MBCTuner.h
3 | Contains: Manage a window to set graphics options
4 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 | #import "MBCBoardViewInterface.h"
48 |
49 | @class MBCDrawStyle;
50 |
51 | @interface MBCTunerStyle : NSObject {
52 | IBOutlet id fDiffuse;
53 | IBOutlet id fSpecular;
54 | IBOutlet id fShininess;
55 | IBOutlet id fAlpha;
56 | };
57 |
58 | - (void) updateFrom:(MBCDrawStyle *)drawStyle;
59 | - (void) updateTo:(MBCDrawStyle *)drawStyle;
60 |
61 | @end
62 |
63 | @interface MBCTuner : NSWindowController
64 | {
65 | NSView * fView;
66 | IBOutlet MBCTunerStyle * fWhitePieceStyle;
67 | IBOutlet MBCTunerStyle * fBlackPieceStyle;
68 | IBOutlet MBCTunerStyle * fWhiteBoardStyle;
69 | IBOutlet MBCTunerStyle * fBlackBoardStyle;
70 | IBOutlet MBCTunerStyle * fBorderStyle;
71 | IBOutlet id fBoardReflectivity;
72 | IBOutlet id fLabelIntensity;
73 | IBOutlet id fLightPosX;
74 | IBOutlet id fLightPosY;
75 | IBOutlet id fLightPosZ;
76 | IBOutlet id fAmbient;
77 | IBOutlet id fLightParams;
78 | }
79 |
80 | + (void) makeTuner;
81 | + (void) loadStyles;
82 |
83 | - (IBAction) updateWhitePieceStyle:(id)sender;
84 | - (IBAction) updateBlackPieceStyle:(id)sender;
85 | - (IBAction) updateWhiteBoardStyle:(id)sender;
86 | - (IBAction) updateBlackBoardStyle:(id)sender;
87 | - (IBAction) updateBoardStyle:(id)sender;
88 | - (IBAction) savePieceStyles:(id)sender;
89 | - (IBAction) saveBoardStyles:(id)sender;
90 | - (IBAction) updateLight:(id)sender;
91 |
92 | @end
93 |
94 | // Local Variables:
95 | // mode:ObjC
96 | // End:
97 |
--------------------------------------------------------------------------------
/Sources/main.mm:
--------------------------------------------------------------------------------
1 | /*
2 | File: main.m
3 | Contains: Chess main program
4 | Copyright: © 2002-2024 by Apple Computer, Inc., all rights reserved.
5 |
6 | IMPORTANT: This Apple software is supplied to you by Apple Computer,
7 | Inc. ("Apple") in consideration of your agreement to the following
8 | terms, and your use, installation, modification or redistribution of
9 | this Apple software constitutes acceptance of these terms. If you do
10 | not agree with these terms, please do not use, install, modify or
11 | redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms,
14 | and subject to these terms, Apple grants you a personal, non-exclusive
15 | license, under Apple's copyrights in this original Apple software (the
16 | "Apple Software"), to use, reproduce, modify and redistribute the
17 | Apple Software, with or without modifications, in source and/or binary
18 | forms; provided that if you redistribute the Apple Software in its
19 | entirety and without modifications, you must retain this notice and
20 | the following text and disclaimers in all such redistributions of the
21 | Apple Software. Neither the name, trademarks, service marks or logos
22 | of Apple Computer, Inc. may be used to endorse or promote products
23 | derived from the Apple Software without specific prior written
24 | permission from Apple. Except as expressly stated in this notice, no
25 | other rights or licenses, express or implied, are granted by Apple
26 | herein, including but not limited to any patent rights that may be
27 | infringed by your derivative works or by other works in which the
28 | Apple Software may be incorporated.
29 |
30 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE
31 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
32 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND
33 | FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
34 | USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
35 |
36 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT,
37 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39 | PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
40 | REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE,
41 | HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
42 | NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 | */
45 |
46 | #import
47 | #include
48 | #include
49 | #include
50 | #include
51 | #include "MBCDebug.h"
52 |
53 | int main(int argc, const char *argv[])
54 | {
55 | while (argv[1])
56 | putenv((char *)*++argv);
57 | MBCDebug::Update();
58 | if (MBCDebug::LogStart())
59 | NSLog(@"Chess starting\n");
60 | //
61 | // We set defaults that influence NSApplication init, so we need to run now
62 | //
63 | NSAutoreleasePool * autoreleasePool = [[NSAutoreleasePool alloc] init];
64 | NSDictionary * defaults =
65 | [NSDictionary dictionaryWithContentsOfFile:
66 | [[NSBundle mainBundle]
67 | pathForResource:@"Defaults" ofType:@"plist"]];
68 | [[NSUserDefaults standardUserDefaults] registerDefaults: defaults];
69 | [[NSUserDefaults standardUserDefaults] synchronize];
70 | [autoreleasePool drain];
71 | return NSApplicationMain(argc, argv);
72 | }
73 |
--------------------------------------------------------------------------------
/Styles/Fur/BlackPiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Fur/BlackPiece.png
--------------------------------------------------------------------------------
/Styles/Fur/BlackPiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Fur/BlackPiece@2x.png
--------------------------------------------------------------------------------
/Styles/Fur/Piece.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.6798245906829834
9 | BlackShininess
10 | 74.666664123535156
11 | BlackSpecular
12 | 0.36403509974479675
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 1
19 | WhiteAlpha
20 | 1
21 | WhiteDiffuse
22 | 0.53947371244430542
23 | WhiteShininess
24 | 60.070175170898438
25 | WhiteSpecular
26 | 0.20614035427570343
27 | WhiteRoughness
28 | 0.2
29 | WhiteMetallic
30 | 0
31 | WhiteAmbientOcclusion
32 | 1
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Styles/Fur/WhitePiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Fur/WhitePiece.png
--------------------------------------------------------------------------------
/Styles/Fur/WhitePiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Fur/WhitePiece@2x.png
--------------------------------------------------------------------------------
/Styles/Grass/BlackBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Grass/BlackBoard.png
--------------------------------------------------------------------------------
/Styles/Grass/BlackBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Grass/BlackBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Grass/Board.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.61842107772827148
9 | BlackShininess
10 | 24.140350341796875
11 | BlackSpecular
12 | 0.065789476037025452
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 1
19 | BorderAlpha
20 | 1
21 | BorderDiffuse
22 | 0.58333331346511841
23 | BorderShininess
24 | 60.070175170898438
25 | BorderSpecular
26 | 0.18859648704528809
27 | LabelIntensity
28 | 0.65350878238677979
29 | Reflectivity
30 | 0.0
31 | WhiteAlpha
32 | 1
33 | WhiteDiffuse
34 | 0.6798245906829834
35 | WhiteShininess
36 | 27.508771896362305
37 | WhiteSpecular
38 | 0.36403509974479675
39 | WhiteRoughness
40 | 0.2
41 | WhiteMetallic
42 | 0
43 | WhiteAmbientOcclusion
44 | 1
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Styles/Grass/Border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Grass/Border.png
--------------------------------------------------------------------------------
/Styles/Grass/Border@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Grass/Border@2x.png
--------------------------------------------------------------------------------
/Styles/Grass/WhiteBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Grass/WhiteBoard.png
--------------------------------------------------------------------------------
/Styles/Grass/WhiteBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Grass/WhiteBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Marble/BlackBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/BlackBoard.png
--------------------------------------------------------------------------------
/Styles/Marble/BlackBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/BlackBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Marble/BlackPiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/BlackPiece.png
--------------------------------------------------------------------------------
/Styles/Marble/BlackPiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/BlackPiece@2x.png
--------------------------------------------------------------------------------
/Styles/Marble/Board.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.2850877046585083
9 | BlackShininess
10 | 25.26315879821777
11 | BlackSpecular
12 | 0.2149122804403305
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 0.75
19 | BorderAlpha
20 | 1
21 | BorderDiffuse
22 | 0.7324561476707458
23 | BorderShininess
24 | 0
25 | BorderSpecular
26 | 0
27 | LabelIntensity
28 | 0.6184210777282715
29 | Reflectivity
30 | 0.6271929740905762
31 | WhiteAlpha
32 | 1
33 | WhiteDiffuse
34 | 1
35 | WhiteShininess
36 | 78.03508758544922
37 | WhiteSpecular
38 | 0.7675438523292542
39 | WhiteRoughness
40 | 0.2
41 | WhiteMetallic
42 | 0
43 | WhiteAmbientOcclusion
44 | 0.75
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Styles/Marble/Border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/Border.png
--------------------------------------------------------------------------------
/Styles/Marble/Border@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/Border@2x.png
--------------------------------------------------------------------------------
/Styles/Marble/Piece.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.66228067874908447
9 | BlackShininess
10 | 3.9298245906829834
11 | BlackSpecular
12 | 0.52192980051040649
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 1
19 | WhiteAlpha
20 | 1
21 | WhiteDiffuse
22 | 1
23 | WhiteShininess
24 | 1.6842105388641357
25 | WhiteSpecular
26 | 0.30263158679008484
27 | WhiteRoughness
28 | 0.2
29 | WhiteMetallic
30 | 0
31 | WhiteAmbientOcclusion
32 | 1
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Styles/Marble/WhiteBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/WhiteBoard.png
--------------------------------------------------------------------------------
/Styles/Marble/WhiteBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/WhiteBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Marble/WhitePiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/WhitePiece.png
--------------------------------------------------------------------------------
/Styles/Marble/WhitePiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Marble/WhitePiece@2x.png
--------------------------------------------------------------------------------
/Styles/Metal/BlackBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/BlackBoard.png
--------------------------------------------------------------------------------
/Styles/Metal/BlackBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/BlackBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Metal/BlackPiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/BlackPiece.png
--------------------------------------------------------------------------------
/Styles/Metal/BlackPiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/BlackPiece@2x.png
--------------------------------------------------------------------------------
/Styles/Metal/Board.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.51315790414810181
9 | BlackShininess
10 | 21.894737243652344
11 | BlackSpecular
12 | 0.25
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 1
19 | BorderAlpha
20 | 1
21 | BorderDiffuse
22 | 0.66228067874908447
23 | BorderShininess
24 | 81.403511047363281
25 | BorderSpecular
26 | 0.22368420660495758
27 | LabelIntensity
28 | 0.89035087823867798
29 | Reflectivity
30 | 0.69736844301223755
31 | WhiteAlpha
32 | 1
33 | WhiteDiffuse
34 | 0.61842107772827148
35 | WhiteShininess
36 | 40.982456207275391
37 | WhiteSpecular
38 | 0.44298246502876282
39 | WhiteRoughness
40 | 0.2
41 | WhiteMetallic
42 | 0
43 | WhiteAmbientOcclusion
44 | 1
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Styles/Metal/Border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/Border.png
--------------------------------------------------------------------------------
/Styles/Metal/Border@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/Border@2x.png
--------------------------------------------------------------------------------
/Styles/Metal/Piece.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.0
9 | BlackShininess
10 | 7.2982454299926758
11 | BlackSpecular
12 | 0.82894736528396606
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 1
19 | WhiteAlpha
20 | 1
21 | WhiteDiffuse
22 | 0.79385966062545776
23 | WhiteShininess
24 | 17.403509140014648
25 | WhiteSpecular
26 | 1
27 | WhiteRoughness
28 | 0.2
29 | WhiteMetallic
30 | 0
31 | WhiteAmbientOcclusion
32 | 1
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Styles/Metal/WhiteBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/WhiteBoard.png
--------------------------------------------------------------------------------
/Styles/Metal/WhiteBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/WhiteBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Metal/WhitePiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/WhitePiece.png
--------------------------------------------------------------------------------
/Styles/Metal/WhitePiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Metal/WhitePiece@2x.png
--------------------------------------------------------------------------------
/Styles/Wood/BlackBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/BlackBoard.png
--------------------------------------------------------------------------------
/Styles/Wood/BlackBoard@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/BlackBoard@2x.png
--------------------------------------------------------------------------------
/Styles/Wood/BlackPiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/BlackPiece.png
--------------------------------------------------------------------------------
/Styles/Wood/BlackPiece@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/BlackPiece@2x.png
--------------------------------------------------------------------------------
/Styles/Wood/Board.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.6184210777282715
9 | BlackShininess
10 | 5
11 | BlackSpecular
12 | 0.179824560880661
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 0.6
19 | BorderAlpha
20 | 1
21 | BorderDiffuse
22 | 0.6798245906829834
23 | BorderShininess
24 | 36.49122619628906
25 | BorderSpecular
26 | 0.2000000029802322
27 | LabelIntensity
28 | 0.8991228342056274
29 | Reflectivity
30 | 0.4868420958518982
31 | WhiteAlpha
32 | 1
33 | WhiteDiffuse
34 | 0.75
35 | WhiteShininess
36 | 5
37 | WhiteSpecular
38 | 0.2000000029802322
39 | WhiteRoughness
40 | 0.2
41 | WhiteMetallic
42 | 0
43 | WhiteAmbientOcclusion
44 | 0.6
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Styles/Wood/Border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/Border.png
--------------------------------------------------------------------------------
/Styles/Wood/Border@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/Border@2x.png
--------------------------------------------------------------------------------
/Styles/Wood/Piece.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BlackAlpha
6 | 1
7 | BlackDiffuse
8 | 0.66228067874908447
9 | BlackShininess
10 | 10.666666984558105
11 | BlackSpecular
12 | 0.43421053886413574
13 | BlackRoughness
14 | 0.2
15 | BlackMetallic
16 | 0
17 | BlackAmbientOcclusion
18 | 1
19 | WhiteAlpha
20 | 1
21 | WhiteDiffuse
22 | 0.75
23 | WhiteShininess
24 | 75.789474487304688
25 | WhiteSpecular
26 | 0.46052631735801697
27 | WhiteRoughness
28 | 0.2
29 | WhiteMetallic
30 | 0
31 | WhiteAmbientOcclusion
32 | 1
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Styles/Wood/WhiteBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/WhiteBoard.png
--------------------------------------------------------------------------------
/Styles/Wood/WhitePiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Styles/Wood/WhitePiece.png
--------------------------------------------------------------------------------
/Textures/Lettering.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Textures/Lettering.png
--------------------------------------------------------------------------------
/Textures/Lettering_Blur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Textures/Lettering_Blur.png
--------------------------------------------------------------------------------
/Textures/selected_piece_texture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Textures/selected_piece_texture.png
--------------------------------------------------------------------------------
/Textures/selected_piece_texture@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/Textures/selected_piece_texture@2x.png
--------------------------------------------------------------------------------
/contributors:
--------------------------------------------------------------------------------
1 | neeri:Matthias Neeracher x43683
2 |
--------------------------------------------------------------------------------
/en.lproj/ChessTuner-InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 | CFBundleName = "Chess";
4 | CFBundleDisplayName = "Chess";
5 | NSHumanReadableCopyright = "Copyright 2003–2024 Apple Inc.";
6 | game = "Chess Game";
7 | moves= "Moves (PGN)";
8 |
--------------------------------------------------------------------------------
/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/en.lproj/Localizable.strings
--------------------------------------------------------------------------------
/en.lproj/MBChess-InfoPlist.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apple-oss-distributions/Chess/b22bf92b55824e9fe31dc0932f36560dd7339f0f/en.lproj/MBChess-InfoPlist.strings
--------------------------------------------------------------------------------
/en.lproj/Spoken.strings:
--------------------------------------------------------------------------------
1 | /*
2 | File: Spoken.strings
3 | Contains: Localizable strings spoken by chess
4 | Version: 2.0
5 | Copyright: © 2003-2024 by Apple Inc., all rights reserved.
6 | */
7 |
8 | /* Written rather repetitively, because I'm not sure what gender agreements
9 | are going to be necessary in what languages.
10 |
11 | NOTE TO LOCALIZERS
12 |
13 | All of these strings are meant to be spoken, they will never be used visually, so
14 | don't worry about left-to-right codes etc.
15 |
16 | These translations are NOT triggered by the system locale, but by the language
17 | of the VOICE selected in Chess preferences. On an English system, if Yannick is
18 | selected as a Chess voice, Chess will speak German!
19 | */
20 |
21 | /* Piece names */
22 | "king" = "king";
23 | "queen" = "queen";
24 | "bishop" = "bishop";
25 | "knight" = "knight";
26 | "rook" = "rook";
27 | "pawn" = "pawn";
28 |
29 | /* Pawn Promotions ([[emph -]] is a speech synthesis directive to deemphasize a word)*/
30 | "queen_p" = "[[emph -]] promoting to queen";
31 | "bishop_p" = "[[emph -]] promoting to bishop";
32 | "knight_p" = "[[emph -]] promoting to knight";
33 | "rook_p" = "[[emph -]] promoting to rook";
34 |
35 | /* Piece drops for crazyhouse ("drop" means to take a piece an insert it somewhere on the board) */
36 | "queen_d" = "drop queen at";
37 | "bishop_d" = "drop bishop at";
38 | "knight_d" = "drop knight at";
39 | "rook_d" = "drop rook at";
40 | "pawn_d" = "drop pawn at";
41 |
42 | /* Move formats ([[emph +]] is a speech synthesis directive to emphasize a word)
43 | * move_fmt -> "knight b 1 to c 3"
44 | * cmove_fmt -> "knight c 3 takes e 5"
45 | * promo_fmt -> "pawn b 7 to b 8, promoting to queen"
46 | * cpromo_fmt -> "pawn b 7 takes a 8, promoting to knight"
47 | * drop_fmt -> "drop queen at f 7"
48 | * kcastle_fmt -> "castle king side"
49 | * qcastle_fmt -> "castle queen side"
50 | * has_check_fmt-> "e 2 to e 4, check!"
51 | * no_check_fmt -> "e 2 to e 4."
52 | */
53 | "move_fmt" = "%@ %@ %@ to %@ %@";
54 | "cmove_fmt" = "%@ %@ %@ takes %@ %@";
55 | "promo_fmt" = "%@ %@ %@ to %@ %@, %@";
56 | "cpromo_fmt" = "%@ %@ %@ takes %@ %@, %@";
57 | "drop_fmt" = "%@ %@ %@";
58 | "kcastle_fmt" = "castle [[emph +]]king side";
59 | "qcastle_fmt" = "castle [[emph +]]queen side";
60 | "has_check_fmt" = "%@, %@";
61 | "no_check_fmt" = "%@.";
62 |
63 | /* Outcomes */
64 | "white_win" = "white wins!";
65 | "black_win" = "black wins!";
66 | "draw" = "the game is a draw!";
67 | "check" = "check!";
68 | "check_mate" = "[[emph +]] check mate!";
69 |
70 | /* Accessibility description in move table */
71 | "move_table_nr" = "Move %d:";
72 | "move_table_desc" = "Game Moves";
73 |
74 | /* Suggestions
75 | * suggest_fmt -> I would suggest "pawn e 2 to e 4"
76 | * last_move_fmt -> The last move was "knight g 8 to f 6"
77 | */
78 | "suggest_fmt" = "I would suggest \"%@\"";
79 | "last_move_fmt" = "The last move was \"%@\"";
80 |
81 | /* Rank/File, used to form squares like d 5
82 | * This probably does not need to be localized for languages
83 | * using the latin alphabet.
84 | */
85 | "rank_1" = "1";
86 | "rank_2" = "2";
87 | "rank_3" = "3";
88 | "rank_4" = "4";
89 | "rank_5" = "5";
90 | "rank_6" = "6";
91 | "rank_7" = "7";
92 | "rank_8" = "8";
93 | "file_a" = "A";
94 | "file_b" = "B";
95 | "file_c" = "C";
96 | "file_d" = "D";
97 | "file_e" = "E";
98 | "file_f" = "F";
99 | "file_g" = "G";
100 | "file_h" = "H";
101 |
102 |
--------------------------------------------------------------------------------
/sjeng/AUTHORS:
--------------------------------------------------------------------------------
1 | Sjeng is written by Gian-Carlo Pascutto (gcp@sjeng.org),
2 | based on work done by Adrien Regimbald (adrien@gpu.srv.ualberta.ca)
3 |
--------------------------------------------------------------------------------
/sjeng/BUGS:
--------------------------------------------------------------------------------
1 | ------------------------------------------
2 | Please submit bug reports to gcp@sjeng.org
3 | ------------------------------------------
4 |
5 | KNOWN
6 | -----
7 |
8 | Trouble detecting variants and partner tells on chess.net. This is
9 | an XBoard/WinBoard Zippy problem, not related to Sjeng itself.
10 |
11 | The 'ping' command interrupts the search.
12 |
13 | 'white' and 'black' do not always work as intended.
14 |
15 | A condition which ends the game will stop the program when in analysis
16 | mode.
17 |
18 | Loses sometimes.
19 |
--------------------------------------------------------------------------------
/sjeng/INSTALL:
--------------------------------------------------------------------------------
1 | Basic Installation
2 | ==================
3 |
4 | These are generic installation instructions.
5 |
6 | The `configure' shell script attempts to guess correct values for
7 | various system-dependent variables used during compilation. It uses
8 | those values to create a `Makefile' in each directory of the package.
9 | It may also create one or more `.h' files containing system-dependent
10 | definitions. Finally, it creates a shell script `config.status' that
11 | you can run in the future to recreate the current configuration, a file
12 | `config.cache' that saves the results of its tests to speed up
13 | reconfiguring, and a file `config.log' containing compiler output
14 | (useful mainly for debugging `configure').
15 |
16 | If you need to do unusual things to compile the package, please try
17 | to figure out how `configure' could check whether to do them, and mail
18 | diffs or instructions to the address given in the `README' so they can
19 | be considered for the next release. If at some point `config.cache'
20 | contains results you don't want to keep, you may remove or edit it.
21 |
22 | The file `configure.in' is used to create `configure' by a program
23 | called `autoconf'. You only need `configure.in' if you want to change
24 | it or regenerate `configure' using a newer version of `autoconf'.
25 |
26 | The simplest way to compile this package is:
27 |
28 | 1. `cd' to the directory containing the package's source code and type
29 | `./configure' to configure the package for your system. If you're
30 | using `csh' on an old version of System V, you might need to type
31 | `sh ./configure' instead to prevent `csh' from trying to execute
32 | `configure' itself.
33 |
34 | Running `configure' takes awhile. While running, it prints some
35 | messages telling which features it is checking for.
36 |
37 | 2. Type `make' to compile the package.
38 |
39 | 3. Optionally, type `make check' to run any self-tests that come with
40 | the package.
41 |
42 | 4. Type `make install' to install the programs and any data files and
43 | documentation.
44 |
45 | 5. You can remove the program binaries and object files from the
46 | source code directory by typing `make clean'. To also remove the
47 | files that `configure' created (so you can compile the package for
48 | a different kind of computer), type `make distclean'. There is
49 | also a `make maintainer-clean' target, but that is intended mainly
50 | for the package's developers. If you use it, you may have to get
51 | all sorts of other programs in order to regenerate files that came
52 | with the distribution.
53 |
--------------------------------------------------------------------------------
/sjeng/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_PROGRAMS = sjeng
2 | sjeng_SOURCES = attacks.c crazy.c epd.c learn.c partner.c seval.c \
3 | ttable.c book.c ecache.c eval.c moves.c search.c \
4 | sjeng.c utils.c newbook.c proof.c neval.c rcfile.c\
5 | leval.c draw.c see.c segtb.c\
6 | protos.h extvars.h sjeng.h squares.h
7 | EXTRA_DIST = TODO NEWS ChangeLog COPYING BUGS THANKS blob2.c sjeng.rc
8 | SUBDIRS = . books tests
9 |
10 | #
11 | # Strip before installing
12 | #
13 | install-exec-local:
14 | strip sjeng
15 |
16 | #
17 | # Ignore whatever other target ProjectBuilder throws at us
18 | #
19 | .DEFAULT:
20 | @echo "Ignoring request for unknown target" $@
21 |
--------------------------------------------------------------------------------
/sjeng/THANKS:
--------------------------------------------------------------------------------
1 | The following people helped a lot during Sjeng
2 | development, either by testing, giving usefull
3 | suggestions or contributing code:
4 |
5 | Adrien Regimbald
6 | Daniel Clausen
7 | Dann Corbit
8 | Lenny Taelman
9 | David Dawson
10 | Ben Nye (aka angrim@FICS)
11 | Ronald De Man (aka Syzygy@FICS)
12 | Eugene Nalimov
--------------------------------------------------------------------------------
/sjeng/TODO:
--------------------------------------------------------------------------------
1 | TODO
2 |
3 | Nothing. This thing is getting messier, buggier,
4 | slower and less maintainable with each release.
5 |
6 | Time to move on.
7 |
--------------------------------------------------------------------------------
/sjeng/blob2.c:
--------------------------------------------------------------------------------
1 | /* Compile this file for a faster Sjeng */
2 |
3 | /* e.g. gcc -O9 -lgdbm -o sjeng blob2.c */
4 |
5 | #include "rcfile.c"
6 | #include "attacks.c"
7 | #include "book.c"
8 | #include "crazy.c"
9 | #include "epd.c"
10 | #include "learn.c"
11 | #include "newbook.c"
12 | #include "partner.c"
13 | #include "moves.c"
14 | #include "ttable.c"
15 | #include "ecache.c"
16 | #include "draw.c"
17 | #include "see.c"
18 | #include "search.c"
19 | #include "seval.c"
20 | #include "neval.c"
21 | #include "eval.c"
22 | #include "sjeng.c"
23 | #include "utils.c"
24 | #include "proof.c"
25 | #include "leval.c"
26 | #include "segtb.c"
27 |
28 |
--------------------------------------------------------------------------------
/sjeng/books/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_DIST = bug.opn suicide.opn losers.opn
2 | noinst_DATA = nbook.db zbook.db
3 |
4 | nbook.db: nbook.pgn
5 | ./build-book normal $<
6 |
7 | zbook.db: zhbook.pgn
8 | ./build-book crazyhouse $<
9 |
10 | #
11 | # Ignore whatever other target ProjectBuilder throws at us
12 | #
13 | .DEFAULT:
14 | @echo "Ignoring request for unknown target" $@
15 |
--------------------------------------------------------------------------------
/sjeng/books/bug.opn:
--------------------------------------------------------------------------------
1 | /* The various tags:
2 | ! best
3 | !? interesting
4 | = unusual but solid
5 | ?! murky - meant for surprise
6 | ? plain bad
7 | */
8 |
9 | /* Various bad first moves - don't play these! */
10 |
11 | a2a3? e7e5!
12 | a2a4? e7e5!
13 | b1a3? e7e5!
14 | b1c3? e7e6!
15 |
16 | /* Now, 1. b3 is an interesting and OK slow move that can be used for surprise. 1. b4 is an interesting wild move planning to put pressure on the long diagonal and hit a N on c6 with b4-b5 */
17 |
18 | b2b3!?
19 | b2b4?!
20 |
21 | /* 1. c3 is too committal to be used as surprise weapon, but 1. c4 is better than it looks. 1. d3 has the same problem as 1.c3: it is likely to transpose to some slow reversed system but without giving black any head aches with move orders. */
22 |
23 | c2c3? e7e5!
24 | c2c4?! e7e5!
25 | d2d3? e7e5!
26 |
27 | /* 1. d4 is a good, calm move which often leads to semi-blocked positions. I'm interested in seeing how well the program can be taught to handle those. */
28 |
29 | d2d4=
30 |
31 | /* 1. e3 can be used as a surprise weapon intending to make a reversed set up or something slow like Ng1-f3 and b2-b3. */
32 |
33 | e2e3?! e7e5!
34 |
35 | /* 1. e4! Best by test! */
36 |
37 | /* Queen's fianchetto */
38 |
39 | e2e4 b7b6?! d2d4!
40 |
41 | /* Queen's knight - most likely to transpose */
42 |
43 | e2e4 b8c6=
44 |
45 | /* C-line crap lines */
46 |
47 | e2e4 c7c5? b1c3!
48 | e2e4 c7c6? d2d4! d7d5 e4d5 c6d5 c1f4
49 |
50 | /* The leaf - God I hate this shitty line. */
51 |
52 | e2e4 d7d5?
53 |
54 | /* 1... d6 - transposing to the Wall most likely, but also some independant lines. */
55 |
56 | e2e4 d7d6=
57 |
58 | /* I would expect the program to handle the tactics in the Kamikaze pretty well. */
59 |
60 | e2e4 e7e5!?
61 |
62 | /* On with the main bulk of opening theory. */
63 |
64 | e2e4 e7e6!
65 |
66 | /* The Dog will suit the computer well. */
67 |
68 | e2e4 g8f6!
69 |
70 | /* 1. f3 is simply bad but 1.f4 is a whole lot better than it looks - an interesting surprise weapon maybe. */
71 |
72 | f2f3? e7e5!
73 | f2f4?! g8f6!
74 |
75 | /* 1. Nf3 is a good second string first move along with 1. d4. */
76 |
77 | g1f3=
78 |
79 | /* The rest is just crap. */
80 |
81 | g1h3? e7e5!
82 | g2g3? e7e5!
83 | g2g4? e7e5!
84 | h2h3? e7e5!
85 | h2h4? e7e5! h4h5 d7d5 P@g6 h7g6 h5g6 h8h1 g6f7 e8f7
86 |
--------------------------------------------------------------------------------
/sjeng/books/build-book:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # Build a sjeng opening book
4 | #
5 |
6 | set -e
7 | set -x
8 |
9 | if test -z "$RC_EMBEDDEDPROJECT_DIR" || test ! -e "${RC_EMBEDDEDPROJECT_DIR}/Chess_host"; then
10 | SJENG="${BUILT_PRODUCTS_DIR}"/sjeng.ChessEngine
11 | else
12 | SJENG="${RC_EMBEDDEDPROJECT_DIR}/Chess_host/usr/local/bin/sjeng_host"
13 | fi
14 |
15 | cat < header file. */
11 | #define HAVE_INTTYPES_H 1
12 |
13 | /* Define to 1 if you have the `gdbm' library (-lgdbm). */
14 | /* #undef HAVE_LIBGDBM */
15 |
16 | /* Define to 1 if you have the `m' library (-lm). */
17 | #define HAVE_LIBM 1
18 |
19 | /* Define to 1 if you have the header file. */
20 | #define HAVE_MEMORY_H 1
21 |
22 | /* Define to 1 if you have the `select' function. */
23 | #define HAVE_SELECT 1
24 |
25 | /* Define to 1 if you have the header file. */
26 | #define HAVE_STDINT_H 1
27 |
28 | /* Define to 1 if you have the header file. */
29 | #define HAVE_STDLIB_H 1
30 |
31 | /* Define to 1 if you have the header file. */
32 | #define HAVE_STRINGS_H 1
33 |
34 | /* Define to 1 if you have the header file. */
35 | #define HAVE_STRING_H 1
36 |
37 | /* Define to 1 if you have the `strstr' function. */
38 | #define HAVE_STRSTR 1
39 |
40 | /* Define to 1 if you have the header file. */
41 | #define HAVE_SYS_STAT_H 1
42 |
43 | /* Define to 1 if you have the header file. */
44 | #define HAVE_SYS_TIMEB_H 1
45 |
46 | /* Define to 1 if you have the header file. */
47 | #define HAVE_SYS_TIME_H 1
48 |
49 | /* Define to 1 if you have the header file. */
50 | #define HAVE_SYS_TYPES_H 1
51 |
52 | /* Define to 1 if you have the header file. */
53 | #define HAVE_UNISTD_H 1
54 |
55 | /* Name of package */
56 | #define PACKAGE "Sjeng-Free"
57 |
58 | /* Define to the address where bug reports for this package should be sent. */
59 | #define PACKAGE_BUGREPORT ""
60 |
61 | /* Define to the full name of this package. */
62 | #define PACKAGE_NAME ""
63 |
64 | /* Define to the full name and version of this package. */
65 | #define PACKAGE_STRING ""
66 |
67 | /* Define to the one symbol short name of this package. */
68 | #define PACKAGE_TARNAME ""
69 |
70 | /* Define to the version of this package. */
71 | #define PACKAGE_VERSION ""
72 |
73 | /* Define as the return type of signal handlers (`int' or `void'). */
74 | #define RETSIGTYPE void
75 |
76 | /* Define to 1 if you have the ANSI C header files. */
77 | #define STDC_HEADERS 1
78 |
79 | /* Define to 1 if you can safely include both and . */
80 | #define TIME_WITH_SYS_TIME 1
81 |
82 | /* Version number of package */
83 | #define VERSION "11.2"
84 |
85 | /* Define to empty if `const' does not conform to ANSI C. */
86 | /* #undef const */
87 |
--------------------------------------------------------------------------------
/sjeng/configure.in:
--------------------------------------------------------------------------------
1 | dnl Process this file with autoconf to produce a configure script.
2 | AC_INIT(sjeng.c)
3 |
4 | AM_INIT_AUTOMAKE(Sjeng-Free, 11.2)
5 | AM_CONFIG_HEADER(config.h)
6 |
7 | dnl Checks for programs.
8 | AC_PROG_CC
9 | AC_PROG_CXX
10 |
11 | dnl Checks for libraries.
12 | AC_CHECK_LIB(gdbm, gdbm_open)
13 |
14 | dnl Check for floor() in the math library
15 | AC_CHECK_LIB(m, floor)
16 |
17 | dnl Checks for header files.
18 | AC_HEADER_STDC
19 | AC_CHECK_HEADERS(sys/time.h sys/timeb.h unistd.h)
20 |
21 | dnl Checks for typedefs, structures, and compiler characteristics.
22 | AC_C_CONST
23 | AC_HEADER_TIME
24 |
25 | dnl Checks for library functions.
26 | AC_TYPE_SIGNAL
27 | AC_CHECK_FUNCS(ftime select strstr gettimeofday)
28 |
29 | AC_OUTPUT(Makefile tests/Makefile books/Makefile)
30 |
--------------------------------------------------------------------------------
/sjeng/draw.c:
--------------------------------------------------------------------------------
1 | /*
2 | Sjeng - a chess variants playing program
3 | Copyright (C) 2000-2001 Gian-Carlo Pascutto
4 | Originally based on Faile, Copyright (c) 2000 Adrien M. Regimbald
5 |
6 | This program is free software; you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation; either version 2 of the License, or
9 | (at your option) any later version.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program; if not, write to the Free Software
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 |
20 | File: draw.c
21 | Purpose: Detect draws
22 |
23 | */
24 |
25 | #include "config.h"
26 | #include "sjeng.h"
27 | #include "extvars.h"
28 | #include "protos.h"
29 |
30 | bool is_draw (void)
31 | {
32 | /* GCP: this is straigth from Faile but converted to Sjeng internals */
33 |
34 | /* is_draw () is used to see if a position is a draw. Some notes:
35 | * - the 2 repetition trick is attempted first: if we have already seen a
36 | * position in the search history (not game history), we haven't found
37 | * anything better to do than repeat, and searching the position again would
38 | * be a waste of time
39 | * - if there is no match on the 2 repetition check, we look for an actual
40 | * 3 fold repetition
41 | * - we can't check for the 50 move rule here, since the 50 move rule must be
42 | * checked at the end of a search node due to mates on the 50th move, yet
43 | * we want to check for a draw by repetition before we waste any time
44 | * searching the position or generating moves
45 | * - is_draw () can be used in both search () and search_root () as the
46 | * for loop for the 2 repetition trick will exit immediately at the root */
47 |
48 | int i, repeats = 0, end, start;
49 |
50 | /* Check on the 2 repetition trick. Some notes:
51 | * - a position can't possibly have occurred once before if fifty isn't
52 | * at least 4
53 | * - the end point is picked to look at the least number of positions, ie
54 | * if going to the last capture is shorter than looking at the whole search
55 | * history, we will do only that much */
56 | if (fifty >= 4)
57 | {
58 | if ((move_number) < (move_number + ply - 1 - fifty))
59 | {
60 | end = move_number + ply - 1 - fifty;
61 | }
62 | else
63 | {
64 | end = move_number;
65 | }
66 | for (i = (move_number + ply - 3); i >= 0 && i >= end; i -= 2)
67 | {
68 | if (hash == hash_history[i])
69 | {
70 | return TRUE;
71 | }
72 | }
73 | }
74 |
75 | /* Check for actual 3 repetition match. Some notes:
76 | * - a position can't possibly have occurred twice before if fifty isn't
77 | * at least 6
78 | * - there is no need for us to consider positions encountered during search,
79 | * as if there was a match on any of them, it would have been found above
80 | * - we need to adjust the starting point here based on who's turn it is:
81 | * if it's the same as at the root, we need to subtract one extra */
82 | if (fifty >= 6)
83 | {
84 | start = move_number - 1 - (ply % 2);
85 | end = move_number + ply - 1 - fifty;
86 |
87 | for (i = start; i >= 0 && i >= end; i -= 2)
88 | {
89 | if (hash == hash_history[i])
90 | {
91 | repeats++;
92 | }
93 | if (repeats >= 2)
94 | {
95 | return TRUE;
96 | }
97 | }
98 | }
99 |
100 | return FALSE;
101 |
102 | };
103 |
--------------------------------------------------------------------------------
/sjeng/ecache.c:
--------------------------------------------------------------------------------
1 | /*
2 | Sjeng - a chess variants playing program
3 | Copyright (C) 2000 Gian-Carlo Pascutto
4 |
5 | This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 |
19 | File: ecache.c
20 | Purpose: handling of the evaluation cache
21 |
22 | */
23 |
24 | #include "sjeng.h"
25 | #include "protos.h"
26 | #include "extvars.h"
27 |
28 | typedef struct
29 | {
30 | uint32_t stored_hash;
31 | uint32_t hold_hash;
32 | int32_t score;
33 | } ECacheType;
34 |
35 | /*ECacheType ECache[ECACHESIZE];*/
36 | ECacheType *ECache;
37 |
38 | uint32_t ECacheProbes;
39 | uint32_t ECacheHits;
40 |
41 | void storeECache(int32_t score)
42 | {
43 | int index;
44 |
45 | index = hash % ECacheSize;
46 |
47 | ECache[index].stored_hash = hash;
48 | ECache[index].hold_hash = hold_hash;
49 | ECache[index].score = score;
50 | }
51 |
52 | void checkECache(int32_t *score, int *in_cache)
53 | {
54 | int index;
55 |
56 | ECacheProbes++;
57 |
58 | index = hash % ECacheSize;
59 |
60 | if(ECache[index].stored_hash == hash &&
61 | ECache[index].hold_hash == hold_hash)
62 |
63 | {
64 | ECacheHits++;
65 |
66 | *in_cache = 1;
67 | *score = ECache[index].score;
68 | }
69 | }
70 |
71 | void reset_ecache(void)
72 | {
73 | memset(ECache, 0, sizeof(ECacheType)*ECacheSize);
74 | return;
75 | }
76 |
77 | void alloc_ecache(void)
78 | {
79 | ECache = (ECacheType*)malloc(sizeof(ECacheType)*ECacheSize);
80 |
81 | if (ECache == NULL)
82 | {
83 | printf("Out of memory allocating ECache.\n");
84 | exit(EXIT_FAILURE);
85 | }
86 |
87 | printf("Allocated %u eval cache entries, totalling %u bytes.\n",
88 | (uint32_t)ECacheSize, (uint32_t)(sizeof(ECacheType)*ECacheSize));
89 | return;
90 | }
91 |
92 | void free_ecache(void)
93 | {
94 | free(ECache);
95 | return;
96 | }
97 |
--------------------------------------------------------------------------------
/sjeng/learn.c:
--------------------------------------------------------------------------------
1 | /*
2 | Sjeng - a chess variants playing program
3 | Copyright (C) 2000 Gian-Carlo Pascutto
4 |
5 | This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 |
19 | File: learn.c
20 | Purpose: remembering of positions
21 |
22 | */
23 |
24 | #include "sjeng.h"
25 | #include "protos.h"
26 | #include "extvars.h"
27 | #include
28 |
29 | typedef struct
30 | {
31 | signed Depth:7;
32 | unsigned OnMove:1;
33 | unsigned char Bestmove;
34 | uint32_t Hash;
35 | uint32_t Hold_hash;
36 | int32_t Bound;
37 | }
38 | LearnType;
39 |
40 | void Learn(int score, int best, int depth)
41 | {
42 | int number = 0, next = 0;
43 | LearnType draft;
44 | FILE **lrnfile;
45 |
46 | printf("Learning score: %d best: %d depth:%d hash: %X\n", score, best, depth, hash);
47 |
48 | if (Variant == Normal)
49 | {
50 | lrnfile = &lrn_standard;
51 | }
52 | else if ((Variant == Crazyhouse) || (Variant == Bughouse))
53 | {
54 | lrnfile = &lrn_zh;
55 | }
56 | else if (Variant == Suicide)
57 | {
58 | lrnfile = &lrn_suicide;
59 | }
60 | else if (Variant == Losers)
61 | {
62 | lrnfile = &lrn_losers;
63 | }
64 | else
65 | return;
66 |
67 | fseek(*lrnfile, 0, SEEK_SET);
68 | fread(&number, sizeof(int), 1, *lrnfile);
69 | fread(&next, sizeof(int), 1, *lrnfile);
70 |
71 | if (number < 50000) number++;
72 |
73 | fseek(*lrnfile, 0, SEEK_SET);
74 | fwrite(&number, sizeof(int), 1, *lrnfile);
75 |
76 | next++;
77 | if (next == 50000) next = 1;
78 |
79 | fwrite(&next, sizeof(int), 1, *lrnfile);
80 |
81 | fseek(*lrnfile, (2*sizeof(int)) + ((next-1)*sizeof(LearnType)), SEEK_SET);
82 |
83 | draft.Depth = depth;
84 | draft.OnMove = ToMove;
85 | draft.Hash = hash;
86 | draft.Hold_hash = hold_hash;
87 | draft.Bound = score;
88 | draft.Bestmove = best;
89 |
90 | fwrite(&draft, sizeof(draft), 1, *lrnfile);
91 |
92 | fflush(*lrnfile);
93 | }
94 |
95 | void LoadLearn(void)
96 | {
97 | int number = 0, posloop;
98 | LearnType draft;
99 | FILE **lrnfile;
100 |
101 | if (((Variant == Crazyhouse) || (Variant == Bughouse)) && (!lrn_zh))
102 | return;
103 | else if ((Variant == Normal) && !lrn_standard)
104 | return;
105 | else if (Variant == Suicide && !lrn_suicide)
106 | return;
107 | else if (Variant == Losers && !lrn_losers)
108 | return;
109 |
110 | if (Variant == Normal)
111 | {
112 | lrnfile = &lrn_standard;
113 | }
114 | else if ((Variant == Crazyhouse) || (Variant == Bughouse))
115 | {
116 | lrnfile = &lrn_zh;
117 | }
118 | else if (Variant == Suicide)
119 | {
120 | lrnfile = &lrn_suicide;
121 | }
122 | else if (Variant == Losers)
123 | {
124 | lrnfile = &lrn_losers;
125 | }
126 |
127 | fseek(*lrnfile, 0, SEEK_SET);
128 | fread(&number, sizeof(int), 1, *lrnfile);
129 | fseek(*lrnfile, 2*sizeof(int), SEEK_SET);
130 |
131 | for (posloop = 0; posloop < number; posloop++)
132 | {
133 | fread(&draft, sizeof(LearnType), 1, *lrnfile);
134 | LearnStoreTT(draft.Bound, draft.Hash, draft.Hold_hash,
135 | draft.OnMove, draft.Bestmove, draft.Depth);
136 | }
137 |
138 | return;
139 | }
140 |
--------------------------------------------------------------------------------
/sjeng/mkinstalldirs:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # mkinstalldirs --- make directory hierarchy
3 | # Author: Noah Friedman
4 | # Created: 1993-05-16
5 | # Last modified: 1994-03-25
6 | # Public domain
7 |
8 | errstatus=0
9 |
10 | for file in ${1+"$@"} ; do
11 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
12 | shift
13 |
14 | pathcomp=
15 | for d in ${1+"$@"} ; do
16 | pathcomp="$pathcomp$d"
17 | case "$pathcomp" in
18 | -* ) pathcomp=./$pathcomp ;;
19 | esac
20 |
21 | if test ! -d "$pathcomp"; then
22 | echo "mkdir $pathcomp" 1>&2
23 | mkdir "$pathcomp" || errstatus=$?
24 | fi
25 |
26 | pathcomp="$pathcomp/"
27 | done
28 | done
29 |
30 | exit $errstatus
31 |
32 | # mkinstalldirs ends here
33 |
--------------------------------------------------------------------------------
/sjeng/sjeng.ChessEngine.order:
--------------------------------------------------------------------------------
1 | start
2 | _main
3 | _read_rcfile
4 | _initialize_eval
5 | _alloc_hash
6 | _alloc_ecache
7 | _initialize_zobrist
8 | _randomMT
9 | _reloadMT
10 | _init_book
11 | _learn_open
12 | _init_game
13 | _reset_piece_square
14 | _clear_tt
15 | _init_segtb
16 | _load_2piece
17 | _display_board
18 | _rinput
19 | _is_move
20 | _reset_ecache
21 | _CheckBadFlow
22 | _verify_coord
23 | _gen
24 | _push_slidE
25 | _push_knighT
26 | _push_king
27 | _push_pawn
28 | _add_capture
29 | _comp_to_coord
30 | _make
31 | _check_legal
32 | _is_attacked
33 | _unmake
34 | _think
35 | _interrupt
36 | _rtime
37 | _in_check
38 | _choose_book_move
39 | _choose_binary_book_move
40 | _is_draw
41 | _comp_to_san
42 | _eval
43 | _std_eval
44 | _opn_eval
45 | _LoadLearn
46 | _LearnStoreTT
47 | _clear_dp_tt
48 | _search_root
49 | _order_moves
50 | _f_in_check
51 | _search
52 | _qsearch
53 | _QProbeTT
54 | _see
55 | _setup_attackers
56 | _QStoreTT
57 | _stringize_pv
58 | _hash_extract_pv
59 | _ProbeTT
60 | _StoreTT
61 | _post_thinking
62 | _post_fail_thinking
63 | _free_hash
64 |
--------------------------------------------------------------------------------
/sjeng/sjeng.h:
--------------------------------------------------------------------------------
1 | /*
2 | Sjeng - a chess variants playing program
3 | Copyright (C) 2000 Gian-Carlo Pascutto
4 |
5 | This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 |
19 | File: sjeng.h
20 | Purpose: global definitions
21 |
22 | */
23 |
24 | #ifndef SJENG_H
25 | #define SJENG_H
26 |
27 | #include "config.h"
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 |
35 | #ifdef HAVE_SYS_TIMEB_H
36 | #include
37 | #endif
38 |
39 | #define NDEBUG
40 | #include
41 |
42 | #define DIE (*(int *)(NULL) = 0)
43 |
44 | /* GCP : my code uses WHITE=0 and BLACK=1 so reverse this */
45 |
46 | #define WHITE 0
47 | #define BLACK 1
48 |
49 | #define ToMove (white_to_move ? 0 : 1)
50 | #define NotToMove (white_to_move ? 1 : 0)
51 |
52 | #define Hash(x,y) (hash ^= zobrist[(x)][(y)])
53 |
54 | #define Crazyhouse 0
55 | #define Bughouse 1
56 | #define Normal 2
57 | #define Suicide 3
58 | #define Losers 4
59 |
60 | #define Opening 0
61 | #define Middlegame 1
62 | #define Endgame 2
63 |
64 | #define mindepth 2
65 |
66 | /* define names for piece constants: */
67 | #define frame 0
68 | #define wpawn 1
69 | #define bpawn 2
70 | #define wknight 3
71 | #define bknight 4
72 | #define wking 5
73 | #define bking 6
74 | #define wrook 7
75 | #define brook 8
76 | #define wqueen 9
77 | #define bqueen 10
78 | #define wbishop 11
79 | #define bbishop 12
80 | #define npiece 13
81 |
82 | /* result flags: */
83 | #define no_result 0
84 | #define stalemate 1
85 | #define white_is_mated 2
86 | #define black_is_mated 3
87 | #define draw_by_fifty 4
88 | #define draw_by_rep 5
89 |
90 | /* arrays maybe ? */
91 | #undef FASTCALC
92 | #ifdef FASTCALC
93 | #define rank(square) ((((square)-26)/12)+1)
94 | #define file(square) ((((square)-26)%12)+1)
95 | #else
96 | #define rank(square) (rank[(square)])
97 | #define file(square) (file[(square)])
98 | #endif
99 | #define diagl(square) (diagl[(square)])
100 | #define diagr(square) (diagr[(square)])
101 |
102 | #ifndef INPROBECODE
103 | typedef enum {FALSE, TRUE} bool;
104 | #endif
105 |
106 | /* castle flags: */
107 | #define no_castle 0
108 | #define wck 1
109 | #define wcq 2
110 | #define bck 3
111 | #define bcq 4
112 |
113 | typedef struct {
114 | int from;
115 | int target;
116 | int captured;
117 | int promoted;
118 | int castled;
119 | int ep;
120 | } move_s;
121 |
122 | typedef struct {
123 | int cap_num;
124 | int was_promoted;
125 | int epsq;
126 | int fifty;
127 | } move_x;
128 |
129 | #if defined(HAVE_SYS_TIMEB_H) && (defined(HAVE_FTIME) || defined(HAVE_GETTIMEOFDAY))
130 | typedef struct timeb rtime_t;
131 | #else
132 | typedef time_t rtime_t;
133 | #endif
134 |
135 | #define STR_BUFF 256
136 | #define MOVE_BUFF 512
137 | #define INF 1000000
138 | #define PV_BUFF 300
139 |
140 | #define AddMaterial(x) Material += material[(x)]
141 | #define RemoveMaterial(x) Material -= material[(x)]
142 |
143 | #define UPPER 1
144 | #define LOWER 2
145 | #define EXACT 3
146 | #define HMISS 4
147 | #define DUMMY 0
148 |
149 | #define LOSS 0
150 | #define WIN 1
151 | #define DRAW 2
152 |
153 | #define max(x, y) ((x) > (y) ? (x) : (y))
154 | #define mix(x, y) ((x) < (y) ? (x) : (y))
155 |
156 | #endif
157 |
--------------------------------------------------------------------------------
/sjeng/squares.h:
--------------------------------------------------------------------------------
1 | /*
2 | Sjeng - a chess variants playing program
3 | Copyright (C) 2000-2001 Gian-Carlo Pascutto
4 |
5 | This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 |
19 | File: squares.h
20 | Purpose: contains squares definitions
21 |
22 | */
23 |
24 | #define A1 26
25 | #define B1 27
26 | #define C1 28
27 | #define D1 29
28 | #define E1 30
29 | #define F1 31
30 | #define G1 32
31 | #define H1 33
32 |
33 | #define A2 38
34 | #define B2 39
35 | #define C2 40
36 | #define D2 41
37 | #define E2 42
38 | #define F2 43
39 | #define G2 44
40 | #define H2 45
41 |
42 | #define A3 50
43 | #define B3 51
44 | #define C3 52
45 | #define D3 53
46 | #define E3 54
47 | #define F3 55
48 | #define G3 56
49 | #define H3 57
50 |
51 | #define A4 62
52 | #define B4 63
53 | #define C4 64
54 | #define D4 65
55 | #define E4 66
56 | #define F4 67
57 | #define G4 68
58 | #define H4 69
59 |
60 | #define A5 74
61 | #define B5 75
62 | #define C5 76
63 | #define D5 77
64 | #define E5 78
65 | #define F5 79
66 | #define G5 80
67 | #define H5 81
68 | #define A6 86
69 | #define B6 87
70 | #define C6 88
71 | #define D6 89
72 | #define E6 90
73 | #define F6 91
74 | #define G6 92
75 | #define H6 93
76 |
77 | #define A7 98
78 | #define B7 99
79 | #define C7 100
80 | #define D7 101
81 | #define E7 102
82 | #define F7 103
83 | #define G7 104
84 | #define H7 105
85 |
86 | #define A8 110
87 | #define B8 111
88 | #define C8 112
89 | #define D8 113
90 | #define E8 114
91 | #define F8 115
92 | #define G8 116
93 | #define H8 117
94 |
--------------------------------------------------------------------------------
/sjeng/stamp-h:
--------------------------------------------------------------------------------
1 | timestamp
2 |
--------------------------------------------------------------------------------
/sjeng/stamp-h.in:
--------------------------------------------------------------------------------
1 | timestamp
2 |
--------------------------------------------------------------------------------
/sjeng/tests/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = bk.epd bt2630.epd lct2.epd wac.epd ecm98.epd
2 |
--------------------------------------------------------------------------------
/sjeng/tests/bk.epd:
--------------------------------------------------------------------------------
1 | 1k1r4/pp1b1R2/3q2pp/4p3/2B5/4Q3/PPP2B2/2K5 b - - bm Qd1+; id "position 01";
2 | 3r1k2/4npp1/1ppr3p/p6P/P2PPPP1/1NR5/5K2/2R5 w - - bm d5; id "position 02";
3 | 2q1rr1k/3bbnnp/p2p1pp1/2pPp3/PpP1P1P1/1P2BNNP/2BQ1PRK/7R b - - bm f5; id "position 03";
4 | rnbqkb1r/p3pppp/1p6/2ppP3/3N4/2P5/PPP1QPPP/R1B1KB1R w KQkq - bm e6; id "position 04";
5 | r1b2rk1/2q1b1pp/p2ppn2/1p6/3QP3/1BN1B3/PPP3PP/R4RK1 w - - bm Nd5 a4; id "position 05";
6 | 2r3k1/pppR1pp1/4p3/4P1P1/5P2/1P4K1/P1P5/8 w - - bm g6; id "position 06";
7 | 1nk1r1r1/pp2n1pp/4p3/q2pPp1N/b1pP1P2/B1P2R2/2P1B1PP/R2Q2K1 w - - bm Nf6; id "position 07";
8 | 4b3/p3kp2/6p1/3pP2p/2pP1P2/4K1P1/P3N2P/8 w - - bm f5; id "position 08";
9 | 2kr1bnr/pbpq4/2n1pp2/3p3p/3P1P1B/2N2N1Q/PPP3PP/2KR1B1R w - - bm f5; id "position 09";
10 | 3rr1k1/pp3pp1/1qn2np1/8/3p4/PP1R1P2/2P1NQPP/R1B3K1 b - - bm Ne5; id "position 10";
11 | 2r1nrk1/p2q1ppp/bp1p4/n1pPp3/P1P1P3/2PBB1N1/4QPPP/R4RK1 w - - bm f4; id "position 11";
12 | r3r1k1/ppqb1ppp/8/4p1NQ/8/2P5/PP3PPP/R3R1K1 b - - bm Bf5; id "position 12";
13 | r2q1rk1/4bppp/p2p4/2pP4/3pP3/3Q4/PP1B1PPP/R3R1K1 w - - bm b4; id "position 13";
14 | rnb2r1k/pp2p2p/2pp2p1/q2P1p2/8/1Pb2NP1/PB2PPBP/R2Q1RK1 w - - bm Qd2; id "position 14";
15 | 2r3k1/1p2q1pp/2b1pr2/p1pp4/6Q1/1P1PP1R1/P1PN2PP/5RK1 w - - bm Qxg7+; id "position 15";
16 | r1bqkb1r/4npp1/p1p4p/1p1pP1B1/8/1B6/PPPN1PPP/R2Q1RK1 W kq - bm Ne4; id "position 16";
17 | r2q1rk1/1ppnbppp/p2p1nb1/3Pp3/2P1P1P1/2N2N1P/PPB1QP2/R1B2RK1 b - - bm h5; id "position 17";
18 | r1bq1rk1/pp2ppbp/2np2p1/2n5/P3PP2/N1P2N2/1PB3PP/R1B1QRK1 b - - bm Nb3; id "position 18";
19 | 3rr3/2pq2pk/p2p1pnp/8/2QBPP2/1P6/P5PP/4RRK1 b - - bm Rxe4; id "position 19";
20 | r4k2/pb2bp1r/1p1qp2p/3pNp2/3P1P2/2N3P1/PPP1Q2P/2KRR3 w - - bm g4; id "position 20";
21 | 3rn2k/ppb2rpp/2ppqp2/5N2/2P1P3/1P5Q/PB3PPP/3RR1K1 w - - bm Nh6; id "position 21";
22 | 2r2rk1/1bqnbpp1/1p1ppn1p/pP6/N1P1P3/P2B1N1P/1B2QPP1/R2R2K1 b - - bm Bxe4; id "position 22";
23 | r1bqk2r/pp2bppp/2p5/3pP3/P2Q1P2/2N1B3/1PP3PP/R4RK1 b kq - bm f6; id "position 23";
24 | r2qnrnk/p2b2b1/1p1p2pp/2pPpp2/1PP1P3/PRNBB3/3QNPPP/5RK1 w - - bm f4; id "position 24";
25 |
--------------------------------------------------------------------------------
/sjeng/tests/bt2630.epd:
--------------------------------------------------------------------------------
1 | rq2r1k1/5pp1/p7/4bNP1/1p2P2P/5Q2/PP4K1/5R1R w - - bm Nxg7; id "test 1";
2 | 6k1/2b2p1p/ppP3p1/4p3/PP1B4/5PP1/7P/7K w - - bm Bxb6; id "test 2";
3 | 5r1k/p1q2pp1/1pb4p/n3R1NQ/7P/3B1P2/2P3P1/7K w - - bm Re6; id "test 3";
4 | 5r1k/1P4pp/3P1p2/4p3/1P5P/3q2P1/Q2b2K1/B3R3 w - - bm Qf7; id "test 4";
5 | 3B4/8/2B5/1K6/8/8/3p4/3k4 w - - bm Ka6; id "test 5";
6 | 1k1r4/1pp4p/2n5/P6R/2R1p1r1/2P2p2/1PP2B1P/4K3 b - - bm e3; id "test 6";
7 | 6k1/p3q2p/1nr3pB/8/3Q1P2/6P1/PP5P/3R2K1 b - - bm Rd6; id "test 7";
8 | 2krr3/1p4pp/p1bRpp1n/2p5/P1B1PP2/8/1PP3PP/R1K3B1 w - - bm Rxc6+; id "test 8";
9 | r5k1/pp2p1bp/6p1/n1p1P3/2qP1NP1/2PQB3/P5PP/R4K2 b - - bm g5; id "test 9";
10 | 2r3k1/1qr1b1p1/p2pPn2/nppPp3/8/1PP1B2P/P1BQ1P2/5KRR w - - bm Rxg7+; id "test 10";
11 | 1br3k1/p4p2/2p1r3/3p1b2/3Bn1p1/1P2P1Pq/P3Q1BP/2R1NRK1 b - - bm Qxh2+; id "test 11";
12 | 8/pp3k2/2p1qp2/2P5/5P2/1R2p1rp/PP2R3/4K2Q b - - bm Qe4; id "test 12";
13 | 2bq3k/2p4p/p2p4/7P/1nBPPQP1/r1p5/8/1K1R2R1 b - - bm Be6; id "test 13";
14 | 3r1rk1/1p3pnp/p3pBp1/1qPpP3/1P1P2R1/P2Q3R/6PP/6K1 w - - bm Rxh7; id "test 14";
15 | 2b1q3/p7/1p1p2kb/nPpN3p/P1P1P2P/6P1/5R1K/5Q2 w - - bm e5; id "test 15";
16 | 2krr3/pppb1ppp/3b4/3q4/3P3n/2P2N1P/PP2B1P1/R1BQ1RK1 b - - bm Nxg2; id "test 16";
17 | 4r1k1/p1qr1p2/2pb1Bp1/1p5p/3P1n1R/3B1P2/PP3PK1/2Q4R w - - bm Qxf4; id "test 17";
18 | 8/4p3/8/3P3p/P2pK3/6P1/7b/3k4 w - - bm d6; id "test 18";
19 | 3r2k1/pp4B1/6pp/PP1Np2n/2Pp1p2/3P2Pq/3QPPbP/R4RK1 b - - bm f3; id "test 19";
20 | r4rk1/5p2/1n4pQ/2p5/p5P1/P4N2/1qb1BP1P/R3R1K1 w - - bm Ra2; id "test 20";
21 | k7/8/PP1b2P1/K2Pn2P/4R3/8/6np/8 w - - bm Re1; id "test 21";
22 | rnb1k2r/pp2qppp/3p1n2/2pp2B1/1bP5/2N1P3/PP2NPPP/R2QKB1R w KQkq - bm a3; id "test 22";
23 | 8/7p/8/p4p2/5K2/Bpk3P1/4P2P/8 w - - bm g4; id "test 23";
24 | R7/3p3p/8/3P2P1/3k4/1p5p/1P1NKP1P/7q w - - bm g6; id "test 24";
25 | 8/8/3k1p2/p2BnP2/4PN2/1P2K1p1/8/5b2 b - - bm Nd3; id "test 25";
26 | 2r3k1/pbr1q2p/1p2pnp1/3p4/3P1P2/1P1BR3/PB1Q2PP/5RK1 w - - bm f5; id "test 26";
27 | 3r2k1/p2r2p1/1p1B2Pp/4PQ1P/2b1p3/P3P3/7K/8 w - - bm e6; id "test 27";
28 | rnb1k1nr/p2p1ppp/3B4/1p1N1N1P/4P1P1/3P1Q2/PqP5/R4Kb1 w kq - bm e5; id "test 28";
29 | r1b1kb1r/pp1n1ppp/2q5/2p3B1/Q1B5/2p2N2/PP3PPP/R3K2R w KQkq - bm O-O-O; id "test 29";
30 | 2k5/2p3Rp/p1pb4/1p2p3/4P3/PN1P1P2/1P2KP1r/8 w - - bm f4; id "test 30";
31 |
32 |
--------------------------------------------------------------------------------
/sjeng/tests/lct2.epd:
--------------------------------------------------------------------------------
1 | r3kb1r/3n1pp1/p6p/2pPp2q/Pp2N3/3B2PP/1PQ2P2/R3K2R w KQkq - bm d6; id "POS-01";
2 | 1k1r3r/pp2qpp1/3b1n1p/3pNQ2/2pP1P2/2N1P3/PP4PP/1K1RR3 b - - bm Bb4; id "POS-02";
3 | r6k/pp4p1/2p1b3/3pP3/7q/P2B3r/1PP2Q1P/2K1R1R1 w - - bm Qc5; id "POS-03";
4 | 1nr5/2rbkppp/p3p3/Np6/2PRPP2/8/PKP1B1PP/3R4 b - - bm e5; id "POS-04";
5 | 2r2rk1/1p1bq3/p3p2p/3pPpp1/1P1Q4/P7/2P2PPP/2R1RBK1 b - - bm Bb5; id "POS-05";
6 | 3r1bk1/p4ppp/Qp2p3/8/1P1B4/Pq2P1P1/2r2P1P/R3R1K1 b - - bm e5; id "POS-06";
7 | r1b2r1k/pp2q1pp/2p2p2/2p1n2N/4P3/1PNP2QP/1PP2RP1/5RK1 w - - bm Nd1; id "POS-07";
8 | r2qrnk1/pp3ppb/3b1n1p/1Pp1p3/2P1P2N/P5P1/1B1NQPBP/R4RK1 w - - bm Bh3; id "POS-08";
9 | 5nk1/Q4bpp/5p2/8/P1n1PN2/q4P2/6PP/1R4K1 w - - bm Qd4; id "POS-09";
10 | r3k2r/3bbp1p/p1nppp2/5P2/1p1NP3/5NP1/PPPK3P/3R1B1R b kq - bm Bf8; id "POS-10";
11 | bn6/1q4n1/1p1p1kp1/2pPp1pp/1PP1P1P1/3N1P1P/4B1K1/2Q2N2 w - - bm h4; id "POS-11";
12 | 3r2k1/pp2npp1/2rqp2p/8/3PQ3/1BR3P1/PP3P1P/3R2K1 b - - bm Rd6; id "POS-12";
13 | 1r2r1k1/4ppbp/B5p1/3P4/pp1qPB2/2n2Q1P/P4PP1/4RRK1 b - - bm Na2; id "POS-13";
14 | r2qkb1r/1b3ppp/p3pn2/1p6/1n1P4/1BN2N2/PP2QPPP/R1BR2K1 w kq - bm d5; id "POS-14";
15 | 1r4k1/1q2bp2/3p2p1/2pP4/p1N4R/2P2QP1/1P3PK1/8 w - - bm Nd6; id "CMB-01";
16 | rn3rk1/pbppq1pp/1p2pb2/4N2Q/3PN3/3B4/PPP2PPP/R3K2R w KQ - bm Qh7; id "CMB-02";
17 | 4r1k1/3b1p2/5qp1/1BPpn2p/7n/r3P1N1/2Q1RPPP/1R3NK1 b - - bm Qf3; id "CMB-03";
18 | 2k2b1r/1pq3p1/2p1pp2/p1n1PnNp/2P2B2/2N4P/PP2QPP1/3R2K1 w - - bm ef6; id "CMB-04";
19 | 2r2r2/3qbpkp/p3n1p1/2ppP3/6Q1/1P1B3R/PBP3PP/5R1K w - - bm Rh7; id "CMB-05";
20 | 2r1k2r/2pn1pp1/1p3n1p/p3PP2/4q2B/P1P5/2Q1N1PP/R4RK1 w q - bm ef6; id "CMB-06";
21 | 2rr2k1/1b3ppp/pb2p3/1p2P3/1P2BPnq/P1N3P1/1B2Q2P/R4R1K b - - bm Rc3; id "CMB-07";
22 | 2b1r1k1/r4ppp/p7/2pNP3/4Q3/q6P/2P2PP1/3RR1K1 w - - bm Nf6; id "CMB-08";
23 | 6k1/5p2/3P2p1/7n/3QPP2/7q/r2N3P/6RK b - - bm Rd2; id "CMB-09";
24 | rq2rbk1/6p1/p2p2Pp/1p1Rn3/4PB2/6Q1/PPP1B3/2K3R1 w - - bm Bh6; id "CMB-10";
25 | rnbq2k1/p1r2p1p/1p1p1Pp1/1BpPn1N1/P7/2P5/6PP/R1B1QRK1 w - - bm Nh7; id "CMB-11";
26 | r2qrb1k/1p1b2p1/p2ppn1p/8/3NP3/1BN5/PPP3QP/1K3RR1 w - - bm e5; id "CMB-12";
27 | 8/1p3pp1/7p/5P1P/2k3P1/8/2K2P2/8 w - - bm f6; id "FIN-01";
28 | 8/pp2r1k1/2p1p3/3pP2p/1P1P1P1P/P5KR/8/8 w - - bm f5; id "FIN-02";
29 | 8/3p4/p1bk3p/Pp6/1Kp1PpPp/2P2P1P/2P5/5B2 b - - bm Be4; id "FIN-03";
30 | 5k2/7R/4P2p/5K2/p1r2P1p/8/8/8 b - - bm h3; id "FIN-04";
31 | 6k1/6p1/7p/P1N5/1r3p2/7P/1b3PP1/3bR1K1 w - - bm a6; id "FIN-05";
32 | 8/3b4/5k2/2pPnp2/1pP4N/pP1B2P1/P3K3/8 b - - bm f4; id "FIN-06";
33 | 6k1/4pp1p/3p2p1/P1pPb3/R7/1r2P1PP/3B1P2/6K1 w - - bm Bb4 ; id "FIN-07";
34 | 2k5/p7/Pp1p1b2/1P1P1p2/2P2P1p/3K3P/5B2/8 w - - bm c5; id "FIN-08";
35 | 8/5Bp1/4P3/6pP/1b1k1P2/5K2/8/8 w - - bm Kg4; id "FIN-09";
36 |
--------------------------------------------------------------------------------