Add chess games over channel data

Play and watch chess on a channel via the Chess games entry in the
channel overflow menu. Moves travel as GRP_DATA packets (type 0x0100)
carrying the full position and a hash-chain value for authentication.
Includes translations for all locales.
This commit is contained in:
zjs81 committed 2026-11-22 17:00:35 -07:00
1 parent 9ac915bdf2
commit 185b026a0d
66 files changed
+15314 -25

No files matched your search

+9
View File
@@ -14,6 +14,8 @@ import 'screens/channels_screen.dart';
import 'utils/platform_info.dart';
import 'connector/meshcore_connector.dart';
import 'games/chess/chess_link.dart';
import 'games/chess/chess_service.dart';
import 'helpers/message_url_image_helper.dart';
import 'models/image_codec_support.dart';
import 'screens/scanner_screen.dart';
@@ -206,6 +208,9 @@ void main() async {
connector: connector,
settings: appSettingsService,
);
final chessService = ChessService(
link: ConnectorChessLink(connector, settings: appSettingsService),
);
await connector.restoreLastRadio();
@@ -227,6 +232,7 @@ void main() async {
receivedImageStore: receivedImageStore,
imageReassembler: imageReassembler,
networkMapUploadService: networkMapUploadService,
chessService: chessService,
chatBackgroundService: chatBackgroundService,
messageFilterService: messageFilterService,
),
@@ -374,6 +380,7 @@ class MeshCoreApp extends StatefulWidget {
final ReceivedImageStore receivedImageStore;
final ImageStreamReassembler imageReassembler;
final NetworkMapUploadService networkMapUploadService;
final ChessService chessService;
final ChatBackgroundService chatBackgroundService;
final MessageFilterService messageFilterService;
@@ -395,6 +402,7 @@ class MeshCoreApp extends StatefulWidget {
required this.receivedImageStore,
required this.imageReassembler,
required this.networkMapUploadService,
required this.chessService,
required this.chatBackgroundService,
required this.messageFilterService,
});
@@ -506,6 +514,7 @@ class _MeshCoreAppState extends State<MeshCoreApp> with WidgetsBindingObserver {
ChangeNotifierProvider.value(value: widget.imageCodecService),
ChangeNotifierProvider.value(value: widget.receivedImageStore),
ChangeNotifierProvider.value(value: widget.networkMapUploadService),
ChangeNotifierProvider.value(value: widget.chessService),
ChangeNotifierProvider.value(value: widget.chatBackgroundService),
ChangeNotifierProvider.value(value: widget.messageFilterService),
],