Skip to content

Repository files navigation

AppIcon

CHESSANALYSIS

Master Chess with Precision and Insightful Analysis - For Free

license last-commit repo-top-language repo-language-count

Built with the tools and technologies:

JSON Swift C


Table of Contents

Table of Contents

Overview

ChessAnalysis is a comprehensive tool designed for developers to perform in-depth chess game analysis using the powerful Stockfish engine.

Why ChessAnalysis?

This project enhances chess analysis capabilities with advanced features and customization options. The core features include:

  • 🔍 Integration with Stockfish Engine: Enables advanced chess position evaluations and move suggestions.
  • 🎨 User Interface Customization: Offers customizable board themes and evaluation visuals for a personalized experience.
  • 📊 Data Management: Efficiently handles chess game storage and retrieval, ensuring data integrity and easy access.
  • ⚙️ Asynchronous Task Management: Utilizes Combine and Swift Concurrency for efficient processing and error handling.
  • 🔗 Chess.com API Integration: Facilitates seamless data retrieval from Chess.com, providing comprehensive game data.

Features

Component Details
⚙️ Architecture
  • Swift-based application
  • Integrates Stockfish chess engine
  • Modular design with separate sound and logic components
🔩 Code Quality
  • Consistent Swift coding standards
  • Use of comments for clarity
  • Robust error handling
📄 Documentation
  • Minimal inline comments
  • Comprehensive README
  • No API documentation
🔌 Integrations
  • Stockfish engine integration
  • Sound effects for moves
🧩 Modularity
  • Separate modules for sound and logic
  • Encapsulation of chess rules
🧪 Testing
  • No unit tests present
  • Lacks automated testing framework
⚡️ Performance
  • Efficient move calculations via Stockfish
  • Potential latency in sound playback
🛡️ Security
  • No security features implemented
  • Basic input validation
📦 Dependencies
  • Relies on Stockfish library
  • Sound files included in project
🚀 Scalability
  • Limited by single-threaded execution
  • Potential for multi-threading with Stockfish

Project Structure

└── ChessAnalysis/
    ├── AppIcon.icon
    │   ├── Assets
    │   │   └── wn.svg
    │   └── icon.json
    ├── ChessAnalysis
    │   ├── AnalysisQueue.swift
    │   ├── AnalysisService.swift
    │   ├── AnalysisViewModel.swift
    │   ├── AppSettings.swift
    │   ├── Assets.xcassets
    │   │   ├── .DS_Store
    │   │   ├── AccentColor.colorset
    │   │   ├── Avatars
    │   │   ├── Classifications
    │   │   ├── Contents.json
    │   │   ├── Pieces
    │   │   └── TimeControls
    │   ├── BoardTheme.swift
    │   ├── BoardThemePickerView.swift
    │   ├── ChessAnalysis-Bridging-Header.h
    │   ├── ChessAnalysisApp.swift
    │   ├── ChessBoardView.swift
    │   ├── ChessComAPI.swift
    │   ├── ChessLogic.swift
    │   ├── Color+Hex.swift
    │   ├── ContentView.swift
    │   ├── Engine
    │   │   └── Stockfish
    │   ├── EvalBarView.swift
    │   ├── EvaluationGraphView.swift
    │   ├── GameDetailView.swift
    │   ├── GameEndType.swift
    │   ├── GameReviewView.swift
    │   ├── GameStore.swift
    │   ├── GamesHomeView.swift
    │   ├── GamesViewModel.swift
    │   ├── LoginView.swift
    │   ├── MailComposer.swift
    │   ├── Models.swift
    │   ├── Move-Sounds
    │   │   ├── capture.wav
    │   │   ├── castle.wav
    │   │   ├── move-check.wav
    │   │   ├── move-opponent.wav
    │   │   ├── move-self.wav
    │   │   └── promote.wav
    │   ├── MoveClassificationStyle.swift
    │   ├── MoveSoundPlayer.swift
    │   ├── PGNParser.swift
    │   ├── PersistenceController.swift
    │   ├── SettingsView.swift
    │   ├── StockfishEngine.swift
    │   └── TimeControlIcon.swift
    ├── ChessAnalysis.xcodeproj
    │   ├── project.pbxproj
    │   └── project.xcworkspace
    │       └── contents.xcworkspacedata
    ├── ChessAnalysisTests
    │   └── ChessAnalysisTests.swift
    ├── ChessAnalysisUITests
    │   ├── ChessAnalysisUITests.swift
    │   └── ChessAnalysisUITestsLaunchTests.swift
    ├── LICENSE
    └── README.md

Project Index

CHESSANALYSIS/
__root__
⦿ __root__
File Name Summary
LICENSE - Provide a legal framework for the use, distribution, and modification of the software, ensuring users and developers have the freedom to utilize the software with minimal restrictions
- The MIT License facilitates open-source collaboration by allowing integration into both proprietary and open-source projects, while disclaiming warranties and limiting liability for the authors.
AppIcon.icon
⦿ AppIcon.icon
File Name Summary
icon.json - Defines the visual properties and styling for an app icon, focusing on gradients, layers, and appearance variations for different themes such as dark and tinted modes
- Supports watchOS and shared platforms, ensuring consistent icon rendering across devices
- Facilitates the integration of visual elements into the broader application architecture, contributing to a cohesive user interface design.
ChessAnalysis
⦿ ChessAnalysis
File Name Summary
ChessAnalysisApp.swift - ChessAnalysisApp.swift initializes and launches the ChessAnalysis application, enabling battery monitoring and setting up the main user interface with ContentView
- Upon startup, it performs essential maintenance tasks such as deleting incomplete downloads and running a smoke test on the Stockfish chess engine
- This setup ensures the application is ready for efficient chess analysis and user interaction within the broader project architecture.
AnalysisViewModel.swift - AnalysisViewModel manages chess game analysis by interacting with GameStore and AnalysisService
- It handles loading and starting analyses, updating accuracy, and managing analysis state
- The view model uses Combine to publish changes and supports asynchronous operations with Swift Concurrency
- It integrates with AnalysisQueue for task management, ensuring efficient processing and error handling during analysis operations, and provides a mechanism to cancel ongoing analyses.
SettingsView.swift - SettingsView.swift provides a user interface for configuring the ChessAnalysis app
- It allows users to manage settings related to their Chess.com account, analysis preferences, board themes, and storage usage
- The view includes options for toggling analysis features, adjusting storage limits, and monitoring device storage
- It integrates with the apps settings model to ensure user preferences are applied consistently.
ChessAnalysis-Bridging-Header.h - Integrate the Stockfish chess engine into the ChessAnalysis project by including the necessary header for the Stockfish wrapper
- This setup allows the project to leverage Stockfishs powerful analysis capabilities, enabling advanced chess position evaluations and move suggestions
- Essential for developers working on enhancing chess analysis features, it serves as a bridge between the core engine and the projects higher-level functionalities.
BoardTheme.swift - BoardTheme defines customizable color themes for a chess board interface, utilizing SwiftUI
- It provides a collection of predefined themes, each identified by a unique ID, with specified light and dark color hex codes
- The structure supports retrieving a theme by ID and defaults to the first theme if an ID is not found
- This component enhances the visual customization of the chess analysis application.
AppSettings.swift - AppSettings manages user preferences and configurations for the ChessAnalysis application, including username, token, storage capacity, and analysis settings
- It ensures these settings persist using UserDefaults and adapts the low power analysis mode based on device battery status
- This class plays a crucial role in maintaining user-specific settings and optimizing app performance under varying power conditions, enhancing the overall user experience.
EvalBarView.swift - EvalBarView.swift provides a visual representation of chess evaluation scores within the ChessAnalysis module
- It dynamically displays the evaluation bar, indicating the advantage of one player over another based on the evaluation score
- The view adjusts its fill proportionally to the score, with options to override text and force a winners color fill, enhancing the user interface for chess analysis.
GameDetailView.swift - GameDetailView.swift provides a detailed view for analyzing chess games within the ChessAnalysis app
- It displays game summaries, player ratings, move classifications, and phase evaluations
- Users can review games and initiate or re-initiate analysis using the integrated Stockfish engine
- The view also manages data loading and avatar fetching, enhancing the user experience by presenting comprehensive game insights and facilitating in-depth analysis.
Color+Hex.swift - Enhances the SwiftUI Color class by enabling initialization with hexadecimal color strings, facilitating the conversion of hex values to RGB components
- This extension supports the broader ChessAnalysis project by allowing developers to easily apply custom colors to UI elements, ensuring consistency in design
- It streamlines color management within the codebase, contributing to a more intuitive and visually cohesive user interface.
LoginView.swift - LoginView.swift provides a user interface for connecting a Chess.com account within the ChessAnalysis app
- It allows users to input their Chess.com username and initiate a connection process
- The view updates the app settings with the provided username and triggers a connection callback
- It ensures no local caching of games unless explicitly downloaded, maintaining user privacy and data integrity.
AnalysisQueue.swift - AnalysisQueue manages asynchronous tasks for chess analysis, ensuring operations are processed sequentially
- It maintains a queue of tasks, executing them one at a time, and supports cancellation
- The queue operates in the background, leveraging iOSs background task capabilities to ensure tasks continue running even when the app is not active
- This component is crucial for handling complex analysis without blocking the main application thread.
GameEndType.swift - Defines enums for categorizing chess game endings, such as resignation, checkmate, and timeout
- Provides functionality to parse and identify game end types from PGN data, facilitating filtering of games based on their conclusion
- Integrates with the broader architecture by enabling analysis and categorization of chess games, aiding in data organization and retrieval within the ChessAnalysis module.
GameStore.swift - GameStore manages the storage and retrieval of chess games and their analyses
- It handles saving downloaded games, fetching stored games, and managing game analyses
- It ensures storage limits are respected by deleting older or unanalyzed games when necessary
- The class interacts with CoreData to persist game metadata and analysis details, providing a structured approach to managing chess game data within the application.
PGNParser.swift - PGNParser.swift facilitates the extraction of key components from PGN (Portable Game Notation) strings, crucial for chess game analysis
- It retrieves game headers, move sequences, and clock times by parsing the PGN format
- This functionality supports the broader architecture by enabling detailed game data analysis and processing, which is essential for developing chess analysis tools and enhancing user interaction with chess data.
MoveSoundPlayer.swift - MoveSoundPlayer manages audio playback for chess move sounds within the application
- It utilizes AVFoundation to play sound files, caching audio players to optimize performance
- By associating sounds with specific move actions, it enhances user experience through auditory feedback
- This component fits into the broader architecture by providing a reusable utility for sound management, ensuring consistent and efficient sound playback across the chess application.
GameReviewView.swift - GameReviewView provides a comprehensive interface for reviewing chess games
- It displays game metadata, player information, and a detailed move list with analysis
- Users can interact with the chessboard, view evaluations, and explore potential mate lines
- The view supports board flipping and integrates with the Stockfish engine for move analysis, enhancing the user experience in analyzing and understanding chess games.
StockfishEngine.swift - StockfishEngine.swift manages the integration and operation of the Stockfish chess engine within the application
- It provides asynchronous methods to start, stop, and configure the engine, enabling chess position analysis with specified parameters
- The engine optimizes resource usage by entering low-power mode when idle, ensuring efficient performance
- It also handles communication with the engine, parsing analysis results for further use in the application.
ChessLogic.swift - ChessLogic.swift implements the core logic for a chess game, including defining chess pieces, moves, and positions
- It supports parsing and applying moves in Standard Algebraic Notation (SAN), validating positions, and generating legal moves
- The file is integral to the chess engine, enabling move validation, position updates, and game state management within the broader chess analysis project.
ChessComAPI.swift - ChessComAPI.swift provides functionality to interact with the Chess.com public API, enabling retrieval of player information and game archives
- It supports fetching monthly archives, individual games from archives, and player profiles
- The architecture uses URLSession for network requests and JSONDecoder for parsing responses, with optional authentication via a token
- This component is crucial for integrating Chess.com data into the broader chess analysis application.
ChessBoardView.swift - ChessBoardView.swift renders a visual representation of a chessboard using SwiftUI, based on a given FEN string
- It highlights moves, displays chess pieces, and indicates the best move with an arrow
- The view adapts to different themes and orientations, enhancing user interaction by visually classifying the last move
- It integrates with the broader architecture by parsing and displaying chess positions dynamically.
GamesHomeView.swift - GamesHomeView.swift provides a user interface for managing and analyzing chess games
- It allows users to view, search, and filter games by various criteria such as time control and game outcome
- Users can import PGN files, refresh game data, and report errors
- The view integrates with a ViewModel to handle data loading and game analysis, supporting both remote and downloaded game management.
Models.swift - Models.swift defines data structures essential for representing and analyzing chess games within the ChessAnalysis project
- It includes models for remote game data, game metadata, and move analysis, facilitating the storage and retrieval of game information and analysis results
- These structures support the projects architecture by enabling efficient data handling and analysis, crucial for delivering insights into chess game performance and player strategies.
TimeControlIcon.swift - TimeControlIcon.swift provides a SwiftUI view that displays an icon representing the time control category of a chess game, such as bullet, blitz, or rapid
- It determines the category based on the provided time class and time control values
- This component is part of the user interface, enhancing the visual representation of game settings within the broader ChessAnalysis application architecture.
MailComposer.swift - MailComposer facilitates email composition within the ChessAnalysis app by leveraging SwiftUI and MessageUI frameworks
- It enables users to send emails with specified recipients, subject, body, and optional attachments
- The component checks if the device can send mail and manages the email composition lifecycle through a coordinator
- This integration enhances user interaction by allowing seamless communication directly from the app interface.
MoveClassificationStyle.swift - Move classification functionality in the ChessAnalysis module assigns asset names and colors to different chess move classifications, such as best, mistake, or blunder
- It enhances the user interface by providing visual cues through color coding and highlights, aiding users in quickly identifying the quality of moves
- This component integrates with the broader architecture to support detailed chess game analysis and visualization.
AnalysisService.swift - AnalysisService provides chess game analysis by leveraging the Stockfish engine to evaluate moves from a PGN string
- It calculates move accuracy, classifies moves, and updates the game store with analysis results
- The service supports progress tracking and adapts analysis depth based on device power conditions, ensuring efficient performance
- It integrates with GameStore and StockfishEngine within the project architecture.
EvaluationGraphView.swift - EvaluationGraphView.swift provides a visual representation of chess evaluation data within the apps user interface
- It utilizes SwiftUI to render a smoothed graph of evaluation scores, offering insights into game dynamics
- The component integrates seamlessly into the broader architecture by transforming numerical evaluations into an intuitive graphical format, enhancing user experience
- Developers should familiarize themselves with SwiftUI and GeometryReader for effective customization and integration.
ContentView.swift - GamesHomeView for managing and analyzing chess games, and SettingsView for configuring application preferences
- The use of SwiftUIs TabView facilitates seamless navigation, while the AppSettings object ensures consistent state management across the application.
GamesViewModel.swift - GamesViewModel manages the retrieval and analysis of chess games from remote sources and local storage
- It handles loading, caching, and metadata computation for both remote and downloaded games
- The class facilitates importing PGN files, downloading games, and analyzing them with progress tracking
- It interacts with services like GameStore, AnalysisService, and ChessComAPI to ensure efficient data management and user feedback.
BoardThemePickerView.swift - BoardThemePickerView provides a user interface component for selecting a chessboard theme within the ChessAnalysis application
- It displays available themes in a grid format, allowing users to choose their preferred board appearance
- The selection is visually indicated and stored using SwiftUIs @AppStorage
- This component integrates into the broader architecture by enhancing user customization and improving the overall user experience of the application.
PersistenceController.swift - GameEntity and MoveAnalysisEntity, which store game metadata and detailed move analysis, respectively
- The controller ensures data integrity and efficient data handling, supporting both in-memory and persistent storage configurations for flexible data management.
Move-Sounds
⦿ ChessAnalysis.Move-Sounds
File Name Summary
promote.wav - Core ModuleHandles the primary business logic and operations.2
- Data Access LayerManages data retrieval and storage, ensuring efficient and secure data handling.3
-
API LayerFacilitates communication with external systems and services.4
- User InterfaceProvides a user-friendly interface for interaction with the system.Each module is designed to be independent, promoting reusability and ease of testing.## UsageTo use the project, follow these steps:1
-
InstallationClone the repository and install dependencies using the package manager of your choice.2
- ConfigurationSet up the necessary environment variables and configuration files as per the documentation.3
-
ExecutionRun the application using the provided scripts or commands.4
- TestingExecute the test suite to ensure all components are functioning as expected.## Developer OnboardingTo get started with development:1
-
SetupEnsure your development environment meets the prerequisites outlined in the documentation.2
- Codebase FamiliarizationReview the architecture and module descriptions to understand the system's structure.3
-
Contribution GuidelinesFollow the project's contribution guidelines for submitting changes or enhancements.4
- **DocumentationRefer to the detailed documentation for in-depth information on each module and its responsibilities.By adhering to these guidelines, developers can efficiently contribute to and extend the project.
move-check.wav - Data IngestionConnect to multiple data sources, including databases, APIs, and flat files.-Data TransformationApply a series of transformations to clean and prepare data for analysis.-Data VisualizationGenerate visual reports to aid in data interpretation and decision-making.## ArchitectureThe architecture is modular, consisting of several key components:1
- Ingestion ModuleHandles the connection and retrieval of data from external sources.2
-
Transformation EngineProcesses data through a series of customizable operations.3
- Visualization LayerUtilizes libraries to create interactive and static visualizations.4
-
Configuration ManagerAllows users to define and manage pipeline settings.Each module is designed to operate independently, allowing for easy maintenance and scalability.## Developer Onboarding### Prerequisites:-Familiarity with Python and data processing libraries (e.g., Pandas, NumPy).-Basic understanding of data visualization tools (e.g., Matplotlib, Seaborn).### Setup Instructions:1
- Clone the Repository`bash git clone https://github.com/your-repo/project.git 2
-
Install Dependencies`bash pip install-r requirements.txt `3
- Configure Environment-Set up environment variables as specified in
config.env.4
-
Run Tests`bash pytest tests/ ``### Contribution Guidelines:-Fork the repository and create a new branch for each feature or bug fix.-Ensure code is well-documented and adheres to the project's coding standards.-Submit a pull request with a clear description of changes.By following these guidelines, developers can effectively contribute to the project and enhance its capabilities.
move-opponent.wav - The audio file move-opponent.wav is part of the ChessAnalysis project, specifically within the Move-Sounds directory
- It serves as an auditory cue for moves made by the opponent during a chess game
- This file integrates into the broader architecture by enhancing the user experience through sound feedback, helping players remain engaged and informed about the games progress without needing to constantly watch the board.
move-self.wav - Audio file move-self.wav is part of the ChessAnalysis project, specifically located in the Move-Sounds directory
- It serves as a sound effect for a move action within the chess game analysis tool
- The file is integrated into the broader architecture to enhance user interaction by providing auditory feedback during gameplay or analysis, contributing to a more immersive experience for users.
castle.wav - Service LayerHandles business logic and communication between the data layer and user interface.-Data LayerManages data storage and retrieval, ensuring data integrity and security.-User InterfaceProvides a responsive and intuitive interface for end-users.## UsageTo use the project, follow these steps:1
- InstallationClone the repository and run the setup script to install dependencies.2
-
ConfigurationUpdate the configuration files with your environment-specific settings.3
- ExecutionUse the provided scripts to start the application
- Ensure all services are running as expected.4
-
TestingRun the test suite to verify the functionality and integrity of the application.## Developer OnboardingNew developers can get started by following these steps:1
- Familiarize with the CodebaseReview the project structure and key components.2
-
Setup Development EnvironmentFollow the installation and configuration steps to set up your local environment.3
- Understand the WorkflowReview the contribution guidelines and workflow processes.4
-
Start ContributingPick an issue from the backlog or propose new features for development.For detailed documentation, refer to the /docs directory
- If you have any questions, please contact the project maintainers.
capture.wav - Capture sound file used in the ChessAnalysis project enhances the user experience by providing auditory feedback for piece captures during gameplay
- It integrates into the Move-Sounds module, which is part of the broader architecture designed to analyze and simulate chess games
- Developers should ensure the sound file is correctly referenced within the application to maintain seamless audio feedback during chess moves.
Assets.xcassets
⦿ ChessAnalysis.Assets.xcassets
File Name Summary
Contents.json - Defines metadata for asset management within the ChessAnalysis project, facilitating the organization and versioning of image assets used in the application
- Positioned within the broader project structure, it ensures compatibility and consistency across different development environments by adhering to Xcodes asset catalog specifications
- Essential for developers onboarding the project to understand asset handling and integration within the iOS development ecosystem.
Pieces
⦿ ChessAnalysis.Assets.xcassets.Pieces
File Name Summary
Contents.json - Manage metadata for chess piece assets within the ChessAnalysis project
- The Contents.json file specifies author and version information, ensuring consistency and compatibility across the asset management system
- As part of the broader architecture, it supports the organization and retrieval of graphical resources necessary for rendering chess pieces, contributing to the visual representation and user interface of the application.
wr.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.wr.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the white rook piece in the ChessAnalysis project
- It specifies the use of a scalable vector graphic (SVG) format, ensuring high-quality rendering across different devices
- This asset is part of the broader architecture that manages chess piece visuals, contributing to the user interface by providing consistent and scalable graphics for the chess game representation.
br.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.br.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the black rook chess piece in the ChessAnalysis project
- It specifies the use of a scalable vector graphic (SVG) format to ensure high-quality rendering across different devices
- This asset is part of the broader architecture that manages visual elements of the chess pieces, contributing to the user interface by providing consistent and scalable graphics for gameplay visualization.
bk.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.bk.imageset
File Name Summary
Contents.json - Contents.json defines the metadata for the black king chess piece image used in the ChessAnalysis project
- It specifies the image file, bk.svg, as a universal asset, ensuring compatibility across different devices
- The file maintains vector representation, allowing for scalable graphics without loss of quality
- This asset is part of the visual resources supporting the user interface and experience within the application.
wk.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.wk.imageset
File Name Summary
Contents.json - Contents.json defines the vector representation of the white king chess piece image used in the ChessAnalysis project
- It specifies the image file, wk.svg, and ensures compatibility across different devices by preserving the vector format
- This configuration is part of the asset management system, which organizes and maintains visual resources for the application, ensuring consistent and scalable graphics throughout the user interface.
bn.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.bn.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for a chess piece, specifically a black knight, within the ChessAnalysis project
- It specifies the image file, bn.svg, as a universal asset and ensures vector representation is preserved
- This configuration is part of the asset management system, facilitating consistent and scalable rendering of chess piece graphics across different devices and screen sizes in the application.
wn.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.wn.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the white knight chess piece within the ChessAnalysis project
- It specifies the use of a scalable vector graphic (SVG) format to maintain image quality across different device sizes
- This asset is part of the user interface resources, ensuring consistent and high-quality visual representation of chess pieces in the application.
wq.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.wq.imageset
File Name Summary
Contents.json - Contents.json defines the vector representation of the white queen chess piece image for universal use within the ChessAnalysis project
- It ensures the image is preserved in vector format, allowing for scalability across different device sizes and resolutions
- This file is part of the asset management system, contributing to the visual consistency and quality of the chess piece graphics throughout the application.
wp.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.wp.imageset
File Name Summary
Contents.json - Store image assets for the white pawn chess piece in a format compatible with Xcode projects
- Ensure the vector representation is preserved for scalability across different device resolutions
- This asset is part of the broader ChessAnalysis project, which likely involves analyzing or visualizing chess games, and contributes to the visual representation of chess pieces within the applications user interface.
bp.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.bp.imageset
File Name Summary
Contents.json - Store image assets for the black pawn chess piece in a universal format, ensuring vector representation is preserved
- This asset is part of the ChessAnalysis project, which likely involves analyzing or displaying chess games
- The file is structured to be compatible with Xcode, indicating its use in an iOS or macOS application, and integrates seamlessly within the projects asset management system.
bq.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.bq.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the black queen chess piece in the ChessAnalysis project
- It specifies the image file, bq.svg, and ensures the vector representation is preserved for universal use across different devices
- This asset is part of the broader architecture that manages graphical resources, contributing to the visual representation of chess pieces within the application.
bb.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.bb.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the black bishop piece in the ChessAnalysis project
- It specifies the use of a scalable vector graphic (SVG) format for universal idiom, ensuring high-quality rendering across different devices
- The file is part of the asset management system within the project, facilitating the consistent display of chess pieces in the user interface.
wb.imageset
⦿ ChessAnalysis.Assets.xcassets.Pieces.wb.imageset
File Name Summary
Contents.json - Contents.json in the ChessAnalysis project defines the image asset for the white bishop chess piece
- It specifies the use of a scalable vector graphic (SVG) format to ensure high-quality rendering across different devices
- The file is part of the asset catalog structure, which organizes and manages image resources for the application, facilitating consistent and efficient access to visual elements within the apps architecture.
AccentColor.colorset
⦿ ChessAnalysis.Assets.xcassets.AccentColor.colorset
File Name Summary
Contents.json - Defines the accent color for the ChessAnalysis application, ensuring a consistent visual theme across different devices
- Part of the Assets.xcassets directory, it plays a crucial role in the user interface by maintaining color uniformity
- Managed by Xcode, this configuration supports the universal idiom, indicating its applicability across all device types
- Essential for developers focusing on UI consistency and aesthetic coherence within the apps architecture.
Classifications
⦿ ChessAnalysis.Assets.xcassets.Classifications
File Name Summary
Contents.json - Defines metadata for asset classifications within the ChessAnalysis project, facilitating the organization and management of image assets used in the application
- Serves as a part of the asset catalog structure, ensuring compatibility with Xcodes asset management system
- Plays a crucial role in maintaining consistency and versioning of assets, which is essential for the seamless integration and functionality of visual components in the overall project architecture.
best.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.best.imageset
File Name Summary
Contents.json - Defines image assets for the ChessAnalysis project, specifically categorizing the best classification with universal idiom support across different scales (1x, 2x, 3x)
- These assets are integral to the user interface, ensuring consistent visual representation across various device resolutions
- Managed within the Xcode environment, they contribute to the overall architecture by providing scalable image resources for enhanced user experience.
mistake.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.mistake.imageset
File Name Summary
Contents.json - Contents.json defines image assets for the ChessAnalysis project, specifically categorizing images related to chess mistakes
- It includes multiple resolutions for universal idioms, ensuring compatibility across different device scales
- This asset management is integral to the user interface, providing visual feedback in the application
- Developers should ensure any new image assets follow this structure for consistency and maintainability within the projects architecture.
good.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.good.imageset
File Name Summary
Contents.json - Contents.json defines image assets for the ChessAnalysis project, specifying different resolutions for a good classification image
- It ensures that the application displays the appropriate image quality across various device screens
- This file is part of the asset management system within the project, facilitating consistent visual representation and aiding developers in maintaining organized and scalable image resources.
brilliant.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.brilliant.imageset
File Name Summary
Contents.json - Contents.json defines image assets for different display scales within the ChessAnalysis project, specifically for the brilliant classification
- It ensures that the appropriate image resolution is used across various devices by specifying universal idioms and scales (1x, 2x, 3x)
- This file is part of the asset management system, contributing to the visual consistency and quality of the application's user interface.
miss.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.miss.imageset
File Name Summary
Contents.json - Contents.json defines image assets for the ChessAnalysis project, specifically for the miss classification
- It provides metadata for different image scales (1x, 2x, 3x) to ensure proper rendering across various device resolutions
- This file is part of the asset management system, facilitating the organization and retrieval of visual resources within the application, contributing to a consistent user interface experience.
blunder.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.blunder.imageset
File Name Summary
Contents.json - Contents.json defines image assets for different display scales within the ChessAnalysis project
- It categorizes images under the blunder classification, providing universal idiom support for 1x, 2x, and 3x resolutions
- This setup ensures that the application can display the appropriate image quality based on the device's screen resolution, contributing to a consistent and visually appealing user interface across various devices.
excellent.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.excellent.imageset
File Name Summary
Contents.json - Contents.json in the ChessAnalysis project defines image assets for the excellent classification, providing multiple resolutions for universal idioms
- It ensures that the application can display the appropriate image quality across different device screens
- This file is part of the asset management system, contributing to the visual representation and user interface consistency within the broader architecture of the ChessAnalysis application.
great.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.great.imageset
File Name Summary
Contents.json - Contents.json defines image assets used for classification within the ChessAnalysis project
- It specifies multiple resolutions of the great image, ensuring compatibility across different device scales
- This file is part of the asset management system, facilitating consistent image rendering in the application
- It contributes to the visual representation layer of the project, supporting the user interface by providing necessary graphical resources.
book.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.book.imageset
File Name Summary
Contents.json - Contents.json defines image assets for the ChessAnalysis project, specifying different resolutions of the book.png image for universal use
- It ensures that the application can display the appropriate image scale across various devices, maintaining visual consistency
- This file is part of the asset management system within the project architecture, facilitating efficient image handling and integration within the app's user interface.
inaccuracy.imageset
⦿ ChessAnalysis.Assets.xcassets.Classifications.inaccuracy.imageset
File Name Summary
Contents.json - Contents.json defines image assets for different display scales within the ChessAnalysis project
- It specifies the inaccuracy.png image in universal idiom at 1x, 2x, and 3x scales, ensuring proper display across various device resolutions
- This file is part of the asset management system, contributing to the visual representation of chess move classifications, which is integral to the user interface and experience.
Avatars
⦿ ChessAnalysis.Assets.xcassets.Avatars
File Name Summary
Contents.json - Defines metadata for avatar assets within the ChessAnalysis project, specifying author and version information
- This JSON file is part of the asset management system, ensuring that avatar images are correctly referenced and utilized across the application
- It plays a crucial role in maintaining consistency and organization of visual resources, aligning with the overall architecture by supporting the user interface components of the chess analysis tool.
default.imageset
⦿ ChessAnalysis.Assets.xcassets.Avatars.default.imageset
File Name Summary
Contents.json - Manage avatar assets within the ChessAnalysis project by defining image properties and metadata for the default avatar
- This configuration ensures the avatar maintains its vector representation across different devices, supporting a universal idiom
- The file is part of the asset catalog, facilitating consistent avatar usage throughout the application and aligning with the projects architecture for handling graphical elements efficiently.
TimeControls
⦿ ChessAnalysis.Assets.xcassets.TimeControls
File Name Summary
Contents.json - Defines metadata for time control assets within the ChessAnalysis project, ensuring compatibility and proper rendering in Xcode
- Serves as a configuration file that specifies the author and version information, facilitating asset management and integration
- Plays a crucial role in maintaining consistency across the projects visual components, aiding developers in organizing and updating time control assets efficiently within the broader architecture of the application.
bullet.imageset
⦿ ChessAnalysis.Assets.xcassets.TimeControls.bullet.imageset
File Name Summary
Contents.json - Stores metadata for a bullet time control image used in the ChessAnalysis project
- The JSON configuration ensures the vector representation of the image is preserved across different devices, supporting universal idiom compatibility
- This asset is part of the broader architecture that manages visual elements for various chess time controls, contributing to a consistent and scalable user interface design within the application.
rapid.imageset
⦿ ChessAnalysis.Assets.xcassets.TimeControls.rapid.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the rapid time control in the ChessAnalysis project
- It specifies the use of a scalable vector graphic (SVG) format to ensure high-quality rendering across different devices
- This asset is part of the broader architecture that manages visual elements, contributing to the user interface by providing consistent and scalable imagery for various chess time control options.
blitz.imageset
⦿ ChessAnalysis.Assets.xcassets.TimeControls.blitz.imageset
File Name Summary
Contents.json - Contents.json defines the image asset for the blitz time control in the ChessAnalysis project
- It specifies the use of a scalable vector graphic (SVG) format, ensuring the image maintains quality across different device sizes
- This asset is part of the broader user interface resources, contributing to the visual representation of time controls within the application.
Engine
⦿ ChessAnalysis.Engine
Stockfish
⦿ ChessAnalysis.Engine.Stockfish
File Name Summary
libstockfish.a - InstallationClone the repository and install the necessary dependencies using the package manager of your choice.2
- ConfigurationAdjust the configuration files located in the config directory to suit your environment and requirements.3
-
ExecutionRun the main application script located in the src directory
- Use the command line interface to input any required parameters.4
- OutputThe results will be generated and stored in the output directory, with logs available for review in the logs directory.## ArchitectureThe project is organized into several key components:-src/Contains the core application logic and modules.-config/Houses configuration files for different environments.-tests/Includes unit and integration tests to ensure code quality.-docs/Provides documentation and usage guides.-output/Stores the results and outputs generated by the application.-logs/Contains log files for monitoring and debugging purposes.## Developer OnboardingTo get started with development:1
-
Environment SetupEnsure your development environment meets the prerequisites outlined in the docs/requirements.md.2
- Codebase FamiliarizationReview the architecture and key modules in the src directory
- Pay special attention to the README.md files within each module for specific details.3
-
TestingRun the test suite located in the tests directory to verify your setup.4
- **ContributionFollow the contribution guidelines in CONTRIBUTING.md for submitting changes or enhancements.For further assistance, refer to the documentation in the docs directory or contact the project maintainers.
stockfish_wrapper.h - Facilitates interaction with the Stockfish chess engine by providing functions to start and stop the engine, send UCI commands, and read output lines
- Integrates seamlessly within the ChessAnalysis project architecture, enabling efficient communication with the engine for chess analysis tasks
- Essential for developers to understand the engines lifecycle management and command handling to contribute effectively to the projects chess analysis capabilities.
ChessAnalysisUITests
⦿ ChessAnalysisUITests
File Name Summary
ChessAnalysisUITests.swift - ChessAnalysisUITests.swift conducts UI tests for the ChessAnalysis application, ensuring the app launches correctly and performs efficiently
- It sets up the test environment, manages test execution, and measures launch performance
- This file is integral to maintaining the applications reliability and user experience by automating the testing process, allowing developers to identify and address issues promptly within the projects architecture.
ChessAnalysisUITestsLaunchTests.swift - Conducts UI tests for the Chess Analysis application by verifying the apps launch process
- Ensures the application initializes correctly and captures a screenshot of the launch screen for documentation purposes
- Part of the broader test suite, this component helps maintain application stability and reliability by automating the initial user experience checks
- Essential for developers to validate UI changes without manual testing.
ChessAnalysis.xcodeproj
⦿ ChessAnalysis.xcodeproj
File Name Summary
project.pbxproj - Manage the project configuration for the ChessAnalysis application, defining the build settings, targets, and dependencies
- It organizes the project into main application, unit tests, and UI tests, ensuring proper build phases and resource management
- This setup facilitates efficient development and testing workflows, supporting both debug and release configurations for iOS deployment.
project.xcworkspace
⦿ ChessAnalysis.xcodeproj.project.xcworkspace
File Name Summary
contents.xcworkspacedata - Define the workspace configuration for the ChessAnalysis project, facilitating the organization and management of multiple project files within the Xcode environment
- This setup is crucial for maintaining a structured development process, enabling developers to efficiently navigate and manage the projects components
- It serves as a foundational element in the projects architecture, ensuring seamless integration and collaboration among team members.
ChessAnalysisTests
⦿ ChessAnalysisTests
File Name Summary
ChessAnalysisTests.swift - ChessAnalysisTests.swift serves as a testing suite for the ChessAnalysis module, ensuring the accuracy and reliability of its functionalities
- By utilizing the Testing framework, it allows developers to write and execute test cases, verifying expected outcomes and identifying potential issues
- This file is integral to maintaining code quality and stability, facilitating a smooth onboarding process for developers by providing a structured approach to testing within the project architecture.

Getting Started

Prerequisites

This project requires the following dependencies:

  • Programming Language: Swift
  • IDE: Xcode

Installation

Build ChessAnalysis from the source:

  1. Clone the repository:

    ❯ git clone https://github.com/tarekchaalan/ChessAnalysis
  2. Open project in Xcode:

  3. Build and run:


Roadmap

  • Task 1: Implement multi-threaded analyses - Allow analyzing multiple games in parallel by creating multiple Stockfish engine instances (one per concurrent analysis) and managing a thread pool. This will significantly speed up batch analysis of multiple games.
  • Task 2: Implement incremental analysis persistence - Save analysis results incrementally (every N moves or every X seconds) instead of only at completion. This prevents data loss if analysis is interrupted and allows partial results to be displayed.
  • Task 3: Implement analysis resumption - Add ability to resume interrupted analyses from the last saved move, skipping already-analyzed positions. This improves reliability for long games and allows users to pause/resume analysis.

Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/tarekchaalan/ChessAnalysis
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


License

Chessanalysis is protected under the MIT License.



About

iOS app to analyze games from chess.com for free

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages