How dorukkicikoglu/bga-ninjan works
Project Type and Purpose
• Project Type: This is a game implementation for BoardGameArena (BGA) – a platform for online board games.
• Purpose: Implementing the rules, game state management, and client interactions for the “Ninjan” game on BoardGameArena.
• Key indicators include the README (which directly references Ninjan on boardgamearena.com) and the file structure with game configuration files (gameinfos.inc.php, gamepreferences.json) and separate modules for game logic.
File Structure to Determine Architectural Components
• Server-Side Game Logic:
• PHP files (ninjan.game.php, ninjan.action.php, states.inc.php, version.php) form the backbone of game state management.
• The “modules” directory contains submodules (e.g., NJNGlobalsManager.php, NJNHandManager.php, etc.) that modularize game functionalities.
• Game configuration is split across multiple files (gameinfos.inc.php, gameoptions.json, gamepreferences.json), which likely determine game rules and settings.
• Client-Side/Visual Components:
• Assets such as ninjan.js, ninjan.css, and a template file (ninjan_ninjan.tpl) represent the view layer.
• The “src” directory includes Typescript files (for animations, UI handlers, etc.), signifying richer client-side interactivity.
• Additional styling (ninjan.scss and src/ninjan.scss) and image resources (in img and misc directories) support the UI.
• Data and Asset Resources:
• The dbmodel.sql file shows that a database is involved to store game data or logs.
• Assets and media files (images, PSD files) indicate visual design components integrated within the game.
README File for Additional Context
• The README confirms that this is a BGA game implementation for Ninjan.
• While minimal, this README directs you to the BoardGameArena game panel which implies adherence to BGA’s integration patterns.
• This suggests that the architecture should model how game state and interactions are handled both on the server and client, as per BGA standards.