bfs_brute_force 0.1.0 → 0.2.0
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/.gitignore +1 -0
- data/README.md +99 -27
- data/example/.ruby-gemset +1 -0
- data/example/.ruby-version +1 -0
- data/example/Gemfile +6 -0
- data/example/README.md +13 -0
- data/example/four_bishops.rb +590 -0
- data/example/run_example.rb +17 -0
- data/example/simple_addition.rb +66 -0
- data/example/two_knights.rb +627 -0
- data/lib/bfs_brute_force.rb +1 -1
- data/lib/bfs_brute_force/version.rb +1 -1
- metadata +10 -2
data/lib/bfs_brute_force.rb
CHANGED
@@ -100,7 +100,7 @@ module BfsBruteForce
|
|
100
100
|
#
|
101
101
|
# @raise [NoSolution] No solution is found
|
102
102
|
# @return [Context] Solved Context object has the final {State} and list of moves
|
103
|
-
def solve(initial_state, status =
|
103
|
+
def solve(initial_state, status = [])
|
104
104
|
status << "Looking for solution for:\n#{initial_state}\n\n"
|
105
105
|
|
106
106
|
initial_context = Context.new(initial_state)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bfs_brute_force
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Sortelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -71,6 +71,14 @@ files:
|
|
71
71
|
- README.md
|
72
72
|
- Rakefile
|
73
73
|
- bfs_brute_force.gemspec
|
74
|
+
- example/.ruby-gemset
|
75
|
+
- example/.ruby-version
|
76
|
+
- example/Gemfile
|
77
|
+
- example/README.md
|
78
|
+
- example/four_bishops.rb
|
79
|
+
- example/run_example.rb
|
80
|
+
- example/simple_addition.rb
|
81
|
+
- example/two_knights.rb
|
74
82
|
- lib/bfs_brute_force.rb
|
75
83
|
- lib/bfs_brute_force/version.rb
|
76
84
|
- test/basic.rb
|