1.7. Dragon Sprint 5
Name: Dragon Sprint 5
Difficulty: medium
Lines: ?
Minutes: 34
1.7.1. Functional Requirements
Add the ability to move in 3 dimensions
Going higher, you add
z
(flying)As you go deeper, you subtract
z
(diving)
Can't go beyond the screen area:
x
axis from 0 to 1920y
axis from 0 to 1080z
axis from -100 to +100
- If the character reaches the edge of the screen, then by moving further,
the position will be set to the marginal value in a given axis. For example, the dragon is in position
x=1, y=2
and moves left at 10 then after the move it will end in positionx=0, y=2
.
1.7.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.7.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)