Skip to content

Simple card game#12

Open
ezekielelvis wants to merge 35 commits intomasterfrom
simple-card-game
Open

Simple card game#12
ezekielelvis wants to merge 35 commits intomasterfrom
simple-card-game

Conversation

@ezekielelvis
Copy link
Contributor

This pull request introduces a new card game project using the XTC language, including a complete implementation of the "Eights" card game, Gradle build configuration, and initial test scaffolding. The main themes are project setup, game logic implementation, and build tooling integration.

Project Setup and Build Tooling:

  • Added Gradle build configuration files (build.gradle.kts, settings.gradle.kts, gradle.properties, libs.versions.toml, Gradle wrapper scripts) to enable building and running the project with XTC and XDK dependencies. [1] [2] [3] [4] [5] [6] [7]
  • Created a .gitignore file to exclude build artifacts, IDE settings, and OS-specific files.

Card Game Logic Implementation:

  • Implemented core card game classes in XTC: Card, CardCollection, Deck, Hand, Player, and Eights, encapsulating the logic for representing cards, managing collections of cards, player actions, and game flow. [1] [2] [3] [4] [5] [6]
  • Added a module entry point (cardGame.examples.org) with a run method to start a default game between two players.

Testing:

  • Added an initial test module CardGameTest with a placeholder test class for future application logic tests.

ezekielelvis and others added 30 commits January 9, 2026 15:13
- Added gradle-wrapper.jar to enable Gradle wrapper functionality.
- Created gradle-wrapper.properties to specify distribution URL and settings.
- Added gradlew shell script for Unix-based systems to facilitate Gradle execution.
- Introduced gradlew.bat for Windows users to run Gradle commands easily.
- Deleted ChessGame.x, ChessPieces.x, OnlineChess.x, chess.x, chessLogic.x modules.
- Removed all associated game logic, piece validation, online multiplayer handling, and API services.
- This cleanup prepares the codebase for a new architecture or implementation.
- Added last move highlighting and valid move indicators.
- Improved layout and styling for better responsiveness.
- Introduced collapsible panels for game details and chat.
- Implemented chat feature for multiplayer mode with message history and polling.
- Refined button styles and typography for a modern look.
- Adjusted padding and margins for a cleaner interface.
- Introduced CSS variables for consistent theming
- Implemented reset and base styles for a clean layout
- Designed mode tabs for single and multiplayer modes
- Created styles for game container, status bar, and board
- Enhanced toolbar and button styles for better user interaction
- Developed responsive design adjustments for mobile devices
- Added styles for chat functionality and info popovers
- Included animations for interactive elements like buttons and status indicators
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ctionality

- Implemented move history tracking and rendering in a dedicated panel.
- Added time control modal for setting game time and increment options.
- Enhanced game end modal to display results and scores based on game status.
- Updated styles for move history and modals for improved UI/UX.
- Refactored time control logic to handle online and single-player modes.
- Improved time formatting and display during gameplay.
- Added ChessAPIClient service to handle communication with the Stockfish Online API for AI-driven chess moves.
- Removed EvaluationConfig as it is no longer needed with the new API integration.
- Updated ChessApi to utilize the new ChessAPIClient for automated opponent moves.
- Refactored ChessGame and ChessLogic to accommodate the new AI move selection method.
- Simplified material balance calculation in BoardOperations by removing dependency on EvaluationConfig.
…es and remove evaluation constants

- Consolidated evaluation logic into AIPositionEvaluator, AISearchEngine, AIOpeningBook, AIMoveSelector, and AIUtility.
- Removed EvaluationConfig file and integrated scoring constants directly into the respective services.
- Updated methods in ChessAPIClient to utilize the new service architecture for piece value retrieval, positional scoring, and move selection.
- Enhanced code readability and maintainability by reducing hard-coded values and centralizing logic.
Refactor CardGame module to cardGame.examples.org and update run method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant