Ajout d'un début de jeu

This commit is contained in:
2024-11-16 13:49:24 +01:00
parent 22cf8adf3f
commit 7efc59c862
8 changed files with 559 additions and 21 deletions

View File

@@ -113,7 +113,16 @@ public class GameModeSelectionPanel extends JPanel {
return seedPanel;
}
public String getSeed() {
public String getStringSeed() {
return seedField.getText();
}
public long getLongSeed(){
try{
return Long.parseLong(seedField.getText());
} catch (NumberFormatException e){
System.err.println("Invalid seed, using current time as seed");
return System.currentTimeMillis();
}
}
}