|
RuneHive-Game
|
Handles displaying the puzzle. More...
Public Member Functions | |
| boolean | click (int button) |
| Handles clicking on the puzzle interface. | |
| void | open (PuzzleType puzzleType) |
| Opens the puzzle interface. | |
| PuzzleDisplay (Player player) | |
Constructs a new PuzzleDisplay. | |
Package Attributes | |
| int | successCount |
| The success count. | |
Private Member Functions | |
| boolean | checkAnswer (int button) |
| Checks the puzzle answer. | |
| void | randomize () |
| Randomize the puzzle. | |
Private Attributes | |
| int[] | options |
| The options array. | |
| final Player | player |
| The player instance. | |
| PuzzleData | puzzle |
| The puzzle data. | |
| PuzzleType | type |
| The puzzle type. | |
Handles displaying the puzzle.
Definition at line 12 of file PuzzleDisplay.java.
| com.runehive.content.puzzle.PuzzleDisplay.PuzzleDisplay | ( | Player | player | ) |
Constructs a new PuzzleDisplay.
Definition at line 29 of file PuzzleDisplay.java.
References player.
|
private |
Checks the puzzle answer.
Definition at line 55 of file PuzzleDisplay.java.
References options, and puzzle.
Referenced by click().
| boolean com.runehive.content.puzzle.PuzzleDisplay.click | ( | int | button | ) |
Handles clicking on the puzzle interface.
Definition at line 62 of file PuzzleDisplay.java.
References checkAnswer(), player, successCount, and type.
| void com.runehive.content.puzzle.PuzzleDisplay.open | ( | PuzzleType | puzzleType | ) |
Opens the puzzle interface.
Definition at line 40 of file PuzzleDisplay.java.
References options, player, puzzle, randomize(), and type.
Referenced by com.runehive.content.bloodmoney.BloodMoneyChest.open().
|
private |
Randomize the puzzle.
Definition at line 34 of file PuzzleDisplay.java.
References puzzle, com.runehive.content.puzzle.PuzzleData.PUZZLES, and com.runehive.util.Utility.shuffleArray().
Referenced by open().
|
private |
The options array.
Definition at line 20 of file PuzzleDisplay.java.
Referenced by checkAnswer(), and open().
|
private |
The player instance.
Definition at line 14 of file PuzzleDisplay.java.
Referenced by click(), open(), and PuzzleDisplay().
|
private |
The puzzle data.
Definition at line 17 of file PuzzleDisplay.java.
Referenced by checkAnswer(), open(), and randomize().
|
package |
|
private |
The puzzle type.
Definition at line 23 of file PuzzleDisplay.java.