1.9. Dragon Sprint 7¶
Assignment: Dragon Sprint 7
Complexity: medium
Time: 34 min
1.9.1. Functional Requirements¶
Create a hero named "Mr. Twardowski":
life points: randomly from 25 to 75
damage: randomly from 1 to 12
character class: default "Warrior"
can take damage
may die
can move around the board
alive texture:
img/twardowski/alive.png
dead texture:
img/twardowski/dead.png
after death, it throws away all the gold and displays the last position
Engage in a life-and-death fight between the hero and the dragon.
1.9.2. Use Case¶
Create dragon with name "Wawelski"
Set Dragon's initial position to x=50, y=100
Set new position to x=10, y=20
Get current position
Move dragon left by 10 and down by 20
Move dragon left by 10 and right by 15
Move dragon right by 15 and up by 5
Move dragon down by 5
Dragon makes damage (random 5-20)
Dragon takes 10 damage
Dragon takes 20 damage
Dragon takes 30 damage
Dragon takes 40 damage
Dragon takes 50 damage
1.9.3. Non-Functional Requirements¶
Commit and push the current state of the repository
Modify the game code from the previous version of the task
Save the code to solve the task in the
dragon
directoryWhen finished, add all files from
dragon
to the repositoryCommit and push changes to a central repository (Github)
1.9.4. Solution¶
Note, that this will spoil your fun and learning