greyhawkweather 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +12 -0
- data/Manifest.txt +39 -0
- data/PostInstall.txt +7 -0
- data/README.rdoc +52 -0
- data/Rakefile +26 -0
- data/bin/greyweathergen +22 -0
- data/data/baselinedata.yml +120 -0
- data/data/precipitationoccurance.yml +112 -0
- data/lib/baselinedata.rb +28 -0
- data/lib/greyhawkweather.rb +6 -0
- data/lib/greyhawkweathergenerator.rb +15 -0
- data/lib/month.rb +25 -0
- data/lib/precipitation.rb +16 -0
- data/lib/precipitationinfo.rb +32 -0
- data/lib/precipitationoccurance.rb +83 -0
- data/lib/singledayweather.rb +29 -0
- data/lib/skyconditions.rb +15 -0
- data/lib/temperaturerange.rb +26 -0
- data/lib/util/dieroller.rb +11 -0
- data/lib/weathergenerator.rb +44 -0
- data/lib/wind.rb +11 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/test/rollers/avgroller.rb +7 -0
- data/test/rollers/riggedroller.rb +11 -0
- data/test/test_acceptance.rb +36 -0
- data/test/test_dieroller.rb +30 -0
- data/test/test_greyhawkweather.rb +11 -0
- data/test/test_helper.rb +3 -0
- data/test/test_month.rb +36 -0
- data/test/test_precipitation.rb +26 -0
- data/test/test_precipitation_occurance.rb +93 -0
- data/test/test_singledayweather.rb +61 -0
- data/test/test_sky_conditions.rb +23 -0
- data/test/test_temperature_range.rb +30 -0
- data/test/test_weather_generator.rb +59 -0
- data/test/test_wind.rb +11 -0
- data/todo.org +48 -0
- data.tar.gz.sig +0 -0
- metadata +210 -0
- metadata.gz.sig +1 -0
data/test/test_helper.rb
ADDED
data/test/test_month.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'rollers/riggedroller'
|
4
|
+
|
5
|
+
require 'month'
|
6
|
+
|
7
|
+
class TestMonth < Test::Unit::TestCase
|
8
|
+
|
9
|
+
def setup
|
10
|
+
@null_temp_range = TemperatureRange.new(0, [0, 0], [0, 0])
|
11
|
+
@null_sky_conditions = SkyConditions.new((0..0), (0..0), (0..0))
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_uses_sky_condition_data_to_determine_current_conditions
|
15
|
+
month = Month.new(@null_temp_range, SkyConditions.new((0..34), (35..65), (66..100)))
|
16
|
+
assert_equal(:clear, month.sky_conditions(RiggedRoller.new(25)))
|
17
|
+
assert_equal(:partly_cloudy, month.sky_conditions(RiggedRoller.new(50)))
|
18
|
+
assert_equal(:cloudy, month.sky_conditions(RiggedRoller.new(75)))
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_uses_temp_range_data_to_determine_current_conditions
|
22
|
+
month = Month.new(TemperatureRange.new(10, [8, 2], [20, 5]), @null_sky_conditions)
|
23
|
+
assert_equal((0..17), month.temp_range(RiggedRoller.new(5)))
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_handles_record_high
|
27
|
+
month = Month.new(TemperatureRange.new(10, [8, 2], [20, 5]), @null_sky_conditions)
|
28
|
+
assert_equal((14..23), month.temp_range(RiggedRoller.new(1), :high))
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_determines_precipitation
|
32
|
+
month = Month.new(@null_temp_range, @null_sky_conditions, 50)
|
33
|
+
assert_equal(true, month.has_precipitation(RiggedRoller.new(10)))
|
34
|
+
assert_equal(false, month.has_precipitation(RiggedRoller.new(70)))
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'precipitationinfo'
|
4
|
+
require 'precipitation'
|
5
|
+
|
6
|
+
require 'rollers/riggedroller'
|
7
|
+
|
8
|
+
class TestPrecipitation < Test::Unit::TestCase
|
9
|
+
def test_has_rainbow
|
10
|
+
precip = Precipitation.new(PrecipitationInfo.create_from_data({ :name => "foo", :chance_of_rainbow => 30}),
|
11
|
+
RiggedRoller.new(10))
|
12
|
+
assert_equal(true, precip.rainbow?)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_no_rainbow
|
16
|
+
precip = Precipitation.new(PrecipitationInfo.create_from_data({ :name => "foo", :chance_of_rainbow => 30}),
|
17
|
+
RiggedRoller.new(40))
|
18
|
+
assert_equal(false, precip.rainbow?)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_no_rainbow_if_no_chance_of_it
|
22
|
+
precip = Precipitation.new(PrecipitationInfo.create_from_data({ :name => "foo", :chance_of_rainbow => 0}),
|
23
|
+
RiggedRoller.new(0))
|
24
|
+
assert_equal(false, precip.rainbow?)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'rollers/riggedroller'
|
4
|
+
|
5
|
+
require 'precipitationoccurance'
|
6
|
+
require 'precipitationinfo'
|
7
|
+
|
8
|
+
class TestPrecipitationOccurance < Test::Unit::TestCase
|
9
|
+
def test_returns_array_of_precipitation
|
10
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :light_snowstorm}),
|
11
|
+
(21..100) => create_precip_info({ :name => :light_rainstorm})})
|
12
|
+
assert_instance_of(Array, precip_occur.type(RiggedRoller.new(13)))
|
13
|
+
assert_instance_of(Precipitation, precip_occur.type(RiggedRoller.new(13))[0])
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_determines_precipitation
|
17
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :light_snowstorm}),
|
18
|
+
(21..100) => create_precip_info({ :name => :light_rainstorm})})
|
19
|
+
assert_equal(:light_snowstorm, precip_occur.type(RiggedRoller.new(13))[0].name)
|
20
|
+
assert_equal(:light_rainstorm, precip_occur.type(RiggedRoller.new(57))[0].name)
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_load_from_file
|
24
|
+
precip_occur = PrecipitationOccurance.load("data/precipitationoccurance.yml")
|
25
|
+
assert_equal("Sleetstorm", precip_occur.type(RiggedRoller.new(22))[0].name)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_default_value_is_null_precipitation
|
29
|
+
precip_occur = PrecipitationOccurance.new()
|
30
|
+
assert_equal(NullPrecipitationInfo.new().name, precip_occur.type(RiggedRoller.new(13))[0].name)
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_checks_for_and_computes_continuing_precipitation
|
34
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :light_snowstorm, :chance_to_continue => 10}),
|
35
|
+
(21..100) => create_precip_info({ :name => :light_rainstorm, :chance_to_continue => 10})})
|
36
|
+
assert_equal([:light_rainstorm, :light_snowstorm, :light_rainstorm, :light_rainstorm],
|
37
|
+
precip_occur.type(RiggedRoller.new(35, 5, 1, 5, 10, 5, 5, 100)).map{ |p| p.name })
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_no_reroll_if_temp_range_is_ok
|
41
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :cold, :min_temp => 0}),
|
42
|
+
(21..100) => create_precip_info({ :name => :warm, :min_temp => 30})})
|
43
|
+
assert_equal([:warm], precip_occur.type(RiggedRoller.new(35, 10), 40..50).map{ |p| p.name })
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_reroll_if_temp_is_too_low
|
47
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :cold, :min_temp => 0}),
|
48
|
+
(21..100) => create_precip_info({ :name => :warm, :min_temp => 30})})
|
49
|
+
assert_equal(:cold, precip_occur.type(RiggedRoller.new(35, 10), 10..20)[0].name)
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_reroll_if_temp_is_too_high
|
53
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :cold, :max_temp => 30}),
|
54
|
+
(21..100) => create_precip_info({ :name => :warm, :max_temp => 50})})
|
55
|
+
assert_equal(:warm, precip_occur.type(RiggedRoller.new(10, 35), 40..60)[0].name)
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_rerolls_once_only_for_bad_weather
|
59
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :cold, :max_temp => 30})})
|
60
|
+
assert_equal(Precipitation.new(NullPrecipitationInfo.new(), nil).name,
|
61
|
+
precip_occur.type(RiggedRoller.new(10, 10), 60..70)[0].name)
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_checks_temp_ranges_for_continuing_weather
|
65
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :cold,
|
66
|
+
:chance_to_continue => 10,
|
67
|
+
:max_temp => 20}),
|
68
|
+
(21..100) => create_precip_info({ :name => :hot,
|
69
|
+
:chance_to_continue => 10,
|
70
|
+
:min_temp => 40})})
|
71
|
+
assert_equal([:hot, :hot],
|
72
|
+
precip_occur.type(RiggedRoller.new(35, 5, 1, 20), 30..50).map{ |p| p.name })
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_checks_terrain_for_precipitation
|
76
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :not, :not_allowed_in => [:desert]})})
|
77
|
+
assert_equal(NullPrecipitationInfo.new().name, precip_occur.type(RiggedRoller.new(10), nil, :desert).first.name)
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_checks_terrain_for_continuin_weather
|
81
|
+
precip_occur = PrecipitationOccurance.new({ (0..20) => create_precip_info({ :name => :cold,
|
82
|
+
:chance_to_continue => 10,
|
83
|
+
:not_allowed_in => [:desert]}),
|
84
|
+
(21..100) => create_precip_info({ :name => :hot,
|
85
|
+
:chance_to_continue => 10 })})
|
86
|
+
assert_equal(:hot, precip_occur.type(RiggedRoller.new(35, 5, 1, 20), nil, :desert)[1].name)
|
87
|
+
end
|
88
|
+
|
89
|
+
private
|
90
|
+
def create_precip_info(hash)
|
91
|
+
PrecipitationInfo.create_from_data(hash)
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'singledayweather'
|
4
|
+
require 'month'
|
5
|
+
|
6
|
+
require 'rollers/avgroller'
|
7
|
+
require 'rollers/riggedroller'
|
8
|
+
|
9
|
+
class TestWeather < Test::Unit::TestCase
|
10
|
+
def test_temp_range_is_calcuated_by_appropriate_die_rolls
|
11
|
+
assert_equal(5..24, SingleDayWeather.new(create_month, AvgRoller.new).temperature_range)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_determines_sky_conditions
|
15
|
+
assert_equal(:partly_cloudy, SingleDayWeather.new(create_month, AvgRoller.new).sky_conditions)
|
16
|
+
assert_equal(:clear, SingleDayWeather.new(create_month, RiggedRoller.new(14)).sky_conditions)
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_determines_precipitation
|
20
|
+
assert_equal("precip",
|
21
|
+
SingleDayWeather.new(create_month, RiggedRoller.new(10),
|
22
|
+
PrecipitationOccurance.new({ 0..100 => PrecipitationInfo.new("precip")})).
|
23
|
+
precipitation[0].name)
|
24
|
+
assert_equal(NullPrecipitationInfo.new().name,
|
25
|
+
SingleDayWeather.new(create_month, RiggedRoller.new(70),
|
26
|
+
PrecipitationOccurance.new({ 0..100 => PrecipitationInfo.new("precip")})).
|
27
|
+
precipitation[0].name)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_deals_with_record_highs
|
31
|
+
assert_equal(24..36, SingleDayWeather.new(create_month, RiggedRoller.new(1),
|
32
|
+
PrecipitationOccurance.new(),
|
33
|
+
:high).temperature_range)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_determines_wind
|
37
|
+
assert_equal("9SE", SingleDayWeather.new(create_month, AvgRoller.new).wind.to_s)
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_checks_for_temp_ranges_on_weather
|
41
|
+
assert_equal(NullPrecipitationInfo.new().name,
|
42
|
+
SingleDayWeather.new(create_month, RiggedRoller.new(10),
|
43
|
+
PrecipitationOccurance.new({ 0..100 => PrecipitationInfo.create_from_data({ :name => "precip",
|
44
|
+
:min_temp => 100})})).
|
45
|
+
precipitation[0].name)
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_checks_for_terrain_on_precipitation
|
49
|
+
assert_equal(NullPrecipitationInfo.new().name,
|
50
|
+
SingleDayWeather.new(create_month, RiggedRoller.new(10),
|
51
|
+
PrecipitationOccurance.new({ 0..100 =>
|
52
|
+
PrecipitationInfo.create_from_data({ :name => "precip",
|
53
|
+
:not_allowed_in => [:desert]})}), nil, :desert).
|
54
|
+
precipitation[0].name)
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
def create_month
|
59
|
+
Month.new(TemperatureRange.new(13, [10,6], [8,4]), SkyConditions.new((01..23), (24..50), (51..100)), 50)
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'rollers/riggedroller'
|
4
|
+
|
5
|
+
require 'skyconditions'
|
6
|
+
|
7
|
+
class TestSkyConditions < Test::Unit::TestCase
|
8
|
+
def test_pick_from_ranges
|
9
|
+
conditions = SkyConditions.new((01..23), (24..50), (51..100))
|
10
|
+
assert_equal(:clear, conditions.condition(RiggedRoller.new(01)))
|
11
|
+
assert_equal(:clear, conditions.condition(RiggedRoller.new(23)))
|
12
|
+
assert_equal(:partly_cloudy, conditions.condition(RiggedRoller.new(24)))
|
13
|
+
assert_equal(:partly_cloudy, conditions.condition(RiggedRoller.new(50)))
|
14
|
+
assert_equal(:cloudy, conditions.condition(RiggedRoller.new(51)))
|
15
|
+
assert_equal(:cloudy, conditions.condition(RiggedRoller.new(99)))
|
16
|
+
assert_equal(:cloudy, conditions.condition(RiggedRoller.new(100)))
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_zero_equals_hundred
|
20
|
+
conditions = SkyConditions.new((01..23), (24..50), (51..100))
|
21
|
+
assert_equal(:cloudy, conditions.condition(RiggedRoller.new(0)))
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'rollers/avgroller'
|
4
|
+
|
5
|
+
require 'temperaturerange'
|
6
|
+
|
7
|
+
class TestTemperaratureRange < Test::Unit::TestCase
|
8
|
+
def test_uses_die_roller_for_range_construction
|
9
|
+
temp = TemperatureRange.new(10, [8, 4], [10, 4])
|
10
|
+
assert_equal((1..18), temp.range(AvgRoller.new))
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_handles_record_high
|
14
|
+
temp = TemperatureRange.new(10, [8, 2], [8, 2])
|
15
|
+
assert_equal(14..26, temp.range(AvgRoller.new, :high))
|
16
|
+
assert_equal(24..36, temp.range(AvgRoller.new, [:high,:high]))
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_handles_record_low
|
20
|
+
temp = TemperatureRange.new(10, [8, 2], [8, 2])
|
21
|
+
assert_equal(-6..6, temp.range(AvgRoller.new, :low))
|
22
|
+
assert_equal(-16..-4, temp.range(AvgRoller.new, [:low,:low]))
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_handles_mix_of_records
|
26
|
+
temp = TemperatureRange.new(10, [8, 2], [8, 2])
|
27
|
+
assert_equal(4..16, temp.range(AvgRoller.new, [:high,:low]))
|
28
|
+
assert_equal(14..26, temp.range(AvgRoller.new, [:high,:low,:high]))
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'WeatherGenerator'
|
4
|
+
require 'BaselineData'
|
5
|
+
|
6
|
+
require 'rollers/avgroller'
|
7
|
+
require 'rollers/riggedroller'
|
8
|
+
|
9
|
+
class TestBaselineData < BaselineData
|
10
|
+
def initialize (all_data)
|
11
|
+
@all_data = all_data
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class TestWeatherGenerator < Test::Unit::TestCase
|
16
|
+
def setup
|
17
|
+
@testbaseline = TestBaselineData.new [{ :temp_range => TemperatureRange.new(10, [4, 0], [4, 0]),
|
18
|
+
:sky_conditions => { :clear => (0..0), :partly => (0..0), :cloudy => (0..0) },
|
19
|
+
:precipitation_chance => 40 },
|
20
|
+
{ :temp_range => TemperatureRange.new(100, [4, 0], [4, 0]),
|
21
|
+
:sky_conditions => { :clear => (0..0), :partly => (0..0), :cloudy => (0..0) },
|
22
|
+
:precipitation_chance => 70 }]
|
23
|
+
@testprecipchart = PrecipitationOccurance.new({ 0..25 => PrecipitationInfo.create_from_data({ :name => "Rain", :not_allowed_in => [:desert]}),
|
24
|
+
26..50 => PrecipitationInfo.create_from_data({ :name => "Snow"}),
|
25
|
+
51..75 => PrecipitationInfo.create_from_data({ :name => "Hail"}),
|
26
|
+
76..100 => PrecipitationInfo.create_from_data({ :name => "Smog"})})
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_generator_creates_num_days_of_weather
|
30
|
+
generator = WeatherGenerator.new @testbaseline, @testprecipchart, 1, 1, AvgRoller.new
|
31
|
+
assert_equal(1, generator.days.length, "Should have only generated 1 day of weeather")
|
32
|
+
|
33
|
+
generator = WeatherGenerator.new @testbaseline, @testprecipchart, 1, 13, AvgRoller.new
|
34
|
+
assert_equal(13, generator.days.length, "Should have generated 13 day of weeather")
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_generated_days_cross_month_boundaries
|
38
|
+
generator = WeatherGenerator.new @testbaseline, @testprecipchart, 1, 31, RiggedRoller.new(1)
|
39
|
+
unique_ranges = generator.days.collect{ |d| d.temperature_range}.uniq
|
40
|
+
assert_equal(2, unique_ranges.length, "Not all ranges should be the same")
|
41
|
+
assert_equal(28, generator.days.select{ |d| d.temperature_range.begin < 50 }.length, "should have 28 items from the first month")
|
42
|
+
assert_equal(3, generator.days.select{ |d| d.temperature_range.begin > 50 }.length, "Should have 3 items from the first month")
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_months_wrap_around_if_past_end_of_year
|
46
|
+
generator = WeatherGenerator.new @testbaseline, @testprecipchart, 2, 29, RiggedRoller.new(1)
|
47
|
+
assert_equal(true, generator.days.last.temperature_range.begin < 50, "Last one should be first month")
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_checks_for_record_high_low
|
51
|
+
generator = WeatherGenerator.new @testbaseline, @testprecipchart, 1, 1, RiggedRoller.new(1)
|
52
|
+
assert_equal(-3..-1, generator.days.first.temperature_range, "Extreme record low")
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_uses_terrain_for_precipitation_check
|
56
|
+
generator = WeatherGenerator.new @testbaseline, @testprecipchart, 1, 1, RiggedRoller.new(1), :desert
|
57
|
+
assert_equal(NullPrecipitationInfo.new.name, generator.days.first.precipitation.first.name)
|
58
|
+
end
|
59
|
+
end
|
data/test/test_wind.rb
ADDED
data/todo.org
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
* Release #1
|
2
|
+
Minimum features needed to let me use the tool in my own game
|
3
|
+
** DONE determine base temp given the month
|
4
|
+
** DONE calc date's temp range given date
|
5
|
+
** DONE Need a good way to store/define the baseline data - hardcoded in the baselinedata file is ugly!
|
6
|
+
** DONE add a readme file to make github happy.
|
7
|
+
** DONE get weather for multiple days
|
8
|
+
** DONE remove current 'day' parameter
|
9
|
+
** DONE add numdays parameter
|
10
|
+
** DONE get weather from beginning of month for that many days
|
11
|
+
** DONE handle getting number of days overlapping with another month
|
12
|
+
** DONE need to calc current weather condition (sunny/partly-cloudy/cloudy)
|
13
|
+
** DONE determine if there is precip for a date
|
14
|
+
** DONE add to baseline and add acceptance test.
|
15
|
+
** DONE determine if there is record high/low
|
16
|
+
** DONE wind speed / direction
|
17
|
+
** DONE determine what sort of precip it is
|
18
|
+
*** DONE just baseline data of precip
|
19
|
+
*** DONE refactor to have array of precip
|
20
|
+
*** DONE refactor to have null precip
|
21
|
+
*** DONE new Precipitation class seprate from PrecipitationInfo. New class embodies the actual precipitation
|
22
|
+
*** DONE determine continuing precip
|
23
|
+
*** DONE determine rainbow
|
24
|
+
** DONE standardize output like my sheets
|
25
|
+
** DONE check for requirements on precip
|
26
|
+
*** DONE temp range
|
27
|
+
*** DONE terrain
|
28
|
+
** need to calc diff in base temp caused by latitude
|
29
|
+
** duration of record high/low
|
30
|
+
|
31
|
+
** determine windspeed from precipitation
|
32
|
+
|
33
|
+
* fix infinite loop in weather generation (probaly only a problem in tests)
|
34
|
+
* need to calc diff in sun-rise/-set time caused by longitude
|
35
|
+
* need to calc diff in base temp caused by altitude
|
36
|
+
* phase of moons for date
|
37
|
+
* sunrise/sunset times for date
|
38
|
+
* modify weather given terrain
|
39
|
+
* interpret special precipitation (based upon terrain)
|
40
|
+
* report wind chill temp
|
41
|
+
* report high wind effect table
|
42
|
+
* report affects of precip (duration etc.)
|
43
|
+
* humidity
|
44
|
+
* arbitrary start day
|
45
|
+
* greyhawk calendar festivals
|
46
|
+
* DONE rearrange code a bit (helper classes in subdirectories etc.)
|
47
|
+
* precipitation occurance chart should not be publically a ranged hash?
|
48
|
+
* ranged hash sorting is bad stuff (and not yet complete!)
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: greyhawkweather
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Mark Simpson
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain:
|
17
|
+
- |
|
18
|
+
-----BEGIN CERTIFICATE-----
|
19
|
+
MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAp2ZXJk
|
20
|
+
YW1tZWx0MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
|
21
|
+
b20wHhcNMTAxMjI5MjAxNjI3WhcNMTExMjI5MjAxNjI3WjBBMRMwEQYDVQQDDAp2
|
22
|
+
ZXJkYW1tZWx0MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
23
|
+
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQQsRTtwd0rN0X
|
24
|
+
ffw6plu3tUBiGXpRGWOlIZq6xjyAjjvmwMWnmwU5juNBlPJZzYiMmCIC821s3fgb
|
25
|
+
TM69f/cgqeevyI/h4Soxl2Le8NVGSeyvaZSNM8s1n9EQ5kN7VogYD0DbB4kHlfCM
|
26
|
+
JgD72juXiAKXnsXH8NvcBXCkoPiq7CjDJCmrqilTu1atELmP5RJ/Vm+Nt2odVDF5
|
27
|
+
t2x2ANmLVOZn59BTvHNXYbwrCIs82W4SwOSF4wL/I5ElH7dzr8PZN1yNBZPHtxpe
|
28
|
+
+4eTt6c4+DSP+rCOjLxBQxGPemY54zVawVtg4LjE/oOaAri99hz1Nl+PLgXg+oEP
|
29
|
+
veV2pcnDAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
30
|
+
BBTJ6wHlTv0Ievjg5o1zGil1w639SjANBgkqhkiG9w0BAQUFAAOCAQEAfXKfM9vA
|
31
|
+
u1ukuGjhd4mej3Daw8bnaX2URwy5/4ogP5+9rK+WTni5UpS09ksvN/I/PWnfwNWE
|
32
|
+
kzV0tl0DvQMpz+obpw02pt1uEzAHyPOYDGrgRweVaJbvrH2G3xAkSBwfkaDlzSrk
|
33
|
+
KomP5Nct1Nnkmg0mAAGjvS/ib3GbEANt8qSP6hfn6vEXMUnhnCmo69dbdqDwVDOJ
|
34
|
+
FVV9Kd1o7T8NmmDdn+G26uPPAX5EeJtyB1rV6pSPkQW99opIKcz6iEPNkAtVniwM
|
35
|
+
AM5LT+EO74YD568fpYjJUw+T4/TsPJBWyU/f21QoaRXI+x3VNSEqDZEf67Lsp2Ew
|
36
|
+
rPnJW2hNpPLFrA==
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
|
39
|
+
date: 2010-12-29 00:00:00 -05:00
|
40
|
+
default_executable:
|
41
|
+
dependencies:
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rangehash
|
44
|
+
prerelease: false
|
45
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
46
|
+
none: false
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
hash: 29
|
51
|
+
segments:
|
52
|
+
- 0
|
53
|
+
- 0
|
54
|
+
- 1
|
55
|
+
version: 0.0.1
|
56
|
+
type: :runtime
|
57
|
+
version_requirements: *id001
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rubyforge
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
hash: 7
|
67
|
+
segments:
|
68
|
+
- 2
|
69
|
+
- 0
|
70
|
+
- 4
|
71
|
+
version: 2.0.4
|
72
|
+
type: :development
|
73
|
+
version_requirements: *id002
|
74
|
+
- !ruby/object:Gem::Dependency
|
75
|
+
name: gemcutter
|
76
|
+
prerelease: false
|
77
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
hash: 5
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
- 6
|
86
|
+
- 1
|
87
|
+
version: 0.6.1
|
88
|
+
type: :development
|
89
|
+
version_requirements: *id003
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: hoe
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 27
|
99
|
+
segments:
|
100
|
+
- 2
|
101
|
+
- 5
|
102
|
+
- 0
|
103
|
+
version: 2.5.0
|
104
|
+
type: :development
|
105
|
+
version_requirements: *id004
|
106
|
+
description: |-
|
107
|
+
This program will assist in the generation of randomized weather for
|
108
|
+
the Greyhawk AD&D Campaign setting. It uses data from the Greyhawk
|
109
|
+
Boxed set (circa 1983) for AD&D 1e.
|
110
|
+
|
111
|
+
The todo.org file lists the "stories" for this project in prioritzed
|
112
|
+
order. If a story is marked DONE then it is in theory working.
|
113
|
+
email:
|
114
|
+
- verdammelt@gmail.com
|
115
|
+
executables:
|
116
|
+
- greyweathergen
|
117
|
+
extensions: []
|
118
|
+
|
119
|
+
extra_rdoc_files:
|
120
|
+
- History.txt
|
121
|
+
- Manifest.txt
|
122
|
+
- PostInstall.txt
|
123
|
+
files:
|
124
|
+
- History.txt
|
125
|
+
- Manifest.txt
|
126
|
+
- PostInstall.txt
|
127
|
+
- README.rdoc
|
128
|
+
- Rakefile
|
129
|
+
- bin/greyweathergen
|
130
|
+
- data/baselinedata.yml
|
131
|
+
- data/precipitationoccurance.yml
|
132
|
+
- lib/baselinedata.rb
|
133
|
+
- lib/greyhawkweather.rb
|
134
|
+
- lib/greyhawkweathergenerator.rb
|
135
|
+
- lib/month.rb
|
136
|
+
- lib/precipitation.rb
|
137
|
+
- lib/precipitationinfo.rb
|
138
|
+
- lib/precipitationoccurance.rb
|
139
|
+
- lib/singledayweather.rb
|
140
|
+
- lib/skyconditions.rb
|
141
|
+
- lib/temperaturerange.rb
|
142
|
+
- lib/util/dieroller.rb
|
143
|
+
- lib/weathergenerator.rb
|
144
|
+
- lib/wind.rb
|
145
|
+
- script/console
|
146
|
+
- script/destroy
|
147
|
+
- script/generate
|
148
|
+
- test/rollers/avgroller.rb
|
149
|
+
- test/rollers/riggedroller.rb
|
150
|
+
- test/test_acceptance.rb
|
151
|
+
- test/test_dieroller.rb
|
152
|
+
- test/test_greyhawkweather.rb
|
153
|
+
- test/test_helper.rb
|
154
|
+
- test/test_month.rb
|
155
|
+
- test/test_precipitation.rb
|
156
|
+
- test/test_precipitation_occurance.rb
|
157
|
+
- test/test_singledayweather.rb
|
158
|
+
- test/test_sky_conditions.rb
|
159
|
+
- test/test_temperature_range.rb
|
160
|
+
- test/test_weather_generator.rb
|
161
|
+
- test/test_wind.rb
|
162
|
+
- todo.org
|
163
|
+
has_rdoc: true
|
164
|
+
homepage: http://github.com/verdammelt/Greyhawk-Weather
|
165
|
+
licenses: []
|
166
|
+
|
167
|
+
post_install_message: PostInstall.txt
|
168
|
+
rdoc_options:
|
169
|
+
- --main
|
170
|
+
- README.rdoc
|
171
|
+
require_paths:
|
172
|
+
- lib
|
173
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
174
|
+
none: false
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
hash: 3
|
179
|
+
segments:
|
180
|
+
- 0
|
181
|
+
version: "0"
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
none: false
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
hash: 3
|
188
|
+
segments:
|
189
|
+
- 0
|
190
|
+
version: "0"
|
191
|
+
requirements: []
|
192
|
+
|
193
|
+
rubyforge_project: greyhawkweather
|
194
|
+
rubygems_version: 1.3.7
|
195
|
+
signing_key:
|
196
|
+
specification_version: 3
|
197
|
+
summary: This program will assist in the generation of randomized weather for the Greyhawk AD&D Campaign setting
|
198
|
+
test_files:
|
199
|
+
- test/test_acceptance.rb
|
200
|
+
- test/test_dieroller.rb
|
201
|
+
- test/test_greyhawkweather.rb
|
202
|
+
- test/test_helper.rb
|
203
|
+
- test/test_month.rb
|
204
|
+
- test/test_precipitation.rb
|
205
|
+
- test/test_precipitation_occurance.rb
|
206
|
+
- test/test_singledayweather.rb
|
207
|
+
- test/test_sky_conditions.rb
|
208
|
+
- test/test_temperature_range.rb
|
209
|
+
- test/test_weather_generator.rb
|
210
|
+
- test/test_wind.rb
|