rubyks 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. data/lib/rubyks.rb +9 -1
  2. metadata +7 -5
  3. checksums.yaml +0 -15
data/lib/rubyks.rb CHANGED
@@ -701,7 +701,7 @@ class Cube
701
701
 
702
702
  #Solves last layer corners when all other layers and cross have been completed.
703
703
  def top_corners
704
- stay_corner = [@cube[0][2], @cube[1][4],@cube[2][8]]
704
+ stay_corner = [@cube[0][2], @cube[1][4],@cube[2][8]]
705
705
  i = 1
706
706
 
707
707
  until stay_corner.sort == [@cube[1][0],@cube[2][0],@cube[0][0]].sort
@@ -745,6 +745,10 @@ class Cube
745
745
  end
746
746
  end
747
747
  end
748
+
749
+ if @cube[0][6] != @cube[0][0]
750
+ self.last_move
751
+ end
748
752
  end
749
753
 
750
754
  #solve invokes all layer solving methods in sequence, solving from any legal state
@@ -832,3 +836,7 @@ class Cube
832
836
  end
833
837
  self
834
838
  end
839
+
840
+
841
+ x = Cube.new
842
+ x.scramble.simple_solve.colorize.print
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jeff Fowler
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-21 00:00:00.000000000 Z
12
+ date: 2013-08-22 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: Provides a data structure to represent a Rubik's cube and functionality
14
15
  to perform simple transformations on that cube, in addition to a simple solving
@@ -22,25 +23,26 @@ files:
22
23
  - lib/rubyks.rb
23
24
  homepage: http://github.com/urthbound/rubyks
24
25
  licenses: []
25
- metadata: {}
26
26
  post_install_message:
27
27
  rdoc_options: []
28
28
  require_paths:
29
29
  - lib
30
30
  required_ruby_version: !ruby/object:Gem::Requirement
31
+ none: false
31
32
  requirements:
32
33
  - - ! '>='
33
34
  - !ruby/object:Gem::Version
34
35
  version: '0'
35
36
  required_rubygems_version: !ruby/object:Gem::Requirement
37
+ none: false
36
38
  requirements:
37
39
  - - ! '>='
38
40
  - !ruby/object:Gem::Version
39
41
  version: '0'
40
42
  requirements: []
41
43
  rubyforge_project:
42
- rubygems_version: 2.0.7
44
+ rubygems_version: 1.8.25
43
45
  signing_key:
44
- specification_version: 4
46
+ specification_version: 3
45
47
  summary: Rubik's cube model and simple solving algorithm
46
48
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MjdmOWQwNTBjNzRjYTg3YTlkODM4OWRkYjkyYjdiODY0YTNhZWQxZQ==
5
- data.tar.gz: !binary |-
6
- ZWMyMTBlOWE1MDg1MzE5ZTcwMzRlY2U1Yzc2ODc0MDEwYWRhN2IyNw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NDAwZjRmNmQyNDc1OWYwNWUyZTJlN2Y1NWI5OGMxMzk3YTgyOGFiYTUxMDA5
10
- MTA0ZDcyNWRmYTg3MDA1OTQ1ZmZiNjFiYmJjNTA5MjE3Yjg5MTY3ZmJmMmJk
11
- NWZjMmE3OWIwNzM0OWIwZjhkNTgyZTkxMTBiYzNlNTllZTRkZDk=
12
- data.tar.gz: !binary |-
13
- NTFmNTc0MmU3ZjNmMjMwNTA2YzkwNmNiZDZiNmI1MWYwNzMzNzhjYWI2OGZm
14
- OGRjZWEwNjkxZTRiY2U5ODRkYTU2YmZjMTM2ZWVkMTM5ZDQyYTUwOTkyNmE5
15
- MzQ3OTg4MzdlM2E2NDk5OTI3YjE2NWNiYmY1N2M3OGE3OTJmMzE=