Änderungen: - Integration des Taxi-Minispiels mit neuen Routen und Komponenten im Backend und Frontend. - Erstellung von Modellen und Datenbank-Schemas für das Taxi-Spiel, einschließlich TaxiGameState, TaxiLevelStats und TaxiMap. - Erweiterung der Navigationsstruktur und der Benutzeroberfläche, um das Taxi-Spiel und die zugehörigen Tools zu unterstützen. - Aktualisierung der Übersetzungen für das Taxi-Minispiel in Deutsch und Englisch. Diese Anpassungen erweitern die Funktionalität der Anwendung um ein neues Minispiel und verbessern die Benutzererfahrung durch neue Features und Inhalte.
30 lines
906 B
JavaScript
30 lines
906 B
JavaScript
// initializeTaxi.js
|
|
|
|
import TaxiMapService from '../services/taxiMapService.js';
|
|
|
|
const initializeTaxi = async () => {
|
|
try {
|
|
console.log('Initializing Taxi game data...');
|
|
|
|
const taxiMapService = new TaxiMapService();
|
|
|
|
// Initialisiere Map-Typen
|
|
console.log('Initializing taxi map types...');
|
|
await taxiMapService.initializeMapTypes();
|
|
|
|
// Prüfe ob bereits eine Standard-Map existiert
|
|
const existingDefaultMap = await taxiMapService.getDefaultMap();
|
|
if (!existingDefaultMap) {
|
|
console.log('Creating default taxi map...');
|
|
await taxiMapService.createDefaultMap();
|
|
}
|
|
|
|
console.log('Taxi game initialization complete.');
|
|
} catch (error) {
|
|
console.error('Error initializing Taxi game:', error);
|
|
throw error;
|
|
}
|
|
};
|
|
|
|
export default initializeTaxi;
|