woyo-world 0.0.1.pre2

Sign up to get free protection for your applications and to get access to all the features.
data/todo.txt ADDED
@@ -0,0 +1,119 @@
1
+
2
+
3
+ Woyo::World is a singleton
4
+
5
+ DSL:
6
+
7
+ world do
8
+
9
+ # some states may be mutually exclusive
10
+ # setting one will undo others
11
+ states do
12
+ exclusive :dark, :dim, :light, :bright
13
+ exclusive :cold, :cool, :warm, :hot
14
+ end
15
+
16
+ # locations are places a player can be
17
+
18
+ location :name do
19
+ # name is a symbol
20
+
21
+ # default title is name.to_s.capitalize
22
+ title "...."
23
+
24
+ # default description
25
+ description "........."
26
+
27
+ description do
28
+ # may depend on verbose game setting
29
+ long "........."
30
+ short "...."
31
+ # may depend on location state ?
32
+ is :bright, "........."
33
+ is :cold, "........."
34
+ end
35
+
36
+ # concise hash / named parameters ?
37
+ description long: "...................", short: "...."
38
+
39
+ # locations do NOT contain locations
40
+ # locations are a graph, linked by ways
41
+ # ways lead to/from other locations
42
+ # standard ways map to directions and movements
43
+ # north,south,east,west,up,down,forward,back,left,right
44
+
45
+ way north:, "location name"
46
+ ways do
47
+ east :far_east
48
+ west :wild_west
49
+ up :sky
50
+ down :pit
51
+ end
52
+
53
+ # 'is' a set of multiple states
54
+ # default: nil
55
+
56
+ # symbols or strings
57
+ is :cold, :dark
58
+ is "bright", "hot"
59
+
60
+ # in code: is? :cold / is_cold? like rspec ?
61
+ # here == self ?
62
+
63
+ end
64
+
65
+ # items are things that may be in a location
66
+
67
+ item "name" do
68
+
69
+ # short description used when seen
70
+ description "....."
71
+
72
+ # longer description when examined
73
+ detail "....."
74
+
75
+ # have aspects
76
+ aspect :small, :light
77
+
78
+ # may be at a location
79
+ location "location name"
80
+
81
+ # this == self ?
82
+
83
+ end
84
+
85
+ # concise hash
86
+
87
+ item "name", description: "...", detail: "...", aspect: [ :small, :light ]
88
+
89
+ # items can relate to other items ?....
90
+ # contains / contained
91
+ # before / behind
92
+ # on / under
93
+ # above / below
94
+ # near / far
95
+ # module for this 'Relation' feature ?
96
+
97
+ end
98
+
99
+ # code can be instance(?) eval'd when defining world, location, items
100
+ # code for ... triggers, events, handlers, conditions, etc...
101
+
102
+ # can locations, items be subclassed ?
103
+ # then defined in DSL ?
104
+
105
+ item :vase do
106
+ description "a vase"
107
+ aspect :small, :light
108
+ end
109
+
110
+ vase :blue_vase do
111
+ aspect :blue
112
+ end
113
+
114
+ vase :red_vase do
115
+ aspect :red
116
+ end
117
+
118
+ # is this more like prototyping than subclassing ?
119
+
data/woyo-dsl.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'woyo/world/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "woyo-world"
8
+ spec.version = Woyo::WORLD_VERSION
9
+ spec.authors = ["Gerard Fowley"]
10
+ spec.email = ["gerard.fowley@iqeo.net"]
11
+ spec.summary = %q{World of Your Own}
12
+ spec.description = %q{Game world DSL}
13
+ spec.homepage = ""
14
+ spec.license = "GPLv3"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: woyo-world
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.pre2
5
+ platform: ruby
6
+ authors:
7
+ - Gerard Fowley
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Game world DSL
56
+ email:
57
+ - gerard.fowley@iqeo.net
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".ruby-gemset"
64
+ - ".ruby-version"
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - lib/woyo/world.rb
70
+ - lib/woyo/world/attributes.rb
71
+ - lib/woyo/world/character.rb
72
+ - lib/woyo/world/dsl.rb
73
+ - lib/woyo/world/location.rb
74
+ - lib/woyo/world/version.rb
75
+ - lib/woyo/world/way.rb
76
+ - lib/woyo/world/world.rb
77
+ - lib/woyo/world/world_object.rb
78
+ - spec/woyo/world/attributes_spec.rb
79
+ - spec/woyo/world/character_spec.rb
80
+ - spec/woyo/world/dsl_spec.rb
81
+ - spec/woyo/world/language_spec.rb
82
+ - spec/woyo/world/location_spec.rb
83
+ - spec/woyo/world/way_spec.rb
84
+ - spec/woyo/world/world_object_spec.rb
85
+ - spec/woyo/world/world_spec.rb
86
+ - tmux
87
+ - todo.txt
88
+ - woyo-dsl.gemspec
89
+ homepage: ''
90
+ licenses:
91
+ - GPLv3
92
+ metadata: {}
93
+ post_install_message:
94
+ rdoc_options: []
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">"
105
+ - !ruby/object:Gem::Version
106
+ version: 1.3.1
107
+ requirements: []
108
+ rubyforge_project:
109
+ rubygems_version: 2.2.2
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: World of Your Own
113
+ test_files:
114
+ - spec/woyo/world/attributes_spec.rb
115
+ - spec/woyo/world/character_spec.rb
116
+ - spec/woyo/world/dsl_spec.rb
117
+ - spec/woyo/world/language_spec.rb
118
+ - spec/woyo/world/location_spec.rb
119
+ - spec/woyo/world/way_spec.rb
120
+ - spec/woyo/world/world_object_spec.rb
121
+ - spec/woyo/world/world_spec.rb