Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major upgrades. the game is now playable
- Loading branch information
Showing
9 changed files
with
290 additions
and
141 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
class Drug | ||
attr_accessor :name, :price, :quantity | ||
|
||
TYPES = ["weed", "ecstacy", "shrooms", "oxycotin", "acid", "ruffy", "crack", "cocaine", "heroin", "crystal meth"] | ||
TYPES = ["weed", "ecstacy", "shrooms", "oxycotin", "acid", "ruffies", "crack", "cocaine", "heroin", "crystal meth"] | ||
|
||
def can_be_sold? | ||
true | ||
def self.street_price | ||
rand(500) + 10 | ||
end | ||
|
||
def initialize(defaults = {}) | ||
defaults.each_pair { |key,value| instance_variable_set("@#{key}", value) } | ||
end | ||
|
||
def self.display_price | ||
rand(500) + 10 | ||
def can_be_sold? | ||
true | ||
end | ||
|
||
end |
This file contains 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
This file contains 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
Oops, something went wrong.