mars_rovers_dellan 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mars_rovers +14 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0109cf8ea5f312d1793bd59a89a38ef9e51fdd51d034de84b9aa45a3ffdf8256'
|
4
|
+
data.tar.gz: 36149f7172b1861ff6289d6e04b7055152e869619a63ec7f5b72908a2985a750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 823ded0f53e82841295e1fb9f2ca265956c2d4ac282b3d2ec91473c53e86377527366c4b93c0c226b78cbcaebbd3c5b7754fff15ef1d63feb64fbb6f6a87c724
|
7
|
+
data.tar.gz: 218772c514d86b03b04a054db8dc0e1846764068bfaac51c3fc701f3523511669952fd488f04ee0877e166f70d1a99ba5b1f87b13ba816c48918a53e7245c06e
|
data/bin/mars_rovers
CHANGED
@@ -2,10 +2,6 @@
|
|
2
2
|
|
3
3
|
require_relative "../lib/mars_rovers/rover_station"
|
4
4
|
|
5
|
-
puts ""
|
6
|
-
puts ""
|
7
|
-
puts "\e[34m🪐🪐Add Rovers to the Plateau🪐🪐\e[0m"
|
8
|
-
|
9
5
|
max_grid_x = ARGV.shift
|
10
6
|
max_grid_y = ARGV.shift
|
11
7
|
|
@@ -14,7 +10,20 @@ if !max_grid_x || !max_grid_x
|
|
14
10
|
max_grid_y = 5
|
15
11
|
end
|
16
12
|
|
17
|
-
|
13
|
+
max_grid_x = max_grid_x.to_i
|
14
|
+
max_grid_y = max_grid_y.to_i
|
15
|
+
|
16
|
+
if max_grid_x <= 0 || max_grid_y <= 0
|
17
|
+
puts "\e[31mInvalid max grid coordinates)\e[0m"
|
18
|
+
exit(1)
|
19
|
+
end
|
20
|
+
|
21
|
+
puts ""
|
22
|
+
puts ""
|
23
|
+
puts "\e[34m🪐🪐Add Rovers to the Plateau🪐🪐\e[0m"
|
24
|
+
puts "grid size (#{max_grid_x}, #{max_grid_y})"
|
25
|
+
|
26
|
+
rover_station = MarsRovers::RoverStation.new(max_grid_x, max_grid_y)
|
18
27
|
|
19
28
|
loop do
|
20
29
|
puts ""
|