tuomas-knights_tour 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/bin/knights_tour +1 -1
- data/lib/knights_tour.rb +1 -1
- data/spec/knights_tour_spec.rb +3 -3
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
data/bin/knights_tour
CHANGED
@@ -8,7 +8,7 @@ require "knights_tour"
|
|
8
8
|
include KnightsTour
|
9
9
|
|
10
10
|
options = Trollop::options do
|
11
|
-
version "#{File.basename($0)} #{VERSION}"
|
11
|
+
version "#{File.basename($0)} #{KnightsTour::VERSION}"
|
12
12
|
|
13
13
|
banner <<-EOS
|
14
14
|
A program that attempts to find a solution to the Knight's Tour problem.
|
data/lib/knights_tour.rb
CHANGED
data/spec/knights_tour_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require "knights_tour"
|
|
2
2
|
|
3
3
|
include KnightsTour
|
4
4
|
|
5
|
-
describe Application do
|
5
|
+
describe KnightsTour::Application do
|
6
6
|
it "should accept valid non-default board size" do
|
7
7
|
lambda { Application.new(:size => -1) }.should raise_error(ArgumentError)
|
8
8
|
lambda { Application.new(:size => 0) }.should raise_error(ArgumentError)
|
@@ -103,7 +103,7 @@ describe Application do
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
describe Knight do
|
106
|
+
describe KnightsTour::Knight do
|
107
107
|
before(:each) do
|
108
108
|
@knight = Knight.new([5, 5], [0, 0])
|
109
109
|
# broken board state, but it does not matter for testing
|
@@ -138,7 +138,7 @@ describe Knight do
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
141
|
-
describe StringResult do
|
141
|
+
describe KnightsTour::StringResult do
|
142
142
|
it "should show the result correctly for a failed result" do
|
143
143
|
StringResult.new(nil).to_s.should == "No solution found."
|
144
144
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tuomas-knights_tour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tuomas Kareinen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-16 00:00:00 -07:00
|
13
13
|
default_executable: knights_tour
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,7 @@ licenses:
|
|
46
46
|
post_install_message:
|
47
47
|
rdoc_options:
|
48
48
|
- --title
|
49
|
-
- Knight's Tour 0.3.
|
49
|
+
- Knight's Tour 0.3.5
|
50
50
|
- --main
|
51
51
|
- README.rdoc
|
52
52
|
- --exclude
|