physicist 0.1.3 → 0.1.4

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: 76440466d9ad32c5399bb29a7968595bba52ef50
4
- data.tar.gz: 66230d9062e4fbf8454c9823167a0c0e99e5d5bc
3
+ metadata.gz: 790c22f595f4cf317124703c8ce30bc0e64b6746
4
+ data.tar.gz: 57a74e633a43c0cb4cf94c2a10fc598cd282cb39
5
5
  SHA512:
6
- metadata.gz: db17689f1ffb37c76c579e6a0f0f3ae2f457cc43a9fb92b27b1115a9fa97c830fedc5b16b87db263751ce9d24b21321e80eddd9a44ac21d54e8c4db379e9dda4
7
- data.tar.gz: 188d057238537f28f5d384d028b68b9f13bb498e4a791564a2ea33d7204a6d7039be21d71e13aa48a9d9e3c34e7b9b797507307ef60960ca43ffa4d7ca000001
6
+ metadata.gz: abaf403f5be9dc22550fa8e4d33f31babbef6e26a3282980ca1068298c15c48b745aeed738512bdf976986da3cd0b6cda03102cb48d5d4eecde2c5415b8d7cc4
7
+ data.tar.gz: 6b90301347b6978a7dd9bbc4bd0c5e26dc5ba2696fdcfc027370cd0d8be29eef03eddfe18dd78f64a4e8b7e873d875426d77b1cb4d17493df0fdabba0f609607
data/lib/physicist.rb CHANGED
@@ -1,6 +1,3 @@
1
- require 'gosu' # note: must require gosu *first*
2
- require 'dedalus'
3
-
4
1
  require 'physicist/version'
5
2
  require 'physicist/simple_body'
6
3
  require 'physicist/body'
@@ -138,9 +138,7 @@ module Physicist
138
138
  def next_obstacle_on_x_axis(y,vx,t,obstacles:)
139
139
  x0,_ = *position
140
140
 
141
- # w = width/2.0
142
- # x0 += w/2.0
143
- w = width/2.0
141
+ w = (width/2.0)
144
142
  x0 += w/2.0
145
143
 
146
144
  obstacles_along_axis = obstacles.select do |obstacle|
@@ -154,18 +152,14 @@ module Physicist
154
152
  if vx > 0
155
153
  obstacles_along_axis.select do |obstacle|
156
154
  ox,_ = *obstacle.position
157
- # ow,oh = *obstacle.dimensions
158
155
 
159
- ox >= x0 + w #/2.0)
156
+ ox >= x0 + w
160
157
  end
161
158
  elsif vx < 0
162
- # require 'pry'
163
- # binding.pry
164
159
  obstacles_along_axis.select do |obstacle|
165
160
  ox,_ = *obstacle.position
166
161
  ow,_ = *obstacle.dimensions
167
162
  x0 >= ox + ow
168
- # ox + ow >= x0
169
163
  end
170
164
  else
171
165
  []
@@ -1,3 +1,6 @@
1
+ require 'gosu' # note: must require gosu *first*
2
+ require 'dedalus'
3
+
1
4
  require_relative 'screen'
2
5
  require_relative 'view'
3
6
 
@@ -1,4 +1,4 @@
1
1
  module Physicist
2
2
  # physicist version
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: physicist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Weissman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-18 00:00:00.000000000 Z
11
+ date: 2016-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler