Skip to content

Conversation

Copy link

Copilot AI commented May 20, 2025

This PR adds a reference implementation for the Achievables library that demonstrates how to use the interfaces for a CLI-based application. The implementation includes:

Components

  • ReferencePlayer - A simple implementation of AchievablePlayer interface
  • ReferenceAchievableManager - In-memory implementation of AchievableManager
  • TestEvent - Sample event implementation for testing
  • AchievablesCLI - Command-line interface for interacting with the Achievables library
  • example.bigal - Sample BIGAL script demonstrating achievable definition

Features

The reference implementation provides:

  • CLI-based way to register Achievables from BIGAL files
  • Submit Events and process them through the Achievables system
  • Test Achievables interactively by checking state and completion status
  • In-memory storage of achievement states and player progress

Documentation

Added REFERENCE.md that explains how to use the reference implementation and its CLI commands:

  • register <file> - Register an achievable from a BIGAL file
  • player add/list/remove - Manage players
  • event <type> <player> <data> - Submit events
  • status <player> - Check achievement status
  • state <player> <uuid> - View player-specific achievement state

All changes are contained within the new us.mcparks.achievables.reference package and do not modify any existing code.

Fixes #3.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • plugins-artifacts.gradle.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /usr/share/gradle-8.14/lib/gradle-daemon-main-8.14.jar -javaagent:/usr/share/gradle-8.14/lib/agents/gradle-instrumentation-agent-8.14.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Reference Implementation Implement Reference Implementation for Achievables Library May 20, 2025
Copilot AI requested a review from RyanHecht May 20, 2025 17:02
@RyanHecht
Copy link
Member

@copilot Let's add some tests!

Copy link
Author

Copilot AI commented May 20, 2025

@copilot Let's add some tests!

Added comprehensive tests for the reference implementation in commit d116349. The test suite includes unit tests for ReferencePlayer, TestEvent, and ReferenceAchievableManager classes, covering basic functionality, state management, and event processing.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • plugins-artifacts.gradle.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /usr/share/gradle-8.14/lib/gradle-daemon-main-8.14.jar -javaagent:/usr/share/gradle-8.14/lib/agents/gradle-instrumentation-agent-8.14.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

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.

Reference Implementation

2 participants