ICS4U – Ms.
Huynh
TREASURE QUEST – Power Ups
Game Concept
There are hidden mines on a grid that the player must avoid. The player searches for hidden
treasures scattered on the grid. Each move depletes the player’s power, and they must find power-
ups to replenish it. If the power runs out, the game is over.
Key Features
1. Grid-based Gameplay: The game takes place on a 2D grid, where each cell can hide a mine,
treasure, power up, or be empty.
2. Movement: To explore the grid, the player can move in four directions: up(W), down (S), left
(A), and right(L).
3. Mines: Stepping on a mine lost one life.
4. Treasure: Finding a treasure gives points.
5. Power: Every move reduces the player's power (by 1 point), but finding a power-up replenishes
it. If power reaches zero, the game is over.
6. Win Condition: The player wins by collecting all the treasures on the grid.
7. Lost: when the player has no life.
Game Mechanics Breakdown
1. Grid Initialization
- The player starts with one life.
- Initialize a grid (e.g., 10x10 or 7x7 or 5x5) with random placement of the following:
- Mines (*): lost one life for each trap, 20 points can be used for an additional life.
- Treasures ($): each treasure adds 50 points
- Power-ups (P): For each power, add 1 life.
- Empty spaces
- The number of each can vary, but here’s an example distribution for an 8x8 grid:
- 10 mines.
- 5 treasures
- 3 power-ups
- Rest empty cells
2. Player Stats
Position: The player starts at a random non-mine, non-treasure, and non-power-up position on the
grid. The symbol + indicates where the player is.
- Power Level: one life.
- Score: equals to number of the titles, and increases when a treasure is found.
3. Player Movement
- Player moves by inputting directions: ‘W’ (up), ‘S’ (down), ‘A’ (left), ‘D’ (right).
- Each move:
- Reveals the contents of the chosen cell.
- Reduces score by 1.
- Appropriate actions are taken if the cell contains a treasure, power-up, or mine.
ICS4U – Ms. Huynh
4. Cell Contents
- Mine: Immediate loss of one life, place * symbol on the grid to indicate the mine has already been
disabled.
- Treasure: Increases the player's score by a fixed value (e.g., 50 points per treasure). Place $ on
the grid to indicate the treasure already taken.
- Power-up: Increases power (e.g., +20 points), put P symbol to indicate the Power is already
token.
- Empty: Depletes 1 point, nothing happens.
5. Game End
- Victory: The player collects all treasures or reaches a certain score.
- Loss: Stepping on a mine or power dropping to 0.
6. Additional Features
Difficulty Levels: Players can choose difficulty levels, which change the number of mines,
treasures, and power-ups.
- Time Limit: Introduce a timer to increase pressure on the player.
- Persistent data: If the player wins, ask for the name and store the user name and their score in a
file so that it will be displayed at the beginning of each game.
Note: The grid should be displayed at the beginning of the game, after a move, and at the final
statement (winner or loss), showing all the hidden features that have yet to be discovered.
Classes and methods:
- You should create three classes at least to organize your code.
o Board class
o Player class
o GameControl class (main method is written in this class), this GameControl will have
two instance objects of the other two classes.
ICS4U – Ms. Huynh
Marking Rubric Student Name: ________________________
Poor Fair Good Great
Criteria
(1) (2) (3) (4)
Requirements
1-5 [10 marks]
Requirements
6 [6 marks]
Style Rules 4+ style rules 2 or 3 style rules 1 style rule broken Perfect style! All
(1 10) broken or needing are broken or need or needing style rules have
[4 marks] improvement. improvement. improvement. been followed.
This is good, but
Program Design, Poor, missing Fair, need to there is some
Efficiency, and Excellent mainline
mainline logic, significantly on room for
logic design; code
methods and inefficient code, mainline logic, improvement in
is efficient and
class Structure and/or poorly efficiency, and/or mainline logic,
well organized.
[4 marks] organized code. code organization. efficiency, and/or
code organization.
Overall Mark: /24 (T)