Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gem luck added

  • Loading branch information...
commit 959aeb801cb05b2538f9167b0f5affd7345809df 1 parent 220d8f6
@daveheitzman authored
Showing with 8 additions and 10 deletions.
  1. +1 −0  Gemfile
  2. +3 −0  Gemfile.lock
  3. +4 −10 lib/floodit.rb
View
1  Gemfile
@@ -3,3 +3,4 @@ source "http://gems.github.com"
gem 'rainbow'
gem 'rspec'
+gem 'luck'
View
3  Gemfile.lock
@@ -3,6 +3,7 @@ GEM
remote: http://gems.github.com/
specs:
diff-lcs (1.1.3)
+ luck (0.1.6)
rainbow (1.1.3)
rspec (2.7.0)
rspec-core (~> 2.7.0)
@@ -14,8 +15,10 @@ GEM
rspec-mocks (2.7.0)
PLATFORMS
+ java
ruby
DEPENDENCIES
+ luck
rainbow
rspec
View
14 lib/floodit.rb
@@ -264,15 +264,9 @@ def initialize_copy(orig)
end
class Point
- def x
- @x
- end
- def y
- @y
- end
- def to_s
- "#{@x},#{@y}"
- end
+ def x ; @x end
+ def y ; @y end
+ def to_s ; "#{@x},#{@y}" end
def ==(p)
p.kind_of?( self.class ) ? (p.x==self.x && p.y==self.y) : false
end
@@ -392,7 +386,7 @@ def look_ahead(grid,s='')
def choose_move(conversions)
- look_ahead_moves = 6
+ look_ahead_moves = 3
choice = nil
highest=0
seq=''
Please sign in to comment.
Something went wrong with that request. Please try again.