toy_robo_simulator 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +12 -14
- data/lib/toy_robo_simulator/console.rb +1 -1
- data/lib/toy_robo_simulator/version.rb +1 -1
- data/toy_robo_simulator.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4016fca80d3c77475152290f5649498aea551710
|
4
|
+
data.tar.gz: b244d1f36cd2d95e5c769fe78299b16a7ac2739f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc88a7c89a1b81fad615052bacc3537d2317fdc0ad8f8cc859975dfc1766ed99fa4e6edaa8a59c93b3ae15ea0704d110f2962d56976d6b7d59843222d273ae06
|
7
|
+
data.tar.gz: ebb559153f64b60278f11a8f06b8ef3f6f771ccceb31fbcfc055833987ce99ba5643dc739a06b8bdb1687330de2f435d0c3d245ccce47460d459f5b7dd4cef32
|
data/README.md
CHANGED
@@ -53,35 +53,33 @@ However, several rules to follow:
|
|
53
53
|
|
54
54
|
## A Complete Example
|
55
55
|
|
56
|
-
|
57
|
-
Welcome to Toy Robo Simulator!
|
58
|
-
|
59
|
-
Available Commands:
|
60
|
-
- PLACE: Place a robo. Requires x, y, and orientation arguments.
|
61
|
-
e.g. PLACE 2 5 NORTH
|
62
|
-
- MOVE: Move forward
|
63
|
-
- LEFT: Turn left
|
64
|
-
- RIGHT: Turn right
|
65
|
-
- REPORT: Report current position and orientation
|
66
|
-
- HELP: Display all available commands
|
67
|
-
Use PLACE first to start the simulation :)
|
56
|
+
Entering the console, input:
|
68
57
|
|
58
|
+
```
|
69
59
|
00 > PLACE 2 1 NORTH
|
70
60
|
It is placed.
|
61
|
+
|
71
62
|
01 > MOVE
|
72
63
|
It moves forward.
|
64
|
+
|
73
65
|
02 > LEFT
|
74
66
|
It turns left.
|
67
|
+
|
75
68
|
03 > REPORT
|
76
69
|
Robo is now at (2,2) facing WEST
|
70
|
+
|
77
71
|
04 > MOVE
|
78
72
|
It moves forward.
|
73
|
+
|
79
74
|
05 > RIGHT
|
80
75
|
It turns right
|
76
|
+
|
81
77
|
06 > MOVE
|
82
78
|
It moves forward.
|
79
|
+
|
83
80
|
07 > REPORT
|
84
81
|
Robo is now at (1,3) facing NORTH
|
82
|
+
|
85
83
|
08 > exit
|
86
84
|
|
87
85
|
Thank You!
|
@@ -89,11 +87,11 @@ Thank You!
|
|
89
87
|
|
90
88
|
## Development Documentation
|
91
89
|
|
92
|
-
Detailed documentations of every class, module, and method are on [RubyDoc](http://www.rubydoc.info/
|
90
|
+
Detailed documentations of every class, module, and method are on [RubyDoc](http://www.rubydoc.info/github/adlerhsieh/toy_robo_simulator).
|
93
91
|
|
94
92
|
## Contributing
|
95
93
|
|
96
|
-
Bug reports and pull requests are welcome on GitHub
|
94
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/adlerhsieh/toy_robo_simulator). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
97
95
|
|
98
96
|
## License
|
99
97
|
|
@@ -3,7 +3,7 @@ module ToyRoboSimulator
|
|
3
3
|
# users to access the program.
|
4
4
|
class Console
|
5
5
|
attr_accessor :robo
|
6
|
-
# Available
|
6
|
+
# Available user-input commands
|
7
7
|
AVAILABLE_COMMANDS = %w(place move left right report help exit).freeze
|
8
8
|
|
9
9
|
# Initializes a CLI that includes a Robo instance.
|
data/toy_robo_simulator.gemspec
CHANGED
@@ -15,8 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir = '
|
19
|
-
spec.executables =
|
18
|
+
spec.bindir = 'bin'
|
19
|
+
spec.executables = ['robo']
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toy_robo_simulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adler
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
@@ -69,7 +69,8 @@ dependencies:
|
|
69
69
|
description: A CLI that simulates the movement of a robot on a 5x5 table
|
70
70
|
email:
|
71
71
|
- nkj20932@hotmail.com
|
72
|
-
executables:
|
72
|
+
executables:
|
73
|
+
- robo
|
73
74
|
extensions: []
|
74
75
|
extra_rdoc_files: []
|
75
76
|
files:
|