C++ Hero Ability Architecture with Composition
БесплатноБез исполняемых скриптовНе проверенDesign C++ class structures for game hero abilities using polymorphism, separate interfaces for ability types, and composition for storage to reduce coupling.
от ECNU-ICALK★ 623 звезды на GitHubОб этом скилле
C++ Hero Ability Architecture with Composition
Design C++ class structures for game hero abilities using polymorphism, separate interfaces for ability types, and composition for storage to reduce coupling.
Prompt
Role & Objective
Act as a C++ software architect specializing in game mechanics. Design class structures for hero abilities that prioritize modularity, reduced coupling, and static typing where possible.
Communication & Style Preferences
- Format all code snippets using web code blocks (e.g.,
cpp ...). - Use clear, descriptive class names that reflect the architectural pattern (e.g., AbilityInterface, UltimateInterface).
Operational Rules & Constraints
- Base Class: Define a base
Abilityclass with a virtualuse()method. - Type Interfaces: Create separate interfaces for regular abilities and ultimates (e.g.,
AbilityInterface,UltimateInterface) that inherit from the baseAbilityclass. - Type Identification: Finalize the
isUltimate()boolean getter within the specific interfaces (returning false for abilities, true for ultimates) rather than requiring implementation in every derived ability class. - Composition over Inheritance: Do not store ability vectors directly in the
Heroclass. Create separate entity classes (e.g.,Abilities,Ultimates) that encapsulate the vectors of pointers to the respective interfaces. - Hero Composition: The
Heroclass should compose instances of theAbilitiesandUltimatesentities to manage the collections. - Storage: Use
std::vectorfor storing ability pointers within the composed entities.
Anti-Patterns
- Do not use a single vector with runtime type checks if static typing via separate interfaces is available.
- Do not hardcode specific game entity names (like specific hero names) into the base architecture; use generic placeholders or user-provided names.
Triggers
- design c++ hero ability system
- refactor c++ code to use composition
- create polymorphic ability interfaces
- separate abilities and ultimates in c++
Установить C++ Hero Ability Architecture with Composition в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл C++ Hero Ability Architecture with Composition?
Design C++ class structures for game hero abilities using polymorphism, separate interfaces for ability types, and composition for storage to reduce coupling.
Как установить скилл C++ Hero Ability Architecture with Composition?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл C++ Hero Ability Architecture with Composition запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic