hanoi-jane 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/hanoi-jane.gemspec +1 -1
- data/lib/hanoi/jane/towers.rb +1 -1
- data/lib/hanoi/jane/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 332fd131e22d58d5814474ce82ec8e3dcf024e45
|
4
|
+
data.tar.gz: 826b3da67992715185f25fbaa9910433af4711d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1309697bc6ec42d16e1a69d511d2452e83ee653bb9c0b65aca069b3bca49fb95610b1265ba5fc5419ae8eca40306bbde2ea31396c606d88b013446325b48e1f
|
7
|
+
data.tar.gz: f5b481d155f881aec7d09c8bb7b78ead832c3509a85d13e3561968bd2febc2aac121948975540c1b073b4d95e47f6aac3a8a68f689b855fe93ed63dacd581f87
|
data/README.md
CHANGED
@@ -45,17 +45,17 @@ end
|
|
45
45
|
which will give you:
|
46
46
|
|
47
47
|
```ruby
|
48
|
-
{:stacks=>[[1, 0], [], []], :moves=>0, :
|
49
|
-
{:stacks=>[[1], [0], []], :moves=>1, :
|
50
|
-
{:stacks=>[[1], [], [0]], :moves=>2, :
|
51
|
-
{:stacks=>[[], [1], [0]], :moves=>3, :
|
52
|
-
{:stacks=>[[], [1, 0], []], :moves=>4, :
|
53
|
-
{:stacks=>[[0], [1], []], :moves=>5, :
|
54
|
-
{:stacks=>[[0], [], [1]], :moves=>6, :
|
55
|
-
{:stacks=>[[], [0], [1]], :moves=>7, :
|
56
|
-
{:stacks=>[[], [], [1, 0]], :moves=>8, :
|
48
|
+
{:stacks=>[[1, 0], [], []], :moves=>0, :moved=>nil, :ternary=>'00'}
|
49
|
+
{:stacks=>[[1], [0], []], :moves=>1, :moved=>0, :ternary=>'01'}
|
50
|
+
{:stacks=>[[1], [], [0]], :moves=>2, :moved=>0, :ternary=>'02'}
|
51
|
+
{:stacks=>[[], [1], [0]], :moves=>3, :moved=>1, :ternary=>'10'}
|
52
|
+
{:stacks=>[[], [1, 0], []], :moves=>4, :moved=>0, :ternary=>'11'}
|
53
|
+
{:stacks=>[[0], [1], []], :moves=>5, :moved=>0, :ternary=>'12'}
|
54
|
+
{:stacks=>[[0], [], [1]], :moves=>6, :moved=>1, :ternary=>'20'}
|
55
|
+
{:stacks=>[[], [0], [1]], :moves=>7, :moved=>0, :ternary=>'21'}
|
56
|
+
{:stacks=>[[], [], [1, 0]], :moves=>8, :moved=>0, :ternary=>'22'}
|
57
57
|
```
|
58
|
-
where `
|
58
|
+
where `moved` is the disc that was moved last
|
59
59
|
|
60
60
|
## pHAT
|
61
61
|
|
data/hanoi-jane.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['sam.pikesley@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = %q{Solve the Towers of Hanoi}
|
13
|
-
spec.description = %q{by counting in base 2 or 3}
|
13
|
+
spec.description = %q{Solve the Towers of Hanoi by counting in base 2 or 3}
|
14
14
|
spec.homepage = 'http://sam.pikesley.org/projects/hanoi-jane/'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
data/lib/hanoi/jane/towers.rb
CHANGED
data/lib/hanoi/jane/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanoi-jane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0.15'
|
125
|
-
description: by counting in base 2 or 3
|
125
|
+
description: Solve the Towers of Hanoi by counting in base 2 or 3
|
126
126
|
email:
|
127
127
|
- sam.pikesley@gmail.com
|
128
128
|
executables:
|