scorched_earth 5.0.0.pre-java → 5.0.1.pre-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/README.md +9 -24
- data/Rakefile +5 -5
- data/bin/console +3 -3
- data/exe/scorched +1 -1
- data/lib/scorched_earth.rb +3 -3
- data/lib/scorched_earth/color_palette.rb +1 -1
- data/lib/scorched_earth/event_runner.rb +28 -0
- data/lib/scorched_earth/events/entity_created.rb +1 -1
- data/lib/scorched_earth/events/game_ending.rb +1 -1
- data/lib/scorched_earth/events/mouse_moved.rb +1 -1
- data/lib/scorched_earth/events/mouse_pressed.rb +1 -1
- data/lib/scorched_earth/explosion.rb +4 -2
- data/lib/scorched_earth/game.rb +34 -60
- data/lib/scorched_earth/game_window.rb +16 -16
- data/lib/scorched_earth/helpers.rb +1 -1
- data/lib/scorched_earth/mouse.rb +32 -33
- data/lib/scorched_earth/player.rb +2 -1
- data/lib/scorched_earth/shot.rb +13 -7
- data/lib/scorched_earth/terrain.rb +17 -16
- data/lib/scorched_earth/version.rb +1 -1
- data/scorched_earth.gemspec +14 -14
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfa1221f5544042db555d173cf834a693e8f45b2
|
4
|
+
data.tar.gz: d1a2e0323a1e430ff7c3d6d31091c7147e34e8f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef23bc10966526eb981726d24ef69312758bf2bf87e2dc105b69477e158b385557206d42c2fd6333e8ac425f175425ea1323e6f6f1f78b7fc17a85fc97bc6a9d
|
7
|
+
data.tar.gz: 4e9fb4f997f614af6c8dfd71ce123acca2a2dc4963d8e652606f5a239fac0eb0dccaa9e8feb7faababf3cb4d4394e557b51e49917b84b1cc1274978bd5cca213
|
data/.rubocop.yml
ADDED
data/README.md
CHANGED
@@ -2,9 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Code Climate](https://codeclimate.com/github/jamesmoriarty/scorched-earth-rb/badges/gpa.svg)](https://codeclimate.com/github/jamesmoriarty/scorched-earth-rb) [![Test Coverage](https://codeclimate.com/github/jamesmoriarty/scorched-earth-rb/badges/coverage.svg)](https://codeclimate.com/github/jamesmoriarty/scorched-earth-rb/coverage)
|
4
4
|
|
5
|
-
A little [Scorched Earth](https://en.wikipedia.org/wiki/ScorchedEarth_Earth_(video_game)) clone in the Ruby Programming Language.
|
6
|
-
|
7
|
-
With a segue into procedurally generated color palettes:
|
5
|
+
A little [Scorched Earth](https://en.wikipedia.org/wiki/ScorchedEarth_Earth_(video_game)) clone in the Ruby Programming Language (JRuby). Now including a segue into procedurally generated color palettes:
|
8
6
|
- [TriadMixing](http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/)
|
9
7
|
- [CIE94](https://en.wikipedia.org/wiki/Color_difference#CIE94)
|
10
8
|
|
@@ -12,33 +10,20 @@ With a segue into procedurally generated color palettes:
|
|
12
10
|
|
13
11
|
## Installation
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
```
|
18
|
-
|
19
|
-
Add this line to your application's Gemfile:
|
20
|
-
|
21
|
-
```ruby
|
22
|
-
gem 'scorched_earth'
|
23
|
-
```
|
24
|
-
|
25
|
-
And then execute:
|
26
|
-
|
27
|
-
$ bundle
|
28
|
-
|
29
|
-
Or install it yourself as:
|
30
|
-
|
31
|
-
$ gem install scorched_earth
|
13
|
+
$ brew install jruby
|
14
|
+
$ jruby -S gem install scorched_earth --pre
|
32
15
|
|
33
16
|
## Usage
|
34
17
|
|
35
|
-
$ scorched
|
18
|
+
$ jruby -S scorched
|
36
19
|
|
37
20
|
## Development
|
38
21
|
|
39
|
-
|
40
|
-
|
41
|
-
|
22
|
+
$ uname
|
23
|
+
Darwin
|
24
|
+
$ jruby --version
|
25
|
+
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.74-b02 on 1.8.0_74-b02 +jit [darwin-x86_64]
|
26
|
+
$ jruby -S bundle exec rake
|
42
27
|
|
43
28
|
## Contributing
|
44
29
|
|
data/Rakefile
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
3
|
|
4
4
|
Rake::TestTask.new(:test) do |t|
|
5
|
-
t.libs <<
|
6
|
-
t.libs <<
|
5
|
+
t.libs << 'test'
|
6
|
+
t.libs << 'lib'
|
7
7
|
t.test_files = FileList['test/**/*_test.rb']
|
8
8
|
end
|
9
9
|
|
10
|
-
task :
|
10
|
+
task default: :test
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'scorched_earth'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require "scorched_earth"
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'irb'
|
14
14
|
IRB.start
|
data/exe/scorched
CHANGED
data/lib/scorched_earth.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
module ScorchedEarth
|
2
|
+
class EventRunner
|
3
|
+
attr_reader :events, :subscribers
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@events = Queue.new
|
7
|
+
@subscribers = []
|
8
|
+
end
|
9
|
+
|
10
|
+
def publish(event)
|
11
|
+
events << event
|
12
|
+
end
|
13
|
+
|
14
|
+
def subscribe(klass, &block)
|
15
|
+
subscribers << [klass, block]
|
16
|
+
end
|
17
|
+
|
18
|
+
def process_events!
|
19
|
+
until events.empty?
|
20
|
+
event = events.pop
|
21
|
+
|
22
|
+
subscribers.each do |klass, block|
|
23
|
+
block.call event if event.is_a? klass
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -3,10 +3,12 @@ module ScorchedEarth
|
|
3
3
|
attr_reader :x, :y, :color, :radius
|
4
4
|
|
5
5
|
def initialize(x, y)
|
6
|
-
@x
|
6
|
+
@x = x
|
7
|
+
@y = y
|
8
|
+
@radius = 25
|
7
9
|
end
|
8
10
|
|
9
|
-
def update(
|
11
|
+
def update(_delta)
|
10
12
|
@radius += 25
|
11
13
|
@x -= 1_000_000 if radius > 100
|
12
14
|
end
|
data/lib/scorched_earth/game.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
1
|
+
require 'scorched_earth/helpers'
|
2
|
+
require 'scorched_earth/terrain'
|
3
|
+
require 'scorched_earth/player'
|
4
|
+
require 'scorched_earth/shot'
|
5
|
+
require 'scorched_earth/explosion'
|
6
|
+
require 'scorched_earth/mouse'
|
7
|
+
require 'scorched_earth/color_palette'
|
8
|
+
require 'scorched_earth/event_runner'
|
9
|
+
require 'scorched_earth/events/entity_created'
|
10
|
+
require 'scorched_earth/events/game_ending'
|
10
11
|
|
11
12
|
include Java
|
12
13
|
|
@@ -17,52 +18,43 @@ module ScorchedEarth
|
|
17
18
|
include Helpers
|
18
19
|
|
19
20
|
attr_reader :width, :height,
|
20
|
-
|
21
|
-
|
21
|
+
:color_palette, :entities, :mouse, :players, :terrain,
|
22
|
+
:event_runner
|
22
23
|
|
23
|
-
def initialize
|
24
|
-
@width
|
24
|
+
def initialize(width, height)
|
25
|
+
@width = width
|
26
|
+
@height = height
|
25
27
|
end
|
26
28
|
|
27
29
|
def setup
|
28
|
-
@color_palette
|
29
|
-
@entities
|
30
|
-
@
|
31
|
-
@
|
32
|
-
@
|
33
|
-
@
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
entities << event.entity
|
38
|
-
end
|
39
|
-
|
40
|
-
on Events::GameEnding do |event|
|
41
|
-
if event.time < Time.now
|
42
|
-
setup
|
43
|
-
else
|
44
|
-
emit event
|
45
|
-
end
|
46
|
-
end
|
30
|
+
@color_palette = ColorPalette.new Color::RED, Color::YELLOW, Color::WHITE
|
31
|
+
@entities = []
|
32
|
+
@event_runner = EventRunner.new
|
33
|
+
@players = Array.new(2) { |index| Player.new rand(width), color_palette.get("player_#{index}") }
|
34
|
+
@terrain = Terrain.new width, height, rand(10), color_palette.get('terrain')
|
35
|
+
@mouse = Mouse.new event_runner, players, terrain
|
36
|
+
|
37
|
+
event_runner.subscribe(Events::EntityCreated) { |event| entities << event.entity }
|
38
|
+
event_runner.subscribe(Events::GameEnding) { |event| event.time < Time.now ? setup : event_runner.publish(event) }
|
47
39
|
end
|
48
40
|
|
49
|
-
def update
|
50
|
-
process_events!
|
41
|
+
def update(delta)
|
42
|
+
event_runner.process_events!
|
51
43
|
|
52
|
-
radius
|
44
|
+
radius = 50
|
53
45
|
@entities.each { |entity| entity.update delta }
|
54
46
|
@entities, @dead = *@entities.partition { |entity| terrain.fetch(entity.x, 0) < entity.y }
|
55
47
|
@dead
|
56
48
|
.select { |entity| entity.is_a? Shot }
|
57
49
|
.select { |entity| entity.x < terrain.width && entity.x > 0 }
|
58
|
-
.each { |entity| terrain.bite entity.x, radius
|
59
|
-
.each { |entity|
|
50
|
+
.each { |entity| terrain.bite entity.x, radius }
|
51
|
+
.each { |entity| event_runner.publish Events::EntityCreated.new(Explosion.new(entity.x, entity.y)) }
|
60
52
|
.select { |entity| players.any? { |player| inside_radius? entity.x - player.x, 0, radius } }
|
61
|
-
.each {
|
53
|
+
.each { event_runner.publish Events::GameEnding.new(Time.now + 1) }
|
62
54
|
end
|
63
55
|
|
64
|
-
def render
|
65
|
-
graphics.set_color color_palette.get(
|
56
|
+
def render(graphics)
|
57
|
+
graphics.set_color color_palette.get('sky')
|
66
58
|
graphics.fill_rect 0, 0, width, height
|
67
59
|
|
68
60
|
entities.each do |entity|
|
@@ -78,26 +70,8 @@ module ScorchedEarth
|
|
78
70
|
terrain.draw graphics
|
79
71
|
end
|
80
72
|
|
81
|
-
def
|
82
|
-
|
83
|
-
end
|
84
|
-
|
85
|
-
def on klass, &block
|
86
|
-
event_listeners << [klass, block]
|
87
|
-
end
|
88
|
-
|
89
|
-
private
|
90
|
-
|
91
|
-
def process_events!
|
92
|
-
until events.empty? do
|
93
|
-
event = events.pop
|
94
|
-
|
95
|
-
event_listeners.each do |klass, block|
|
96
|
-
if event.is_a? klass
|
97
|
-
block.call event
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
73
|
+
def publish(event)
|
74
|
+
event_runner.publish event
|
101
75
|
end
|
102
76
|
end
|
103
77
|
end
|
@@ -8,16 +8,16 @@ import java.awt.Dimension
|
|
8
8
|
import javax.swing.JPanel
|
9
9
|
import java.awt.Color
|
10
10
|
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
11
|
+
require 'scorched_earth/game'
|
12
|
+
require 'scorched_earth/events/mouse_pressed'
|
13
|
+
require 'scorched_earth/events/mouse_released'
|
14
|
+
require 'scorched_earth/events/mouse_moved'
|
15
15
|
|
16
16
|
module ScorchedEarth
|
17
17
|
class GameWindow
|
18
18
|
attr_reader :buffer_strategy, :canvas, :game
|
19
19
|
|
20
|
-
def initialize
|
20
|
+
def initialize(width, height)
|
21
21
|
@container = JFrame.new
|
22
22
|
@canvas = Canvas.new
|
23
23
|
@panel = @container.get_content_pane
|
@@ -62,39 +62,39 @@ module ScorchedEarth
|
|
62
62
|
graphics.dispose
|
63
63
|
buffer_strategy.show
|
64
64
|
|
65
|
-
sleep 1.0/60
|
65
|
+
sleep 1.0 / 60
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
private
|
70
70
|
|
71
|
-
def mouse_moved
|
71
|
+
def mouse_moved(event)
|
72
72
|
x = event.point.x
|
73
73
|
y = event.point.y
|
74
74
|
|
75
|
-
Events::MouseMoved.new x, y
|
75
|
+
game.publish Events::MouseMoved.new x, y
|
76
76
|
end
|
77
77
|
|
78
|
-
def mouse_dragged
|
78
|
+
def mouse_dragged(*args); end
|
79
79
|
|
80
|
-
def mouse_pressed
|
80
|
+
def mouse_pressed(event)
|
81
81
|
x = event.point.x
|
82
82
|
y = event.point.y
|
83
83
|
|
84
|
-
game.
|
84
|
+
game.publish Events::MousePressed.new x, y
|
85
85
|
end
|
86
86
|
|
87
|
-
def mouse_released
|
87
|
+
def mouse_released(event)
|
88
88
|
x = event.point.x
|
89
89
|
y = event.point.y
|
90
90
|
|
91
|
-
game.
|
91
|
+
game.publish Events::MouseReleased.new x, y
|
92
92
|
end
|
93
93
|
|
94
|
-
def mouse_clicked
|
94
|
+
def mouse_clicked(*args); end
|
95
95
|
|
96
|
-
def mouse_entered
|
96
|
+
def mouse_entered(*args); end
|
97
97
|
|
98
|
-
def mouse_exited
|
98
|
+
def mouse_exited(*args); end
|
99
99
|
end
|
100
100
|
end
|
@@ -38,7 +38,7 @@ module ScorchedEarth
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def inside_radius?(x, y, radius)
|
41
|
-
x
|
41
|
+
x**2 + y**2 < radius**2
|
42
42
|
end
|
43
43
|
|
44
44
|
module_function :angle, :circle, :inside_radius?, :radians_to_degrees, :degrees_to_radians, :normalize_degrees, :offset_x, :offset_y
|
data/lib/scorched_earth/mouse.rb
CHANGED
@@ -1,28 +1,22 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require 'scorched_earth/helpers'
|
2
|
+
require 'scorched_earth/events/mouse_pressed'
|
3
|
+
require 'scorched_earth/events/mouse_released'
|
4
|
+
require 'scorched_earth/events/mouse_moved'
|
5
5
|
|
6
6
|
module ScorchedEarth
|
7
7
|
class Mouse
|
8
8
|
include Helpers
|
9
9
|
|
10
|
-
attr_reader :
|
10
|
+
attr_reader :event_runner, :players, :terrain, :mouse_pressed_at, :x, :y
|
11
11
|
|
12
|
-
def initialize
|
13
|
-
@
|
12
|
+
def initialize(event_runner, players, terrain)
|
13
|
+
@event_runner = event_runner
|
14
|
+
@players = players
|
15
|
+
@terrain = terrain
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
def terrain
|
21
|
-
game.terrain
|
22
|
-
end
|
23
|
-
|
24
|
-
def players
|
25
|
-
game.players
|
17
|
+
event_runner.subscribe Events::MousePressed, &method(:mouse_pressed)
|
18
|
+
event_runner.subscribe Events::MouseReleased, &method(:mouse_released)
|
19
|
+
event_runner.subscribe Events::MouseMoved, &method(:mouse_moved)
|
26
20
|
end
|
27
21
|
|
28
22
|
def current_player
|
@@ -33,40 +27,45 @@ module ScorchedEarth
|
|
33
27
|
players.rotate!
|
34
28
|
end
|
35
29
|
|
36
|
-
def mouse_released
|
30
|
+
def mouse_released(event)
|
37
31
|
return unless mouse_pressed_at
|
38
32
|
|
39
|
-
delta
|
40
|
-
x1
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
33
|
+
delta = (Time.now - mouse_pressed_at) * 1000 + 1000
|
34
|
+
x1 = event.x
|
35
|
+
y1 = event.y
|
36
|
+
x2 = current_player.x
|
37
|
+
y2 = height - terrain[current_player.x]
|
38
|
+
degrees = angle(y2 - y1, x2 - x1) + 180
|
39
|
+
velocity_x = offset_x(degrees, delta)
|
40
|
+
velocity_y = offset_y(degrees, delta)
|
41
|
+
shot = Shot.new current_player.x, terrain[current_player.x], velocity_x, velocity_y, Color.white
|
46
42
|
|
47
|
-
|
43
|
+
event_runner.publish Events::EntityCreated.new shot
|
48
44
|
|
49
45
|
next_player
|
50
46
|
end
|
51
47
|
|
52
|
-
def mouse_pressed
|
48
|
+
def mouse_pressed(_event)
|
53
49
|
@mouse_pressed_at = Time.now
|
54
50
|
end
|
55
51
|
|
56
|
-
def mouse_moved
|
57
|
-
@x
|
52
|
+
def mouse_moved(event)
|
53
|
+
@x = event.x
|
54
|
+
@y = event.y
|
58
55
|
end
|
59
56
|
|
60
57
|
def height
|
61
|
-
|
58
|
+
terrain.height
|
62
59
|
end
|
63
60
|
|
64
61
|
def draw(graphics)
|
65
62
|
return unless x && y
|
66
63
|
|
67
64
|
height = graphics.destination.height
|
68
|
-
x1
|
69
|
-
|
65
|
+
x1 = x
|
66
|
+
y1 = y
|
67
|
+
x2 = current_player.x
|
68
|
+
y2 = height - terrain[current_player.x]
|
70
69
|
|
71
70
|
graphics.set_color player.color
|
72
71
|
graphics.draw_line x1, y1, x2, y2
|
data/lib/scorched_earth/shot.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'scorched_earth/helpers'
|
2
2
|
|
3
3
|
module ScorchedEarth
|
4
4
|
class Shot
|
@@ -6,21 +6,27 @@ module ScorchedEarth
|
|
6
6
|
|
7
7
|
attr_reader :x, :y, :velocity_x, :velocity_y, :color
|
8
8
|
|
9
|
-
def initialize
|
10
|
-
@x
|
9
|
+
def initialize(x, y, velocity_x, velocity_y, color)
|
10
|
+
@x = x
|
11
|
+
@y = y
|
12
|
+
@velocity_x = velocity_x
|
13
|
+
@velocity_y = velocity_y
|
14
|
+
@color = color
|
11
15
|
end
|
12
16
|
|
13
|
-
def update
|
17
|
+
def update(delta)
|
14
18
|
@velocity_y -= gravity * delta
|
15
19
|
@x += velocity_x * delta
|
16
20
|
@y += velocity_y * delta
|
17
21
|
end
|
18
22
|
|
19
|
-
def draw
|
23
|
+
def draw(graphics)
|
20
24
|
height = graphics.destination.height
|
21
25
|
degrees = angle(velocity_y, velocity_x)
|
22
|
-
x1
|
23
|
-
|
26
|
+
x1 = x
|
27
|
+
y1 = height - y
|
28
|
+
x2 = x1 + offset_x(degrees, length)
|
29
|
+
y2 = y1 + offset_y(degrees, length)
|
24
30
|
|
25
31
|
graphics.set_color color
|
26
32
|
graphics.draw_line x1, y1, x2, y2
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'scorched_earth/helpers'
|
2
2
|
|
3
3
|
include Java
|
4
4
|
|
@@ -11,7 +11,8 @@ module ScorchedEarth
|
|
11
11
|
attr_reader :color, :height
|
12
12
|
|
13
13
|
def initialize(width, height, cycles, color)
|
14
|
-
@color
|
14
|
+
@color = color
|
15
|
+
@height = height
|
15
16
|
|
16
17
|
super(width) do |index|
|
17
18
|
Math.sin(index.to_f / width * cycles) * height / 4 + (height / 4)
|
@@ -23,25 +24,25 @@ module ScorchedEarth
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def draw(graphics)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
27
|
+
graphics.draw_image cache { _draw(graphics) }, 0, 0, nil
|
28
|
+
end
|
29
|
+
|
30
|
+
def _draw(graphics)
|
31
|
+
image = graphics
|
32
|
+
.get_device_configuration
|
33
|
+
.create_compatible_image width, height, Transparency::TRANSLUCENT
|
35
34
|
|
36
|
-
|
35
|
+
each_with_index do |y, x|
|
36
|
+
image.graphics.tap do |image_graphics|
|
37
|
+
image_graphics.set_color color
|
38
|
+
image_graphics.draw_line x, height - y, x, height
|
39
|
+
end
|
37
40
|
end
|
38
41
|
|
39
|
-
|
42
|
+
image
|
40
43
|
end
|
41
44
|
|
42
|
-
def bite(center_x, radius)
|
43
|
-
center_y = self[center_x]
|
44
|
-
|
45
|
+
def bite(center_x, radius, center_y = self[center_x])
|
45
46
|
circle(radius) do |offset_x, offset_y|
|
46
47
|
x = center_x + offset_x
|
47
48
|
y = self[x]
|
data/scorched_earth.gemspec
CHANGED
@@ -4,24 +4,24 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'scorched_earth/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'scorched_earth'
|
8
8
|
spec.version = ScorchedEarth::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['James Moriarty']
|
10
|
+
spec.email = ['jamespaulmoriarty@gmail.com']
|
11
11
|
|
12
|
-
spec.summary =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
15
|
-
spec.platform =
|
12
|
+
spec.summary = 'A simple clone of the classic game ScorchedEarth Earth.'
|
13
|
+
spec.homepage = 'https://github.com/jamesmoriarty/scorched-earth'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.platform = 'java'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir =
|
18
|
+
spec.bindir = 'exe'
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = [
|
20
|
+
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
22
|
+
spec.add_development_dependency 'pry'
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.12'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
26
|
+
spec.add_development_dependency 'simplecov'
|
27
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scorched_earth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1.pre
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- James Moriarty
|
@@ -89,6 +89,7 @@ extensions: []
|
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
91
|
- .gitignore
|
92
|
+
- .rubocop.yml
|
92
93
|
- .travis.yml
|
93
94
|
- Gemfile
|
94
95
|
- LICENSE.txt
|
@@ -99,6 +100,7 @@ files:
|
|
99
100
|
- exe/scorched
|
100
101
|
- lib/scorched_earth.rb
|
101
102
|
- lib/scorched_earth/color_palette.rb
|
103
|
+
- lib/scorched_earth/event_runner.rb
|
102
104
|
- lib/scorched_earth/events/entity_created.rb
|
103
105
|
- lib/scorched_earth/events/game_ending.rb
|
104
106
|
- lib/scorched_earth/events/mouse_moved.rb
|