Date post: | 02-Jan-2016 |
Category: |
Documents |
Upload: | martin-blake |
View: | 24 times |
Download: | 1 times |
GCSE ComputingWorking with numbers
Challenge•‘Crimson Mystical Mages’ is a fantasy
role playing board game.
•You need to create an electronic program to calculate powers for players.
Challenge•A player gets powers by rolling two dice.
•1 is a 4 sided dice, the other is a 12 sided dice.
•The person’s power is the score of the 12 sided dice divided by the score on the 4 sided dice PLUS 10.
Challenge•You need to create a program which
calculates a person’s power score
•It must simulate the throwing of both dice
•Then calculate the score and tell the player
Challenge•There is some help..... Visual Basic does
the dice job for you.....
Random Numbers•RND is a function in visual basic
•It randomly generates a number greater than 0 but smaller than 1
•e.g. 0.2, 0.91, 0.456, 0.01......
Random Numbers•Dim Result as integer
•To create a number between 1 and 6....
•Result = Int((6 * Rnd) + 1)
Combat•When there is an encounter between two
characters a battle occurs!
•the outcome is determined by the following process:
Combat•The differences between the power score
for the two characters is calculated
•This difference is divided by 2 and then rounded down to create a ‘strength modifier’
•Then each player rolls a 6 sided dice
Combat•Whoever has the highest score gets the
strength score added to their power score.
•The loser gets the strength score subtracted from their power score.