-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathland.rb
More file actions
49 lines (38 loc) · 688 Bytes
/
land.rb
File metadata and controls
49 lines (38 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Map the different types of land we can buy and the player class
# available?
# sell
# calculate_rent
require './tile'
class Land < Tile
def initialize(name,value, rent)
super(name)
@available = true
@value = value
@rent = rent
@owner = nil
# @buyable = true
end
def available?
@available
end
# # check_available better call check_availability
# return "the land is for sale" if land.empty?
# return "land isn't for sale"
def value
@value
end
def rent
@rent
end
end
# def land.availability_status
# "sold"
# end
# def land.available?
# true
# end
# if availble?
# puts "the land is for sale"
# else
# puts "land isn't for sale"
# end.