Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Nov 20, 2017
1 parent ed17497 commit ccf4b63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/ruby/constrained_towers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def initialize discs
end

def move
flip = Towers.diff ConstrainedTowers.ternarise(@count, @discs), ConstrainedTowers.ternarise(@count += 1, @discs)
flip = Towers.diff ConstrainedTowers.ternarise(@count, @discs),
ConstrainedTowers.ternarise(@count += 1, @discs)
source = Towers.find_disc flip, @stacks

@stacks[ConstrainedTowers.find_adjacent_stack flip, source, @stacks].push @stacks[source].pop
Expand Down
3 changes: 2 additions & 1 deletion lib/ruby/towers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def initialize discs
end

def move
flip = Towers.diff Towers.binarise(@count, @discs), Towers.binarise(@count += 1, @discs)
flip = Towers.diff Towers.binarise(@count, @discs),
Towers.binarise(@count += 1, @discs)
source = Towers.find_disc flip, @stacks

@stacks[Towers.find_stack flip, source, @stacks].push @stacks[source].pop
Expand Down

0 comments on commit ccf4b63

Please sign in to comment.