42 lines
1.9 KiB
Plaintext
42 lines
1.9 KiB
Plaintext
lesson 1:
|
|
- static initializer in Mines.java (static block initializing RANDOM_GENERATOR)
|
|
- static initializer in MinesUI.java (static block initializing BUTTON_THEMES)
|
|
- constructor overloading demonstrated across project (e.g., RandomNumberGenerator and Mines constructors)
|
|
|
|
lesson 2:
|
|
- inheritance: Mines extends GameBoard (GameBoard.java → Mines.java)
|
|
- custom exception class: InvalidMoveException (thrown in Mines.reveal)
|
|
- throwing exceptions in Mines.reveal()
|
|
- catching exceptions in MinesUI.handleReveal() within UI logic
|
|
|
|
lesson 3:
|
|
- method overriding: Mines overrides abstract GameBoard.reset()
|
|
- substitution: GameBoard constructor called via super(width, height) inside Mines
|
|
|
|
lesson 4:
|
|
- abstract class: GameBoard.java
|
|
- abstract method: reset() defined in GameBoard
|
|
- implementation of abstract method in Mines.reset()
|
|
|
|
lesson 5:
|
|
- collections: MinesUI stores buttons in List<Button> (ArrayList)
|
|
- iterators: MinesUI.disableAllButtons() uses Iterator<Button>
|
|
|
|
lesson 6:
|
|
- lambda expressions: Mines.forEachNeighbor() uses Consumer<Integer> with lambdas
|
|
- lambda expressions: MinesUI.createGrid() uses lambdas for event handlers (setOnMouseEntered, setOnMouseExited, setOnMouseClicked)
|
|
|
|
lesson 8:
|
|
- file reading: MinesScore.readScoresFromFile() uses BufferedReader and FileReader
|
|
- file writing: MinesScore.appendScoreToFile() uses BufferedWriter and FileWriter
|
|
- parsing and formatting data via DateTimeFormatter
|
|
- path management using String file paths (e.g., SCORE_FILE)
|
|
- Scanner usage present in Main CLI for input collection
|
|
|
|
lesson 9:
|
|
- JavaFX application structure: MyGame extends Application and overrides start()
|
|
- JavaFX UI design: MinesUI builds scenes, stages, layouts, buttons, labels, handlers
|
|
|
|
lesson 10:
|
|
- JUnit tests included in external test files (MinesTest, MinesScoreTest, etc.)
|