Skip to content

Database layer #47

Merged
merged 14 commits into from
Mar 24, 2026
Merged

Database layer #47

merged 14 commits into from
Mar 24, 2026

Conversation

benjamls
Copy link
Member

This merge request adds the databse layer implementing the multiplayer aspect of the game. It also improves the code in various ways

benjamls added 14 commits March 23, 2026 14:32
- Implement lobby creation/joining with Firebase
- Add confirmSetup with board encoding and bothReady synchronization
- Implement saveMove and listenForOpponentMove with player filtering
- Add getOpponentBoard for retrieving enemy piece positions
- Add listenForGameStart for synchronized game transition
- Store boards as flat list of {col, row, piece} entries
- Create AndroidFirebase instance and inject into DatabaseManager singleton
- Pass Firebase implementation to Main game instance for multiplayer support
- Enable immersive mode for full-screen gameplay
- Implement thread-safe singleton pattern for database management
- Provide init method for FirebaseAPI injection from AndroidLauncher
- Add getApi method for accessing Firebase functionality across screens
- Add confirmSetup with board encoding for setup phase synchronization
- Add getOpponentBoard for retrieving opponent piece positions
- Add saveMove with player identification for turn tracking
- Add listenForOpponentMove with isWhite field for move filtering
- Add listenForOpponentReady for lobby synchronization
- Add listenForGameStart for simultaneous game transition
- Define generic Callback interface for async operations
@benjamls benjamls merged commit f4094c6 into development Mar 24, 2026
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant