pitchcar 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e5d25f33141f96aecd5559af9d9e4ed55fe443e
4
- data.tar.gz: 65ada2bad29c4c1caa7ec5fb09216c1abc6e2fdf
3
+ metadata.gz: 5c90f21df4d98ee1bffd05769a126c46b1ed309f
4
+ data.tar.gz: 4bfa23d66ea7d036ffc0bb3437b56e719e2c28ad
5
5
  SHA512:
6
- metadata.gz: 86b6cfa6f33c97bec657a9d73ef6d4c419a0acea6bb6adbdcd8953859f64425251c786edd9b2b95067aaf60584656c8502009cb46261b13278b9980c4a415e67
7
- data.tar.gz: 6630c665a33b9c7e9c0e6b5b1978254f1eb8667157e40fe4f24249accc67b7afc4df8b12af8d360e22de2a4713e366c227526f44c3163fb3a7a21d9250a094fc
6
+ metadata.gz: 7570e40a5cc00c1f9aa2c8a2bf3d2565c4ec9879c6de4560a9005dfa67c0970e333bc90cce7b86c5059930adca21adc6d2f5f06a26dc1f1f730933c9d7b139e7
7
+ data.tar.gz: 17ee9a3c803a1ce3b3681e823ab1878ffc1773d6705961c1dd9741eb62343a102c1b1f0e0f792fd55d1d1b5cb9996575450eafaf14a86cf73f6f6083f5d6d96b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pitchcar (0.7.0)
4
+ pitchcar (0.7.1)
5
5
  bazaar
6
6
  rmagick
7
7
 
@@ -90,10 +90,11 @@ module Pitchcar
90
90
  end
91
91
 
92
92
  def assign_start_piece
93
+ return self if pieces.any? { |piece| piece.instance_of? Pieces::Start }
93
94
  start_index = pieces.each_index.select { |i| pieces[i].is_a? Pieces::StraightRightWall }.sample
94
95
  # If there are no straight right pieces, pick any straight piece to be the start
95
96
  start_index = pieces.each_index.select { |i| pieces[i].is_a? Pieces::Straight }.sample if start_index.nil?
96
- self.pieces[start_index] = Pieces::Start.new(pieces[start_index].to_h) unless start_index.nil?
97
+ pieces[start_index] = Pieces::Start.new(pieces[start_index].to_h) unless start_index.nil?
97
98
  self
98
99
  end
99
100
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'pitchcar'
3
- spec.version = '0.7.0'
3
+ spec.version = '0.7.1'
4
4
  spec.date = '2017-02-23'
5
5
  spec.summary = 'Pitchcar Track Generator'
6
6
  spec.description = 'Generates tracks for pitchcar'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pitchcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonah Hirsch