tuomas-knights_tour 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/README.rdoc +6 -2
- data/lib/knights_tour.rb +1 -1
- metadata +12 -21
- data/Manifest.txt +0 -7
- data/Rakefile +0 -48
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -12,11 +12,11 @@ avoid dead ends, making the search faster in general.
|
|
12
12
|
|
13
13
|
== Installation
|
14
14
|
|
15
|
-
Install
|
15
|
+
Install Knight's Tour as a RubyGem from GitHub:
|
16
16
|
|
17
17
|
$ sudo gem install tuomas-knights_tour --source http://gems.github.com
|
18
18
|
|
19
|
-
The
|
19
|
+
The program is compatible with Ruby 1.9.1.
|
20
20
|
|
21
21
|
== Usage
|
22
22
|
|
@@ -46,6 +46,10 @@ finds a solution, it displays a result similar to the following:
|
|
46
46
|
| 52| 17| 20| 9| 56| 47| 22| 7|
|
47
47
|
+---+---+---+---+---+---+---+---+
|
48
48
|
|
49
|
+
The command above is the same as invoking the program with
|
50
|
+
|
51
|
+
$ knights_tour -s 0,0 8,8
|
52
|
+
|
49
53
|
The size of the board and the start position of the knight are configurable,
|
50
54
|
however. For all the options, see
|
51
55
|
|
data/lib/knights_tour.rb
CHANGED
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.2
|
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-03-
|
12
|
+
date: 2009-03-31 00:00:00 -07:00
|
13
13
|
default_executable: knights_tour
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,41 +32,32 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.2.0
|
34
34
|
version:
|
35
|
-
|
36
|
-
name: hoe
|
37
|
-
type: :development
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.11.0
|
44
|
-
version:
|
45
|
-
description: ""
|
35
|
+
description: A program that attempts to find a solution to the Knight's Tour problem.
|
46
36
|
email: tkareine@gmail.com
|
47
37
|
executables:
|
48
38
|
- knights_tour
|
49
39
|
extensions: []
|
50
40
|
|
51
41
|
extra_rdoc_files:
|
52
|
-
- Manifest.txt
|
53
42
|
- CHANGELOG.rdoc
|
54
43
|
- README.rdoc
|
55
|
-
- lib/knights_tour.rb
|
56
44
|
files:
|
45
|
+
- lib/knights_tour.rb
|
46
|
+
- bin/knights_tour
|
57
47
|
- CHANGELOG.rdoc
|
58
|
-
- Manifest.txt
|
59
48
|
- README.rdoc
|
60
|
-
- Rakefile
|
61
|
-
- bin/knights_tour
|
62
|
-
- lib/knights_tour.rb
|
63
49
|
- spec/knights_tour_spec.rb
|
64
50
|
has_rdoc: true
|
65
51
|
homepage: http://github.com/tuomas/knights_tour
|
66
52
|
post_install_message:
|
67
53
|
rdoc_options:
|
54
|
+
- --title
|
55
|
+
- Knight's Tour 0.3.2
|
68
56
|
- --main
|
69
57
|
- README.rdoc
|
58
|
+
- --exclude
|
59
|
+
- spec
|
60
|
+
- --line-numbers
|
70
61
|
require_paths:
|
71
62
|
- lib
|
72
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -83,10 +74,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
74
|
version:
|
84
75
|
requirements: []
|
85
76
|
|
86
|
-
rubyforge_project:
|
77
|
+
rubyforge_project:
|
87
78
|
rubygems_version: 1.2.0
|
88
79
|
signing_key:
|
89
80
|
specification_version: 2
|
90
|
-
summary:
|
81
|
+
summary: Solves Knight's Tour problem.
|
91
82
|
test_files: []
|
92
83
|
|
data/Manifest.txt
DELETED
data/Rakefile
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
|
3
|
-
require "hoe"
|
4
|
-
require "./lib/knights_tour"
|
5
|
-
Hoe.new("knights_tour", KnightsTour::Meta::VERSION.to_s) do |p|
|
6
|
-
p.author = "Tuomas Kareinen"
|
7
|
-
p.email = "tkareine@gmail.com"
|
8
|
-
p.url = "http://github.com/tuomas/knights_tour"
|
9
|
-
p.summary =<<-END
|
10
|
-
A program that attempts to find a solution to the Knight's Tour problem.
|
11
|
-
END
|
12
|
-
p.readme_file = "README.rdoc"
|
13
|
-
p.history_file = "CHANGELOG.rdoc"
|
14
|
-
p.extra_rdoc_files = FileList["*.rdoc", "lib/**/*.rb"]
|
15
|
-
p.extra_deps = [["trollop", ">= 1.10.0"]]
|
16
|
-
p.extra_dev_deps = [["rspec", ">= 1.2.0"]]
|
17
|
-
p.rubyforge_name = "searchable-rec"
|
18
|
-
end
|
19
|
-
|
20
|
-
require "rake/rdoctask"
|
21
|
-
require "lib/knights_tour"
|
22
|
-
desc "Create documentation."
|
23
|
-
Rake::RDocTask.new(:rdoc) do |rd|
|
24
|
-
rd.title = "Knight's Tour #{KnightsTour::Meta::VERSION}"
|
25
|
-
rd.main = "README.rdoc"
|
26
|
-
rd.rdoc_files.include("*.rdoc", "lib/**/*.rb")
|
27
|
-
rd.rdoc_dir = "rdoc"
|
28
|
-
end
|
29
|
-
|
30
|
-
require "spec/rake/spectask"
|
31
|
-
desc "Run specs."
|
32
|
-
Spec::Rake::SpecTask.new(:spec) do |t|
|
33
|
-
t.spec_files = FileList["spec/**/*.rb"]
|
34
|
-
t.spec_opts = ["--format", "specdoc"]
|
35
|
-
#t.warning = true
|
36
|
-
end
|
37
|
-
|
38
|
-
desc "Find code smells."
|
39
|
-
task :roodi do
|
40
|
-
sh("roodi '**/*.rb'")
|
41
|
-
end
|
42
|
-
|
43
|
-
desc "Search unfinished parts of source code."
|
44
|
-
task :todo do
|
45
|
-
FileList["**/*.rb"].egrep /#.*(TODO|FIXME)/
|
46
|
-
end
|
47
|
-
|
48
|
-
task :default => :spec
|