How stuff1do/canyousurviveanaiapocalypse- works
This is a Java Swing quiz game about surviving an AI apocalypse, with a separate command-line mode. Players enter through the splash/menu flow, select a host, answer questions that advance through difficulty tiers, use lifelines, and reach withdrawal, checkpoint, game-over, or victory outcomes. QuestionLoader parses the bundled question bank, while StateManager tracks the playthrough. The tree and excerpts establish the main GUI wiring and some gameplay behavior; several screen and terminal implementations were not sampled, so their internal transitions are not detailed here.
Main entry points: App.java App entry · GameplayPanel.java Gameplay · ProgressPanel.java Progress screen · QuestionLoader.java Question loader
Components 19
Entry and modes
- App entry
src/main/java/com/cysaaa/App.java - Terminal mode
src/main/java/com/cysaaa/terminal/TApp.java
Game experience
- Splash screen
src/main/java/com/cysaaa/gui/screens/SplashScreenPanel.java - Main menu
src/main/java/com/cysaaa/gui/screens/MainMenuPanel.java - Instructions
src/main/java/com/cysaaa/gui/screens/InstructionsPanel.java - Host selection
src/main/java/com/cysaaa/gui/screens/HostSelectionPanel.java - Gameplay
src/main/java/com/cysaaa/gui/screens/GameplayPanel.java - Progress screen
src/main/java/com/cysaaa/gui/screens/ProgressPanel.java - Game over
src/main/java/com/cysaaa/gui/screens/GameOverPanel.java - Checkpoint endings
src/main/java/com/cysaaa/gui/screens/CyberneticScreen.java - Synthetic ending
src/main/java/com/cysaaa/gui/screens/SyntheticScreen.java - Victory ending
src/main/java/com/cysaaa/gui/screens/VictoryScreen.java - UI components
src/main/java/com/cysaaa/gui/components/ImagePanel.java
Questions and state
- Question loader
src/main/java/com/cysaaa/util/QuestionLoader.java - Question model
src/main/java/com/cysaaa/util/Question.java - Game state
src/main/java/com/cysaaa/util/StateManager.java - Lifeline definitions
src/main/java/com/cysaaa/util/Lifeline.java
Game resources
- Question bank
src/main/resources/data/questions.csv
Other components
- Player
Connections 27
- Player → App entry: starts
- App entry → Terminal mode: runs with arguments
- App entry → Question loader: loads questions
- Question loader → Question bank: reads CSV
- Question loader → Question model: creates questions
- App entry → Splash screen: constructs screen
- App entry → Main menu: constructs screen
- App entry → Instructions: constructs screen
- App entry → Host selection: constructs screen
- App entry → Gameplay: constructs screen
- App entry → Progress screen: constructs screen
- App entry → Game over: constructs screen
- App entry → Checkpoint endings: constructs screen
- App entry → Synthetic ending: constructs screen
- App entry → Victory ending: constructs screen
- Player → Splash screen: views and interacts
- Player → Terminal mode: uses CLI
- Host selection → Progress screen: selects host
- Progress screen → Gameplay: continues play
- Gameplay → Game state: reads and updates
- Gameplay → Lifeline definitions: uses definitions
- Gameplay → Game over: ends play
- Gameplay → Checkpoint endings: reaches checkpoint
- Gameplay → Synthetic ending: reaches ending
- Gameplay → Victory ending: wins game
- Splash screen → UI components: uses components
- Progress screen → UI components: uses components