feat: Implement save game functionality with encoding/decoding
- Added SaveGameCodec for encoding and decoding save game files. - Introduced SaveGamePersistence interface for slot-based save game persistence. - Implemented FlutterSaveGamePersistence for file-based save management on Flutter. - Enhanced WolfEngine to support saving and loading game states. - Updated menu manager to include save/load game options. - Created tests for SaveGameCodec to ensure proper functionality. Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:wolf_3d_cli/cli_game_loop.dart';
|
||||
import 'package:wolf_3d_cli/cli_renderer_settings_persistence.dart';
|
||||
import 'package:wolf_3d_cli/cli_save_game_persistence.dart';
|
||||
import 'package:wolf_3d_dart/wolf_3d_data.dart';
|
||||
import 'package:wolf_3d_dart/wolf_3d_data_types.dart';
|
||||
import 'package:wolf_3d_dart/wolf_3d_engine.dart';
|
||||
@@ -63,6 +64,7 @@ void main() async {
|
||||
input: CliInput(),
|
||||
onGameWon: () => stopAndExit(0),
|
||||
onQuit: () => stopAndExit(0),
|
||||
saveGamePersistence: CliSaveGamePersistence(),
|
||||
);
|
||||
|
||||
engine.init();
|
||||
|
||||
Reference in New Issue
Block a user