binary_puzzle_solver 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/Makefile +6 -0
- data/README.md +29 -0
- data/Rakefile +19 -0
- data/binary_puzzle_solver.gemspec +27 -0
- data/lib/binary_puzzle_solver/base.rb +716 -0
- data/lib/binary_puzzle_solver/version.rb +3 -0
- data/lib/binary_puzzle_solver.rb +1 -0
- data/test/parse-board.rb +582 -0
- metadata +90 -0
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Shlomi Fish
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Makefile
ADDED
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# BinaryPuzzleSolver
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'binary_puzzle_solver'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install binary_puzzle_solver
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
# Taken from:
|
3
|
+
# https://github.com/saizai/iorcc/blob/master/2012/entries/saizai_tic_tac_toe/tic_tac_toe.rake
|
4
|
+
#
|
5
|
+
# Thanks to judofyr from #ruby-lang on Freenode for some insights
|
6
|
+
#
|
7
|
+
# Require whatever test libraries you need
|
8
|
+
require 'rspec'
|
9
|
+
require 'rspec/core/rake_task'
|
10
|
+
|
11
|
+
# This works if you're using RSpec
|
12
|
+
RSpec::Core::RakeTask.new(:test) do |t|
|
13
|
+
t.pattern = File.join(
|
14
|
+
File.expand_path(File.dirname(__FILE__)), './test/*.rb'
|
15
|
+
)
|
16
|
+
# t.options = '-v'
|
17
|
+
end
|
18
|
+
|
19
|
+
task :default => :test
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
require "binary_puzzle_solver/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "binary_puzzle_solver"
|
8
|
+
s.version = Binary_Puzzle_Solver::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.authors = ["Shlomi Fish"]
|
11
|
+
s.email = ["shlomif@cpan.org"]
|
12
|
+
# TODO : add a better home page on http://www.shlomifish.org/ .
|
13
|
+
s.homepage = "http://github.com/shlomif/binary-puzzle-garden"
|
14
|
+
s.summary = %q{A solver for http://www.binarypuzzle.com/ instances}
|
15
|
+
s.description = %q{This is a solver for instances of the so-called Binary
|
16
|
+
Puzzle from http://www.binarypuzzle.com/ . It is incomplete, but
|
17
|
+
can still solve some games
|
18
|
+
}
|
19
|
+
|
20
|
+
s.add_runtime_dependency "launchy"
|
21
|
+
s.add_development_dependency "rspec", "~>2.5.0"
|
22
|
+
|
23
|
+
s.files = `git ls-files -- .`.split("\n")
|
24
|
+
s.test_files = `git ls-files -- ./{test,spec,features}/*`.split("\n")
|
25
|
+
s.executables = `git ls-files -- ./bin/*`.split("\n").map{ |f| File.basename(f) }
|
26
|
+
s.require_paths = ["lib"]
|
27
|
+
end
|