Question
Rogue One-oh-One Key points: Represented as symbols (e.g. players) and graphically (spiders) Events in the game are described Generic data structure Grid Round-based Each round
Rogue One-oh-One
Key points:
-
Represented as symbols (e.g. players) and graphically (spiders)
-
Events in the game are described
-
Generic data structure Grid
-
Round-based
-
Each round gets all the stuff on the board doing something
Elements:
The game:
-
Moving the player around in a map, finding and picking up a medallion (necessary to get out of the maze)
-
Reaching the end position to for escaping the maze
-
If the player dies, the game is over
-
Contains of how the player moves and how it interacts with players and things
-
The map and actors and things are displayed on the screen using graphics and text; events are printet to the screen
Map:
-
Each grid contains maximum of one player, varying number of things on each grid
-
Can move each round
-
Walls of the maze is also things
-
Example: a grid can contain a wall, or a player and a carrot, or a rabbit, a carrot and dust
-
Things and actors are up to us
Things:
-
No effect on their own
-
Dust, carrot, walls and the amulet we should also add gold
-
All items has HP, negative HP is damaged, and when damaging a thing, their HP values will decrease
Aktors:
-
Players inherit all the moves of things, but can also move around the board
-
Can use desktop tems they find, and use them to have an effect on the game
-
Different players may be interested in different things, and different things have different effects on the game
-
The code provided contains the players rabbit, spider and player
-
All players have HP
-
When a player gets injucred, the HP value decreases, and if it is low enough, the player will die
Rabbit:
-
When you run the code as it is now, the map is filled with lots of rabbits
-
Each round, the rabbit can move around the map
-
After a few rounds, the rabbits die of hunger
-
Must eat carrot every round
-
HP is reduced every round
Spider:
-
Spider can move each round
-
Scary creatures, be careful
-
Fight against them?
Player:
-
Player class
-
Navigate freely around the map, explore the new world
The player reads input from the input from the keyboard. Depending on the input, the player can:
-
Move NORTH / SOUTH / EAST / WEST on the map
-
Attack another player on a route that the player can move in the direction of
-
Pick up a thing from the same route as yourself
-
Put one thing on the same route as oneself
Interactions:
Rules for attack and defense
-
Each cell has maximum 1 player
-
Example: actor A is in cell (x,y). A tries to move to cell (dx, dy) were it is a actor B. A will attack B
-
Each player has an attack and defense value
-
Attack succeeds if attack value on A is higher than the defense value of B
-
If the attack is unsuccessful, nothing happens
-
If successfull, A will damage B based on the damage value of A.
-
If HP goes under 0, the player dies. The attacker will moves to the cell where the other player died.
Task:
How would you abstract things from the description? Write down 5 properties or methods that you think must be part of an interface that abstracts "things" on the gameboard and brief justification for each of them.
Level:4 Hits:29(29) Str:16 (16) Gold:718 Armor:5 Exp: 4/76 Level:4 Hits:29(29) Str:16 (16) Gold:718 Armor:5 Exp: 4/76Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started