Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trees = [
- 'береза повислая',
- 'клен ясенелистный',
- 'ясень пенсельванский',
- 'ива козья',
- 'осина обыкновеная'
- ]
- def position
- positions_single = [
- 'урез воды',
- 'мост'
- ]
- positions_plural = [
- 'м до уреза воды',
- 'м до моста'
- ]
- range = rand(0..5)
- if range.zero?
- positions_single.sample
- else
- "#{range} #{positions_plural.sample}"
- end
- end
- def random_trees
- trees_num = rand(1..4)
- trees = []
- trees_num.times do
- trees << 5 + rand(20)
- end
- "#{trees_num} #{trees.join(',')}"
- end
- (1..5).each do |i|
- p "#{i} #{trees.sample} #{random_trees} #{position}"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement