This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def banner | |
File.open("banner.txt").each do |line| | |
puts line | |
end | |
end | |
banner | |
#super player/AI class | |
class Gamesuper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Text Adventure ## | |
=begin | |
Project Mission | |
*********************** | |
NPC/Player creation | |
- Create races | |
- Create classes | |
- Create NPC | |
- Create Mobs | |
*********************** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. | |
Subgoal | |
Adjust your program so that if the user does not type in a number when they need to, | |
the program will keep prompting them to type in a real number until they do so. | |
Put the program into a loop so that the user can continue to simulate dice rolls without having to restart the entire program. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##random number | |
=begin | |
Goal | |
By using the random module, python can do things like pseudo-random number generation. | |
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##random number | |
=begin | |
Goal | |
By using the random module, python can do things like pseudo-random number generation. | |
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##random number | |
=begin | |
Goal | |
By using the random module, python can do things like pseudo-random number generation. | |
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##random number | |
=begin | |
Goal | |
By using the random module, python can do things like pseudo-random number generation. | |
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##random number | |
=begin | |
Goal | |
By using the random module, python can do things like pseudo-random number generation. | |
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##random number | |
=begin | |
Goal | |
By using the random module, python can do things like pseudo-random number generation. | |
So in this program, allow the user to input the amount of sides on a dice and how many times it should be rolled. | |
From there, your program should simulate dice rolls and keep track of how many times each number comes up (this does not have to be displayed). | |
After that, print out how many times each number came up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Turn based ruby game | |
=begin | |
GOAL | |
Write a simple game that allows the user and the computer to take turns selecting moves to use against each other. | |
Both the computer and the player should start out at the same amount of health (such as 100), | |
and should be able to choose between the three moves: | |
The first move should do moderate damage and has a small range (such as 18-25). |
OlderNewer