This commit is contained in:
B00M360
2026-03-28 14:37:13 +01:00
parent 6de8ca830e
commit 607ee1fff4
2 changed files with 4 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ public class GestionnaireNiveau {
public GestionnaireNiveau() {
try {
//chargement driver
Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
System.err.println("[BDD] Impossible de charger le driver SQLite.");
@@ -79,6 +80,7 @@ public class GestionnaireNiveau {
}
return false;
}
//transition smooth entre les niveau
public Niveau getNiveauActuel() {
return niveaux.get(indexNiveau);

View File

@@ -8,6 +8,7 @@ public class GestionnaireScore {
public GestionnaireScore() {
try {
//chargement driver SQLite
Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
System.err.println("[BDD] Impossible de charger le driver SQLite.");
@@ -25,6 +26,7 @@ public class GestionnaireScore {
try (Connection conn = DriverManager.getConnection(URL);
PreparedStatement pstmt = conn.prepareStatement(sql)) {
//contre injection SQL
pstmt.setString(1, nom.trim());
pstmt.setInt(2, points);
pstmt.executeUpdate();