trackler 1.0.0 → 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/CHANGELOG.md +9 -1
- data/README.md +10 -0
- data/common/CONTRIBUTING.md +50 -2
- data/common/exercises/alphametics/canonical-data.json +10 -10
- data/common/exercises/markdown/canonical-data.json +4 -4
- data/common/exercises/pov/canonical-data.json +356 -0
- data/lib/trackler/version.rb +1 -1
- data/trackler.gemspec +1 -2
- data/tracks/c/config.json +11 -1
- data/tracks/c/exercises/binary-search/makefile +16 -0
- data/tracks/c/exercises/binary-search/src/example.c +21 -0
- data/tracks/c/exercises/binary-search/src/example.h +8 -0
- data/tracks/c/exercises/binary-search/test/test_binary_search.c +99 -0
- data/tracks/c/exercises/binary-search/test/vendor/unity.c +1300 -0
- data/tracks/c/exercises/binary-search/test/vendor/unity.h +274 -0
- data/tracks/c/exercises/binary-search/test/vendor/unity_internals.h +701 -0
- data/tracks/clojure/config.json +3 -2
- data/tracks/clojure/exercises/bank-account/project.clj +4 -0
- data/tracks/clojure/exercises/bank-account/src/example.clj +17 -0
- data/tracks/clojure/exercises/bank-account/test/bank_account_test.clj +44 -0
- data/tracks/clojure/exercises/isogram/project.clj +4 -0
- data/tracks/clojure/exercises/isogram/src/example.clj +5 -0
- data/tracks/clojure/exercises/isogram/test/isogram_test.clj +17 -0
- data/tracks/csharp/config.json +27 -87
- data/tracks/csharp/exercises/exercises.csproj +265 -1
- data/tracks/csharp/exercises/grep/Example.cs +114 -0
- data/tracks/csharp/exercises/grep/GrepTest.cs +376 -0
- data/tracks/csharp/exercises/paket.references +2 -1
- data/tracks/csharp/exercises/poker/Example.cs +96 -0
- data/tracks/csharp/exercises/poker/PokerTest.cs +171 -0
- data/tracks/csharp/exercises/sgf-parsing/Example.cs +61 -0
- data/tracks/csharp/exercises/sgf-parsing/SgfParsing.cs +13 -0
- data/tracks/csharp/exercises/sgf-parsing/SgfParsingTest.cs +158 -0
- data/tracks/csharp/paket.dependencies +2 -1
- data/tracks/csharp/paket.lock +72 -0
- data/tracks/ecmascript/exercises/simple-cipher/simple-cipher.spec.js +1 -1
- data/tracks/elisp/config.json +6 -1
- data/tracks/elisp/exercises/etl/etl-test.el +90 -0
- data/tracks/elisp/exercises/etl/etl.el +9 -0
- data/tracks/elisp/exercises/etl/example.el +22 -0
- data/tracks/elisp/exercises/nucleotide-count/example.el +19 -0
- data/tracks/elisp/exercises/nucleotide-count/nucleotide-count-test.el +34 -0
- data/tracks/elisp/exercises/nucleotide-count/nucleotide-count.el +9 -0
- data/tracks/elisp/exercises/perfect-numbers/example.el +28 -0
- data/tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el +24 -0
- data/tracks/elisp/exercises/perfect-numbers/perfect-numbers.el +10 -0
- data/tracks/elisp/exercises/roman-numerals/example.el +36 -0
- data/tracks/elisp/exercises/roman-numerals/roman-numerals-test.el +30 -0
- data/tracks/elisp/exercises/roman-numerals/roman-numerals.el +10 -0
- data/tracks/elisp/exercises/word-count/example.el +18 -0
- data/tracks/elisp/exercises/word-count/word-count-test.el +64 -0
- data/tracks/elisp/exercises/word-count/word-count.el +9 -0
- data/tracks/elixir/README.md +4 -4
- data/tracks/elixir/SETUP.md +3 -3
- data/tracks/elixir/docs/TESTS.md +3 -3
- data/tracks/elixir/exercises/accumulate/accumulate_test.exs +7 -7
- data/tracks/elixir/exercises/acronym/acronym_test.exs +5 -5
- data/tracks/elixir/exercises/allergies/allergies_test.exs +13 -13
- data/tracks/elixir/exercises/anagram/anagram_test.exs +12 -12
- data/tracks/elixir/exercises/atbash-cipher/atbash_cipher_test.exs +9 -9
- data/tracks/elixir/exercises/bank-account/bank_account_test.exs +5 -5
- data/tracks/elixir/exercises/beer-song/beer_song_test.exs +6 -6
- data/tracks/elixir/exercises/binary-search/binary_search_test.exs +7 -7
- data/tracks/elixir/exercises/binary/binary_test.exs +13 -13
- data/tracks/elixir/exercises/bob/bob_test.exs +15 -15
- data/tracks/elixir/exercises/bowling/bowling_test.exs +18 -18
- data/tracks/elixir/exercises/bracket-push/bracket_push_test.exs +12 -12
- data/tracks/elixir/exercises/change/change_test.exs +7 -7
- data/tracks/elixir/exercises/connect/connect_test.exs +9 -9
- data/tracks/elixir/exercises/crypto-square/crypto_square_test.exs +7 -7
- data/tracks/elixir/exercises/custom-set/custom_set_test.exs +11 -11
- data/tracks/elixir/exercises/diamond/diamond_test.exs +4 -4
- data/tracks/elixir/exercises/difference-of-squares/difference_of_squares_test.exs +10 -10
- data/tracks/elixir/exercises/dot-dsl/dot_dsl_test.exs +17 -17
- data/tracks/elixir/exercises/etl/etl_test.exs +5 -5
- data/tracks/elixir/exercises/flatten-array/flatten_array_test.exs +6 -6
- data/tracks/elixir/exercises/forth/forth_test.exs +16 -16
- data/tracks/elixir/exercises/gigasecond/gigasecond_test.exs +5 -5
- data/tracks/elixir/exercises/grade-school/grade_school_test.exs +6 -6
- data/tracks/elixir/exercises/grains/grains_test.exs +9 -9
- data/tracks/elixir/exercises/hamming/hamming_test.exs +6 -6
- data/tracks/elixir/exercises/hello-world/hello_world_test.exs +3 -3
- data/tracks/elixir/exercises/hexadecimal/hexadecimal_test.exs +11 -11
- data/tracks/elixir/exercises/isogram/isogram_test.exs +10 -10
- data/tracks/elixir/exercises/kindergarten-garden/garden_test.exs +7 -7
- data/tracks/elixir/exercises/largest-series-product/largest_series_product_test.exs +17 -17
- data/tracks/elixir/exercises/leap/leap_test.exs +5 -5
- data/tracks/elixir/exercises/list-ops/list_ops_test.exs +26 -26
- data/tracks/elixir/exercises/luhn/luhn_test.exs +7 -7
- data/tracks/elixir/exercises/markdown/markdown_test.exs +10 -10
- data/tracks/elixir/exercises/meetup/meetup_test.exs +92 -92
- data/tracks/elixir/exercises/minesweeper/minesweeper_test.exs +8 -8
- data/tracks/elixir/exercises/nth-prime/nth_prime_test.exs +6 -6
- data/tracks/elixir/exercises/nucleotide-count/example.exs +0 -5
- data/tracks/elixir/exercises/nucleotide-count/nucleotide_count_test.exs +7 -7
- data/tracks/elixir/exercises/palindrome-products/palindrome_products_test.exs +6 -6
- data/tracks/elixir/exercises/pangram/pangram_test.exs +11 -11
- data/tracks/elixir/exercises/parallel-letter-frequency/parallel_letter_frequency_test.exs +10 -10
- data/tracks/elixir/exercises/pascals-triangle/pascals_triangle_test.exs +7 -7
- data/tracks/elixir/exercises/phone-number/phone_number_test.exs +10 -10
- data/tracks/elixir/exercises/prime-factors/prime_factors_test.exs +13 -13
- data/tracks/elixir/exercises/pythagorean-triplet/pythagorean_triplet_test.exs +8 -8
- data/tracks/elixir/exercises/queen-attack/queen_attack_test.exs +16 -16
- data/tracks/elixir/exercises/rail-fence-cipher/rail_fence_cipher_test.exs +13 -13
- data/tracks/elixir/exercises/raindrops/raindrops_test.exs +17 -17
- data/tracks/elixir/exercises/rna-transcription/rna_transcription_test.exs +6 -6
- data/tracks/elixir/exercises/robot-simulator/robot_simulator_test.exs +6 -6
- data/tracks/elixir/exercises/roman-numerals/roman_numerals_test.exs +19 -19
- data/tracks/elixir/exercises/run-length-encoding/rle_test.exs +6 -6
- data/tracks/elixir/exercises/saddle-points/saddle_points_test.exs +11 -11
- data/tracks/elixir/exercises/scrabble-score/scrabble_score_test.exs +9 -9
- data/tracks/elixir/exercises/sieve/sieve_test.exs +3 -3
- data/tracks/elixir/exercises/space-age/space_age_test.exs +9 -9
- data/tracks/elixir/exercises/sublist/sublist_test.exs +20 -20
- data/tracks/elixir/exercises/sum-of-multiples/sum_of_multiples_test.exs +11 -11
- data/tracks/elixir/exercises/test_helper.exs +1 -1
- data/tracks/elixir/exercises/triangle/triangle_test.exs +16 -16
- data/tracks/elixir/exercises/word-count/word_count_test.exs +9 -9
- data/tracks/elixir/exercises/wordy/wordy_test.exs +16 -16
- data/tracks/elixir/exercises/zipper/zipper_test.exs +13 -13
- data/tracks/fsharp/build.fsx +2 -7
- data/tracks/fsharp/config.json +0 -104
- data/tracks/fsharp/exercises/grep/GrepTest.fs +7 -1
- data/tracks/go/config.json +1 -0
- data/tracks/go/exercises/acronym/acronym_test.go +36 -0
- data/tracks/go/exercises/acronym/example.go +21 -0
- data/tracks/go/exercises/palindrome-products/example.go +2 -0
- data/tracks/go/exercises/palindrome-products/palindrome_products_test.go +10 -0
- data/tracks/go/exercises/phone-number/example.go +2 -0
- data/tracks/go/exercises/phone-number/phone_number_test.go +44 -27
- data/tracks/go/exercises/robot-simulator/defs.go +6 -6
- data/tracks/go/exercises/robot-simulator/example.go +22 -22
- data/tracks/go/exercises/robot-simulator/robot_simulator_step2_test.go +28 -28
- data/tracks/go/exercises/robot-simulator/robot_simulator_step3_test.go +75 -76
- data/tracks/go/exercises/robot-simulator/robot_simulator_test.go +10 -4
- data/tracks/haskell/exercises/anagram/HINTS.md +22 -0
- data/tracks/haskell/exercises/anagram/package.yaml +3 -0
- data/tracks/haskell/exercises/anagram/src/Example.hs +10 -7
- data/tracks/haskell/exercises/anagram/test/Tests.hs +9 -3
- data/tracks/haskell/exercises/beer-song/HINTS.md +18 -0
- data/tracks/haskell/exercises/beer-song/src/Beer.hs +301 -3
- data/tracks/haskell/exercises/beer-song/src/Example.hs +5 -3
- data/tracks/haskell/exercises/beer-song/test/Tests.hs +332 -23
- data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +3 -17
- data/tracks/haskell/exercises/crypto-square/src/Example.hs +12 -20
- data/tracks/haskell/exercises/crypto-square/test/Tests.hs +46 -86
- data/tracks/haskell/exercises/leap/HINTS.md +11 -0
- data/tracks/haskell/exercises/leap/src/LeapYear.hs +1 -0
- data/tracks/java/exercises/pangram/src/test/java/PangramTest.java +34 -4
- data/tracks/lua/exercises/pov/pov_spec.lua +0 -13
- data/tracks/mips/docs/ABOUT.md +1 -1
- data/tracks/objective-c/config.json +225 -0
- data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.h +8 -0
- data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductExample.m +63 -0
- data/tracks/objective-c/exercises/largest-series-product/LargestSeriesProductTest.m +84 -0
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
- data/tracks/ocaml/.travis-ci.sh +23 -0
- data/tracks/ocaml/.travis.yml +5 -1
- data/tracks/ocaml/Makefile +41 -0
- data/tracks/ocaml/config.json +18 -0
- data/tracks/ocaml/exercises/anagram/Makefile +1 -0
- data/tracks/ocaml/exercises/beer-song/Makefile +1 -0
- data/tracks/ocaml/exercises/beer-song/{beer.mli → beer_song.mli} +0 -0
- data/tracks/ocaml/exercises/beer-song/example.ml +1 -1
- data/tracks/ocaml/exercises/beer-song/test.ml +7 -6
- data/tracks/ocaml/exercises/bob/Makefile +1 -0
- data/tracks/ocaml/exercises/bowling/Makefile +1 -0
- data/tracks/ocaml/exercises/custom-set/Makefile +1 -0
- data/tracks/ocaml/exercises/difference-of-squares/.merlin +5 -0
- data/tracks/ocaml/exercises/difference-of-squares/Makefile +11 -0
- data/tracks/ocaml/exercises/difference-of-squares/difference_of_squares.mli +8 -0
- data/tracks/ocaml/exercises/difference-of-squares/example.ml +21 -0
- data/tracks/ocaml/exercises/difference-of-squares/test.ml +32 -0
- data/tracks/ocaml/exercises/grade-school/Makefile +1 -0
- data/tracks/ocaml/exercises/grade-school/{school.mli → grade_school.mli} +0 -0
- data/tracks/ocaml/exercises/grade-school/test.ml +27 -27
- data/tracks/ocaml/exercises/hamming/Makefile +1 -0
- data/tracks/ocaml/exercises/hangman/Makefile +1 -0
- data/tracks/ocaml/exercises/hello-world/Makefile +1 -1
- data/tracks/ocaml/exercises/hello-world/{hello.ml → hello_world.ml} +0 -0
- data/tracks/ocaml/exercises/hello-world/{hello.mli → hello_world.mli} +0 -0
- data/tracks/ocaml/exercises/hello-world/test.ml +1 -1
- data/tracks/ocaml/exercises/hexadecimal/Makefile +1 -0
- data/tracks/ocaml/exercises/leap/Makefile +1 -1
- data/tracks/ocaml/exercises/list-ops/Makefile +1 -0
- data/tracks/ocaml/exercises/luhn/Makefile +1 -0
- data/tracks/ocaml/exercises/minesweeper/Makefile +1 -0
- data/tracks/ocaml/exercises/nucleotide-count/Makefile +1 -0
- data/tracks/ocaml/exercises/nucleotide-count/{dna.mli → nucleotide_count.mli} +0 -0
- data/tracks/ocaml/exercises/nucleotide-count/test.ml +7 -7
- data/tracks/ocaml/exercises/phone-number/Makefile +1 -0
- data/tracks/ocaml/exercises/phone-number/{phone.mli → phone_number.mli} +0 -0
- data/tracks/ocaml/exercises/phone-number/test.ml +10 -10
- data/tracks/ocaml/exercises/point-mutations/Makefile +8 -0
- data/tracks/ocaml/exercises/point-mutations/example.ml +0 -0
- data/tracks/ocaml/exercises/prime-factors/Makefile +1 -0
- data/tracks/ocaml/exercises/raindrops/.merlin +5 -0
- data/tracks/ocaml/exercises/raindrops/Makefile +11 -0
- data/tracks/ocaml/exercises/raindrops/example.ml +11 -0
- data/tracks/ocaml/exercises/raindrops/raindrops.mli +7 -0
- data/tracks/ocaml/exercises/raindrops/test.ml +48 -0
- data/tracks/ocaml/exercises/rna-transcription/Makefile +1 -0
- data/tracks/ocaml/exercises/rna-transcription/{dna.mli → rna_transcription.mli} +0 -0
- data/tracks/ocaml/exercises/rna-transcription/test.ml +6 -6
- data/tracks/ocaml/exercises/roman-numerals/Makefile +1 -0
- data/tracks/ocaml/exercises/say/.gitignore +1 -0
- data/tracks/ocaml/exercises/say/.merlin +5 -0
- data/tracks/ocaml/exercises/say/Makefile +11 -0
- data/tracks/ocaml/exercises/say/example.ml +52 -0
- data/tracks/ocaml/exercises/say/say.mli +8 -0
- data/tracks/ocaml/exercises/say/test.ml +65 -0
- data/tracks/ocaml/exercises/space-age/Makefile +1 -0
- data/tracks/ocaml/exercises/word-count/Makefile +1 -0
- data/tracks/ocaml/exercises/word-count/example.ml +1 -1
- data/tracks/ocaml/exercises/zipper/HINT.md +5 -6
- data/tracks/ocaml/exercises/zipper/Makefile +1 -0
- data/tracks/ocaml/exercises/zipper/example.ml +2 -2
- data/tracks/ocaml/exercises/zipper/tree.ml +1 -1
- data/tracks/php/config.json +7 -1
- data/tracks/php/exercises/variable-length-quantity/example.php +56 -0
- data/tracks/php/exercises/variable-length-quantity/variable-length-quantity_test.php +149 -0
- data/tracks/python/config.json +1 -1
- data/tracks/ruby/.rubocop.yml +1915 -26
- data/tracks/ruby/bin/generate-acronym +7 -0
- data/tracks/ruby/bin/generate-nth-prime +7 -0
- data/tracks/ruby/config.json +482 -0
- data/tracks/ruby/exercises/acronym/.version +1 -0
- data/tracks/ruby/exercises/acronym/acronym_test.rb +45 -21
- data/tracks/ruby/exercises/acronym/example.rb +1 -1
- data/tracks/ruby/exercises/acronym/example.tt +19 -0
- data/tracks/ruby/exercises/anagram/anagram_test.rb +1 -1
- data/tracks/ruby/exercises/nth-prime/.version +1 -0
- data/tracks/ruby/exercises/nth-prime/example.rb +4 -0
- data/tracks/ruby/exercises/nth-prime/example.tt +23 -0
- data/tracks/ruby/exercises/nth-prime/nth_prime_test.rb +33 -10
- data/tracks/ruby/exercises/raindrops/.version +1 -1
- data/tracks/ruby/exercises/raindrops/example.rb +1 -1
- data/tracks/ruby/exercises/raindrops/raindrops_test.rb +20 -5
- data/tracks/ruby/lib/acronym_cases.rb +19 -0
- data/tracks/ruby/lib/generator.rb +3 -2
- data/tracks/ruby/lib/nth_prime_cases.rb +23 -0
- data/tracks/ruby/lib/raindrop_cases.rb +1 -1
- data/tracks/rust/README.md +1 -1
- data/tracks/scala/exercises/leap/src/test/scala/leap_test.scala +10 -0
- data/tracks/scala/exercises/prime-factors/example.scala +2 -5
- data/tracks/scala/exercises/prime-factors/src/test/scala/primefactors_test.scala +11 -13
- data/tracks/scheme/{anagram → exercises/anagram}/anagram-test.scm +0 -0
- data/tracks/scheme/{anagram → exercises/anagram}/anagram.scm +0 -0
- data/tracks/scheme/{anagram → exercises/anagram}/example.scm +0 -0
- data/tracks/scheme/{bob → exercises/bob}/bob-test.scm +0 -0
- data/tracks/scheme/{bob → exercises/bob}/bob.scm +0 -0
- data/tracks/scheme/{bob → exercises/bob}/example.scm +0 -0
- data/tracks/scheme/{difference-of-squares → exercises/difference-of-squares}/difference-of-squares-test.scm +0 -0
- data/tracks/scheme/{difference-of-squares → exercises/difference-of-squares}/example.scm +0 -0
- data/tracks/scheme/{difference-of-squares → exercises/difference-of-squares}/squares.scm +0 -0
- data/tracks/scheme/{grains → exercises/grains}/example.scm +0 -0
- data/tracks/scheme/{grains → exercises/grains}/grains-test.scm +0 -0
- data/tracks/scheme/{grains → exercises/grains}/grains.scm +0 -0
- data/tracks/scheme/{hamming → exercises/hamming}/example.scm +0 -0
- data/tracks/scheme/{hamming → exercises/hamming}/hamming-test.scm +0 -0
- data/tracks/scheme/{hamming → exercises/hamming}/hamming.scm +0 -0
- data/tracks/scheme/{hello-world → exercises/hello-world}/example.scm +0 -0
- data/tracks/scheme/{hello-world → exercises/hello-world}/hello-world-test.scm +0 -0
- data/tracks/scheme/{hello-world → exercises/hello-world}/hello-world.scm +0 -0
- data/tracks/scheme/{leap → exercises/leap}/example.scm +0 -0
- data/tracks/scheme/{leap → exercises/leap}/leap-test.scm +0 -0
- data/tracks/scheme/{leap → exercises/leap}/leap-year.scm +0 -0
- data/tracks/scheme/{list-ops → exercises/list-ops}/example.scm +0 -0
- data/tracks/scheme/{list-ops → exercises/list-ops}/list-ops-test.scm +0 -0
- data/tracks/scheme/{list-ops → exercises/list-ops}/list-ops.scm +0 -0
- data/tracks/scheme/{nucleotide-count → exercises/nucleotide-count}/example.scm +0 -0
- data/tracks/scheme/{nucleotide-count → exercises/nucleotide-count}/nucleotide-count-test.scm +0 -0
- data/tracks/scheme/{nucleotide-count → exercises/nucleotide-count}/nucleotide-count.scm +0 -0
- data/tracks/scheme/{phone-number → exercises/phone-number}/example.scm +0 -0
- data/tracks/scheme/{phone-number → exercises/phone-number}/phone-number-test.scm +0 -0
- data/tracks/scheme/{phone-number → exercises/phone-number}/phone-number.scm +0 -0
- data/tracks/scheme/{raindrops → exercises/raindrops}/example.scm +0 -0
- data/tracks/scheme/{raindrops → exercises/raindrops}/raindrops-test.scm +0 -0
- data/tracks/scheme/{raindrops → exercises/raindrops}/raindrops.scm +0 -0
- data/tracks/scheme/{rna-transcription → exercises/rna-transcription}/dna.scm +0 -0
- data/tracks/scheme/{rna-transcription → exercises/rna-transcription}/example.scm +0 -0
- data/tracks/scheme/{rna-transcription → exercises/rna-transcription}/rna-transcription-test.scm +0 -0
- data/tracks/scheme/{robot-name → exercises/robot-name}/example.scm +0 -0
- data/tracks/scheme/{robot-name → exercises/robot-name}/robot-name-test.scm +0 -0
- data/tracks/scheme/{robot-name → exercises/robot-name}/robot.scm +0 -0
- metadata +125 -64
@@ -4,10 +4,10 @@ import "fmt"
|
|
4
4
|
|
5
5
|
// definitions used in step 1
|
6
6
|
|
7
|
-
var
|
7
|
+
var Step1Robot struct {
|
8
8
|
X, Y int
|
9
|
-
|
10
|
-
|
9
|
+
Dir
|
10
|
+
}
|
11
11
|
|
12
12
|
type Dir int
|
13
13
|
|
@@ -19,14 +19,14 @@ type Command byte // valid values are 'R', 'L', 'A'
|
|
19
19
|
type RU int
|
20
20
|
type Pos struct{ Easting, Northing RU }
|
21
21
|
type Rect struct{ Min, Max Pos }
|
22
|
-
type
|
22
|
+
type Step2Robot struct {
|
23
23
|
Dir
|
24
24
|
Pos
|
25
25
|
}
|
26
26
|
|
27
27
|
// additional definition used in step 3
|
28
28
|
|
29
|
-
type
|
29
|
+
type Step3Robot struct {
|
30
30
|
Name string
|
31
|
-
|
31
|
+
Step2Robot
|
32
32
|
}
|
@@ -3,7 +3,7 @@ package robot
|
|
3
3
|
import "fmt"
|
4
4
|
|
5
5
|
// ======= Step 1
|
6
|
-
|
6
|
+
const testVersion = 3
|
7
7
|
const (
|
8
8
|
N Dir = iota
|
9
9
|
E
|
@@ -15,13 +15,13 @@ func (d Dir) String() string {
|
|
15
15
|
return "NESW"[d : d+1]
|
16
16
|
}
|
17
17
|
|
18
|
-
func Right() {
|
19
|
-
func Left() {
|
18
|
+
func Right() { Step1Robot.Dir = (Step1Robot.Dir + 1) % 4 }
|
19
|
+
func Left() { Step1Robot.Dir = (Step1Robot.Dir + 3) % 4 }
|
20
20
|
func Advance() {
|
21
|
-
if
|
22
|
-
X += 1 - int(
|
21
|
+
if Step1Robot.Dir&1 == 1 {
|
22
|
+
Step1Robot.X += 1 - int(Step1Robot.Dir&2)
|
23
23
|
} else {
|
24
|
-
Y += 1 - int(
|
24
|
+
Step1Robot.Y += 1 - int(Step1Robot.Dir&2)
|
25
25
|
}
|
26
26
|
}
|
27
27
|
|
@@ -29,33 +29,33 @@ func Advance() {
|
|
29
29
|
|
30
30
|
type Action byte
|
31
31
|
|
32
|
-
func
|
32
|
+
func StartRobot(cmd chan Command, act chan Action) {
|
33
33
|
for c := range cmd {
|
34
34
|
act <- Action(c)
|
35
35
|
}
|
36
36
|
close(act)
|
37
37
|
}
|
38
38
|
|
39
|
-
func Room(extent Rect,
|
39
|
+
func Room(extent Rect, robot Step2Robot, act chan Action, report chan Step2Robot) {
|
40
40
|
for a := range act {
|
41
41
|
switch a {
|
42
42
|
case 'R':
|
43
|
-
|
43
|
+
robot.Dir = (robot.Dir + 1) % 4
|
44
44
|
case 'L':
|
45
|
-
|
45
|
+
robot.Dir = (robot.Dir + 3) % 4
|
46
46
|
case 'A':
|
47
|
-
np :=
|
48
|
-
if
|
49
|
-
np.Easting += 1 - RU(
|
47
|
+
np := robot.Pos
|
48
|
+
if robot.Dir&1 == 1 {
|
49
|
+
np.Easting += 1 - RU(robot.Dir&2)
|
50
50
|
} else {
|
51
|
-
np.Northing += 1 - RU(
|
51
|
+
np.Northing += 1 - RU(robot.Dir&2)
|
52
52
|
}
|
53
53
|
if in(np, extent) {
|
54
|
-
|
54
|
+
robot.Pos = np
|
55
55
|
}
|
56
56
|
}
|
57
57
|
}
|
58
|
-
report <-
|
58
|
+
report <- robot
|
59
59
|
}
|
60
60
|
|
61
61
|
func in(p Pos, ext Rect) bool {
|
@@ -72,14 +72,14 @@ type Action3 struct {
|
|
72
72
|
|
73
73
|
const beep = 7 // robots beep to communicate that they are done
|
74
74
|
|
75
|
-
func
|
75
|
+
func StartRobot3(name, script string, act chan Action3, log chan string) {
|
76
76
|
for i := 0; i < len(script); i++ {
|
77
77
|
act <- Action3{name, script[i]}
|
78
78
|
}
|
79
79
|
act <- Action3{name, beep}
|
80
80
|
}
|
81
81
|
|
82
|
-
func Room3(extent Rect, robots []
|
82
|
+
func Room3(extent Rect, robots []Step3Robot, act chan Action3, rep chan []Step3Robot, log chan string) {
|
83
83
|
// The function has multiple returns. No matter what, rep <- is how we
|
84
84
|
// communicate to the test program that the room is terminating.
|
85
85
|
defer func() { rep <- robots }()
|
@@ -96,15 +96,15 @@ func Room3(extent Rect, robots []Place, act chan Action3, rep chan []Place, log
|
|
96
96
|
}
|
97
97
|
nx[r.Name] = x
|
98
98
|
|
99
|
-
if !in(r.
|
99
|
+
if !in(r.Step2Robot.Pos, extent) {
|
100
100
|
log <- "Robot placed outside room"
|
101
101
|
return
|
102
102
|
}
|
103
|
-
if _, ok := px[r.
|
103
|
+
if _, ok := px[r.Step2Robot.Pos]; ok {
|
104
104
|
log <- "Position occupied"
|
105
105
|
return
|
106
106
|
}
|
107
|
-
px[r.
|
107
|
+
px[r.Step2Robot.Pos] = x
|
108
108
|
}
|
109
109
|
done := 0
|
110
110
|
for a := range act {
|
@@ -113,7 +113,7 @@ func Room3(extent Rect, robots []Place, act chan Action3, rep chan []Place, log
|
|
113
113
|
log <- "Action by unknown robot"
|
114
114
|
return
|
115
115
|
}
|
116
|
-
da := &robots[x].
|
116
|
+
da := &robots[x].Step2Robot
|
117
117
|
switch a.action {
|
118
118
|
case 'R':
|
119
119
|
da.Dir = (da.Dir + 1) % 4
|
@@ -12,7 +12,7 @@ import "testing"
|
|
12
12
|
// Step 2 introduces a "room." It seems a small addition, but we'll make
|
13
13
|
// big changes to clarify the rolls of "room", "robot", and "test program"
|
14
14
|
// and begin to clarify the physics of the simulation. You will define Room
|
15
|
-
// and Robot as functions which the test program "brings into
|
15
|
+
// and Robot as functions which the test program "brings into existence" by
|
16
16
|
// launching them as goroutines. Information moves between test program,
|
17
17
|
// robot, and room over Go channels.
|
18
18
|
//
|
@@ -21,12 +21,12 @@ import "testing"
|
|
21
21
|
// coordinate space of the room, the location of the robot and the walls,
|
22
22
|
// and ensure for example that the robot doesn't walk through walls.
|
23
23
|
// We want Robot to be an agent that performs actions, but we want Room to
|
24
|
-
// maintain a
|
24
|
+
// maintain a coherent truth.
|
25
25
|
//
|
26
26
|
// Step 2 API:
|
27
27
|
//
|
28
|
-
//
|
29
|
-
// Room(extent Rect,
|
28
|
+
// StartRobot(chan Command, chan Action)
|
29
|
+
// Room(extent Rect, robot Step2Robot, act chan Action, rep chan Step2Robot)
|
30
30
|
//
|
31
31
|
// You get to define Action; see defs.go for other definitions.
|
32
32
|
//
|
@@ -41,27 +41,27 @@ import "testing"
|
|
41
41
|
|
42
42
|
var test2 = []struct {
|
43
43
|
Command
|
44
|
-
|
44
|
+
Step2Robot
|
45
45
|
}{
|
46
|
-
0: {' ',
|
47
|
-
1: {'A',
|
48
|
-
2: {'R',
|
49
|
-
3: {'A',
|
50
|
-
4: {'L',
|
51
|
-
5: {'L',
|
52
|
-
6: {'L',
|
53
|
-
7: {'A',
|
54
|
-
8: {'R',
|
55
|
-
9: {'A',
|
56
|
-
10: {'A',
|
57
|
-
11: {'L',
|
58
|
-
12: {'A',
|
59
|
-
13: {'L',
|
60
|
-
14: {'A',
|
61
|
-
15: {'A',
|
62
|
-
16: {'L',
|
63
|
-
17: {'A',
|
64
|
-
18: {'A',
|
46
|
+
0: {' ', Step2Robot{N, Pos{1, 1}}}, // no command, this is the start DirAt
|
47
|
+
1: {'A', Step2Robot{N, Pos{1, 2}}},
|
48
|
+
2: {'R', Step2Robot{E, Pos{1, 2}}},
|
49
|
+
3: {'A', Step2Robot{E, Pos{2, 2}}},
|
50
|
+
4: {'L', Step2Robot{N, Pos{2, 2}}},
|
51
|
+
5: {'L', Step2Robot{W, Pos{2, 2}}},
|
52
|
+
6: {'L', Step2Robot{S, Pos{2, 2}}},
|
53
|
+
7: {'A', Step2Robot{S, Pos{2, 1}}},
|
54
|
+
8: {'R', Step2Robot{W, Pos{2, 1}}},
|
55
|
+
9: {'A', Step2Robot{W, Pos{1, 1}}},
|
56
|
+
10: {'A', Step2Robot{W, Pos{1, 1}}}, // bump W wall
|
57
|
+
11: {'L', Step2Robot{S, Pos{1, 1}}},
|
58
|
+
12: {'A', Step2Robot{S, Pos{1, 1}}}, // bump S wall
|
59
|
+
13: {'L', Step2Robot{E, Pos{1, 1}}},
|
60
|
+
14: {'A', Step2Robot{E, Pos{2, 1}}},
|
61
|
+
15: {'A', Step2Robot{E, Pos{2, 1}}}, // bump E wall
|
62
|
+
16: {'L', Step2Robot{N, Pos{2, 1}}},
|
63
|
+
17: {'A', Step2Robot{N, Pos{2, 2}}},
|
64
|
+
18: {'A', Step2Robot{N, Pos{2, 2}}}, // bump N wall
|
65
65
|
}
|
66
66
|
|
67
67
|
func TestStep2(t *testing.T) {
|
@@ -69,16 +69,16 @@ func TestStep2(t *testing.T) {
|
|
69
69
|
for i := 1; i <= len(test2); i++ {
|
70
70
|
cmd := make(chan Command)
|
71
71
|
act := make(chan Action)
|
72
|
-
rep := make(chan
|
73
|
-
go
|
74
|
-
go Room(Rect{Pos{1, 1}, Pos{2, 2}}, test2[0].
|
72
|
+
rep := make(chan Step2Robot)
|
73
|
+
go StartRobot(cmd, act)
|
74
|
+
go Room(Rect{Pos{1, 1}, Pos{2, 2}}, test2[0].Step2Robot, act, rep)
|
75
75
|
for j := 1; j < i; j++ {
|
76
76
|
cmd <- test2[j].Command
|
77
77
|
}
|
78
78
|
close(cmd)
|
79
79
|
da := <-rep
|
80
80
|
last := i - 1
|
81
|
-
want := test2[last].
|
81
|
+
want := test2[last].Step2Robot
|
82
82
|
if da.Pos != want.Pos {
|
83
83
|
t.Fatalf("Command #%d, Pos = %v, want %v", last, da.Pos, want.Pos)
|
84
84
|
}
|
@@ -12,14 +12,13 @@ import "testing"
|
|
12
12
|
//
|
13
13
|
// Step 3 API:
|
14
14
|
//
|
15
|
-
//
|
16
|
-
// Room3(extent Rect, robots []
|
17
|
-
// action chan Action3, report chan []Place, log chan string)
|
15
|
+
// StartRobot3(name, script string, action chan Action3, log chan string)
|
16
|
+
// Room3(extent Rect, robots []Step3Robot, action chan Action3, report chan []Step3Robot, log chan string)
|
18
17
|
//
|
19
18
|
// Again, you define Action3.
|
20
19
|
//
|
21
|
-
// For the final position report sent from
|
22
|
-
//
|
20
|
+
// For the final position report sent from StartRobot3, you can return the same slice
|
21
|
+
// received from the robots channel, just with updated positions and directions.
|
23
22
|
//
|
24
23
|
// Messages must be sent on the log channel for
|
25
24
|
// * A robot without a name
|
@@ -33,29 +32,29 @@ import "testing"
|
|
33
32
|
|
34
33
|
var testOneRobot = []struct {
|
35
34
|
cmd byte
|
36
|
-
|
35
|
+
Step2Robot
|
37
36
|
nMsg int
|
38
37
|
}{
|
39
38
|
// (test2 data with message counts added)
|
40
|
-
{' ',
|
41
|
-
{'A',
|
42
|
-
{'R',
|
43
|
-
{'A',
|
44
|
-
{'L',
|
45
|
-
{'L',
|
46
|
-
{'L',
|
47
|
-
{'A',
|
48
|
-
{'R',
|
49
|
-
{'A',
|
50
|
-
{'A',
|
51
|
-
{'L',
|
52
|
-
{'A',
|
53
|
-
{'L',
|
54
|
-
{'A',
|
55
|
-
{'A',
|
56
|
-
{'L',
|
57
|
-
{'A',
|
58
|
-
{'A',
|
39
|
+
{' ', Step2Robot{N, Pos{1, 1}}, 0},
|
40
|
+
{'A', Step2Robot{N, Pos{1, 2}}, 0},
|
41
|
+
{'R', Step2Robot{E, Pos{1, 2}}, 0},
|
42
|
+
{'A', Step2Robot{E, Pos{2, 2}}, 0},
|
43
|
+
{'L', Step2Robot{N, Pos{2, 2}}, 0},
|
44
|
+
{'L', Step2Robot{W, Pos{2, 2}}, 0},
|
45
|
+
{'L', Step2Robot{S, Pos{2, 2}}, 0},
|
46
|
+
{'A', Step2Robot{S, Pos{2, 1}}, 0},
|
47
|
+
{'R', Step2Robot{W, Pos{2, 1}}, 0},
|
48
|
+
{'A', Step2Robot{W, Pos{1, 1}}, 0},
|
49
|
+
{'A', Step2Robot{W, Pos{1, 1}}, 1}, // bump W wall
|
50
|
+
{'L', Step2Robot{S, Pos{1, 1}}, 1},
|
51
|
+
{'A', Step2Robot{S, Pos{1, 1}}, 2}, // bump S wall
|
52
|
+
{'L', Step2Robot{E, Pos{1, 1}}, 2},
|
53
|
+
{'A', Step2Robot{E, Pos{2, 1}}, 2},
|
54
|
+
{'A', Step2Robot{E, Pos{2, 1}}, 3}, // bump E wall
|
55
|
+
{'L', Step2Robot{N, Pos{2, 1}}, 3},
|
56
|
+
{'A', Step2Robot{N, Pos{2, 2}}, 3},
|
57
|
+
{'A', Step2Robot{N, Pos{2, 2}}, 4}, // bump N wall
|
59
58
|
}
|
60
59
|
|
61
60
|
func logMon(log chan string, nMsg chan int, t *testing.T) {
|
@@ -74,17 +73,17 @@ func TestOneStep3(t *testing.T) {
|
|
74
73
|
nMsg := make(chan int)
|
75
74
|
go logMon(log, nMsg, t)
|
76
75
|
act := make(chan Action3)
|
77
|
-
rep := make(chan []
|
76
|
+
rep := make(chan []Step3Robot)
|
78
77
|
go Room3(
|
79
78
|
Rect{Pos{1, 1}, Pos{2, 2}},
|
80
|
-
[]
|
79
|
+
[]Step3Robot{{"Robbie", testOneRobot[0].Step2Robot}},
|
81
80
|
act, rep, log)
|
82
81
|
scr := ""
|
83
82
|
for j := 1; j < i; j++ {
|
84
83
|
scr += string(testOneRobot[j].cmd)
|
85
84
|
}
|
86
85
|
t.Logf("Script %q", scr)
|
87
|
-
go
|
86
|
+
go StartRobot3("Robbie", scr, act, log)
|
88
87
|
pls := <-rep
|
89
88
|
lastTest := testOneRobot[i-1]
|
90
89
|
if len(pls) != 1 {
|
@@ -95,8 +94,8 @@ func TestOneStep3(t *testing.T) {
|
|
95
94
|
t.Fatalf(`Got report for robot %q, want report for "Robbie".`,
|
96
95
|
pl.Name)
|
97
96
|
}
|
98
|
-
da := pl.
|
99
|
-
want := lastTest.
|
97
|
+
da := pl.Step2Robot
|
98
|
+
want := lastTest.Step2Robot
|
100
99
|
if da.Pos != want.Pos {
|
101
100
|
t.Fatalf("Script %q, Pos = %v, want %v", scr, da.Pos, want.Pos)
|
102
101
|
}
|
@@ -115,12 +114,12 @@ func TestNoName(t *testing.T) {
|
|
115
114
|
nMsg := make(chan int)
|
116
115
|
go logMon(log, nMsg, t)
|
117
116
|
act := make(chan Action3)
|
118
|
-
rep := make(chan []
|
117
|
+
rep := make(chan []Step3Robot)
|
119
118
|
go Room3(
|
120
119
|
Rect{Pos{1, 1}, Pos{1, 1}},
|
121
|
-
[]
|
120
|
+
[]Step3Robot{{"", Step2Robot{N, Pos{1, 1}}}},
|
122
121
|
act, rep, log)
|
123
|
-
go
|
122
|
+
go StartRobot3("", "", act, log)
|
124
123
|
<-rep
|
125
124
|
close(log)
|
126
125
|
if n := <-nMsg; n != 1 {
|
@@ -133,16 +132,16 @@ func TestSameName(t *testing.T) {
|
|
133
132
|
nMsg := make(chan int)
|
134
133
|
go logMon(log, nMsg, t)
|
135
134
|
act := make(chan Action3)
|
136
|
-
rep := make(chan []
|
135
|
+
rep := make(chan []Step3Robot)
|
137
136
|
go Room3(
|
138
137
|
Rect{Pos{1, 1}, Pos{2, 1}},
|
139
|
-
[]
|
140
|
-
{"Daryl",
|
141
|
-
{"Daryl",
|
138
|
+
[]Step3Robot{
|
139
|
+
{"Daryl", Step2Robot{N, Pos{1, 1}}},
|
140
|
+
{"Daryl", Step2Robot{N, Pos{2, 1}}},
|
142
141
|
},
|
143
142
|
act, rep, log)
|
144
|
-
go
|
145
|
-
go
|
143
|
+
go StartRobot3("Daryl", "", act, log)
|
144
|
+
go StartRobot3("Daryl", "", act, log)
|
146
145
|
<-rep
|
147
146
|
close(log)
|
148
147
|
if n := <-nMsg; n != 1 {
|
@@ -155,16 +154,16 @@ func TestSamePosition(t *testing.T) {
|
|
155
154
|
nMsg := make(chan int)
|
156
155
|
go logMon(log, nMsg, t)
|
157
156
|
act := make(chan Action3)
|
158
|
-
rep := make(chan []
|
157
|
+
rep := make(chan []Step3Robot)
|
159
158
|
go Room3(
|
160
159
|
Rect{Pos{1, 1}, Pos{100, 100}},
|
161
|
-
[]
|
162
|
-
{"Matter",
|
163
|
-
{"Antimatter",
|
160
|
+
[]Step3Robot{
|
161
|
+
{"Matter", Step2Robot{N, Pos{23, 47}}},
|
162
|
+
{"Antimatter", Step2Robot{N, Pos{23, 47}}},
|
164
163
|
},
|
165
164
|
act, rep, log)
|
166
|
-
go
|
167
|
-
go
|
165
|
+
go StartRobot3("Matter", "", act, log)
|
166
|
+
go StartRobot3("Antimatter", "", act, log)
|
168
167
|
<-rep
|
169
168
|
close(log)
|
170
169
|
if n := <-nMsg; n != 1 {
|
@@ -177,12 +176,12 @@ func TestOutsideRoom(t *testing.T) {
|
|
177
176
|
nMsg := make(chan int)
|
178
177
|
go logMon(log, nMsg, t)
|
179
178
|
act := make(chan Action3)
|
180
|
-
rep := make(chan []
|
179
|
+
rep := make(chan []Step3Robot)
|
181
180
|
go Room3(
|
182
181
|
Rect{Pos{1, 1}, Pos{1, 1}},
|
183
|
-
[]
|
182
|
+
[]Step3Robot{{"Elvis", Step2Robot{N, Pos{2, 3}}}},
|
184
183
|
act, rep, log)
|
185
|
-
go
|
184
|
+
go StartRobot3("Elvis", "", act, log)
|
186
185
|
<-rep
|
187
186
|
close(log)
|
188
187
|
if n := <-nMsg; n != 1 {
|
@@ -195,12 +194,12 @@ func TestBadCommand(t *testing.T) {
|
|
195
194
|
nMsg := make(chan int)
|
196
195
|
go logMon(log, nMsg, t)
|
197
196
|
act := make(chan Action3)
|
198
|
-
rep := make(chan []
|
197
|
+
rep := make(chan []Step3Robot)
|
199
198
|
go Room3(
|
200
199
|
Rect{Pos{0, 0}, Pos{0, 99}},
|
201
|
-
[]
|
200
|
+
[]Step3Robot{{"Vgr", Step2Robot{N, Pos{0, 99}}}},
|
202
201
|
act, rep, log)
|
203
|
-
go
|
202
|
+
go StartRobot3("Vgr", "RET", act, log)
|
204
203
|
<-rep
|
205
204
|
close(log)
|
206
205
|
if n := <-nMsg; n != 1 {
|
@@ -213,12 +212,12 @@ func TestBadRobot(t *testing.T) {
|
|
213
212
|
nMsg := make(chan int)
|
214
213
|
go logMon(log, nMsg, t)
|
215
214
|
act := make(chan Action3)
|
216
|
-
rep := make(chan []
|
215
|
+
rep := make(chan []Step3Robot)
|
217
216
|
go Room3(
|
218
217
|
Rect{Pos{0, 0}, Pos{0, 0}},
|
219
|
-
[]
|
218
|
+
[]Step3Robot{{"Data", Step2Robot{N, Pos{0, 0}}}},
|
220
219
|
act, rep, log)
|
221
|
-
go
|
220
|
+
go StartRobot3("Lore", "A", act, log)
|
222
221
|
<-rep
|
223
222
|
close(log)
|
224
223
|
if n := <-nMsg; n != 1 {
|
@@ -231,16 +230,16 @@ func TestThree(t *testing.T) { // no bumping
|
|
231
230
|
nMsg := make(chan int)
|
232
231
|
go logMon(log, nMsg, t)
|
233
232
|
act := make(chan Action3)
|
234
|
-
go
|
235
|
-
go
|
236
|
-
go
|
237
|
-
rep := make(chan []
|
233
|
+
go StartRobot3("clutz", "LAAARALA", act, log)
|
234
|
+
go StartRobot3("sphero", "RRAAAAALA", act, log)
|
235
|
+
go StartRobot3("roomba", "LAAARRRALLLL", act, log)
|
236
|
+
rep := make(chan []Step3Robot)
|
238
237
|
go Room3(
|
239
238
|
Rect{Pos{-10, -10}, Pos{15, 10}},
|
240
|
-
[]
|
241
|
-
{"clutz",
|
242
|
-
{"sphero",
|
243
|
-
{"roomba",
|
239
|
+
[]Step3Robot{
|
240
|
+
{"clutz", Step2Robot{N, Pos{0, 0}}},
|
241
|
+
{"sphero", Step2Robot{E, Pos{2, -7}}},
|
242
|
+
{"roomba", Step2Robot{S, Pos{8, 4}}},
|
244
243
|
},
|
245
244
|
act, rep, log)
|
246
245
|
pls := <-rep
|
@@ -248,22 +247,22 @@ func TestThree(t *testing.T) { // no bumping
|
|
248
247
|
t.Fatalf("Got report on %d robots, want 3.", len(pls))
|
249
248
|
}
|
250
249
|
exp:
|
251
|
-
for _, exp := range []
|
252
|
-
{"clutz",
|
253
|
-
{"sphero",
|
254
|
-
{"roomba",
|
250
|
+
for _, exp := range []Step3Robot{
|
251
|
+
{"clutz", Step2Robot{W, Pos{-4, 1}}},
|
252
|
+
{"sphero", Step2Robot{S, Pos{-3, -8}}},
|
253
|
+
{"roomba", Step2Robot{N, Pos{11, 5}}},
|
255
254
|
} {
|
256
255
|
for _, pl := range pls {
|
257
256
|
if pl.Name != exp.Name {
|
258
257
|
continue
|
259
258
|
}
|
260
|
-
if pl.
|
259
|
+
if pl.Step2Robot.Pos != exp.Step2Robot.Pos {
|
261
260
|
t.Fatalf("%s at %v, want %v",
|
262
|
-
pl.Name, pl.
|
261
|
+
pl.Name, pl.Step2Robot.Pos, exp.Step2Robot.Pos)
|
263
262
|
}
|
264
|
-
if pl.
|
263
|
+
if pl.Step2Robot.Dir != exp.Step2Robot.Dir {
|
265
264
|
t.Fatalf("%s facing %v, want %v",
|
266
|
-
pl.Name, pl.
|
265
|
+
pl.Name, pl.Step2Robot.Dir, exp.Step2Robot.Dir)
|
267
266
|
}
|
268
267
|
continue exp
|
269
268
|
}
|
@@ -276,14 +275,14 @@ func TestBattle(t *testing.T) {
|
|
276
275
|
nMsg := make(chan int)
|
277
276
|
go logMon(log, nMsg, t)
|
278
277
|
act := make(chan Action3)
|
279
|
-
go
|
280
|
-
go
|
281
|
-
rep := make(chan []
|
278
|
+
go StartRobot3("Toro", "AAAAAAA", act, log)
|
279
|
+
go StartRobot3("Phere", "AAAAAAA", act, log)
|
280
|
+
rep := make(chan []Step3Robot)
|
282
281
|
go Room3(
|
283
282
|
Rect{Pos{1, 1}, Pos{9, 9}},
|
284
|
-
[]
|
285
|
-
{"Toro",
|
286
|
-
{"Phere",
|
283
|
+
[]Step3Robot{
|
284
|
+
{"Toro", Step2Robot{E, Pos{1, 5}}},
|
285
|
+
{"Phere", Step2Robot{W, Pos{9, 5}}},
|
287
286
|
},
|
288
287
|
act, rep, log)
|
289
288
|
<-rep
|