locationclass 0.0.1 → 0.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/main.rb +22 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5052be9593e4ac309aa027505edc929af84fe50c
4
- data.tar.gz: 0aad2382ae054c2ff98116a5f2fe732b85a8642a
3
+ metadata.gz: 74f2082fe5157cbe871a66d5e72df0e576bdaad2
4
+ data.tar.gz: effff02ee9d12e69478abdba94c4d8d35845c5ea
5
5
  SHA512:
6
- metadata.gz: 5bd932a1fd89fdb555e5540387f41d79fce38216bf48a98065c04c563f6b64dac8e98fef239ef53a81ecf201feaade4706719aae0468056ef0615b809e686821
7
- data.tar.gz: 9e80878bed5123f9a305525ce19cac46f3638a461707d5277c8d923c4371fb572f3f9dbd52bc84ccb30c11f4ba533f92b57af3fc3526df7a6579f11e0e344864
6
+ metadata.gz: 5478f999ae911c8ea59f44838371f87f06ba725e39167c02b35ff9361d5b6fdb8184ee3b9c6439838f96875fd30a80eda1461bb6ad8f5ef45f96f44517536d42
7
+ data.tar.gz: f65c5633c99bfd207f7e868175cbcb5611844cbc0661d63895516d9dedaabad1a46502654673929af7a26bca4c2bd30d1bf8b57377c3fea3fccd784588347455
@@ -19,4 +19,26 @@ class Location
19
19
  @x -= x
20
20
  @y -= y
21
21
  end
22
+ #Moves the location to the specified values.
23
+ def moveTo(x, y)
24
+ @x = x
25
+ @y = y
26
+ end
27
+
28
+ #Returns true if @x > @y.
29
+ def highest_value_x?()
30
+ return @x > @y
31
+ end
32
+ #Returns true if @y > @x.
33
+ def highest_value_y?()
34
+ return @y > @x
35
+ end
36
+ #Returns true unless @x > @y.
37
+ def lowest_value_x?()
38
+ return !highest_value_x?()
39
+ end
40
+ #Returns true unless @y > @x.
41
+ def lowest_value_y?()
42
+ return !highest_value_y?()
43
+ end
22
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locationclass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SugarRush
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-06 00:00:00.000000000 Z
11
+ date: 2018-10-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Represents a point on a 2D grid.
14
14
  email: