Permalink
Browse files

Update to v0.0.7

  • Loading branch information...
nelbren committed Oct 23, 2018
1 parent ced9cee commit 8b59281b8b81d16404185c31f1a91350d4e11ca2
Showing with 9 additions and 8 deletions.
  1. +9 −8 heart.rb
@@ -1,17 +1,18 @@
#!/usr/bin/ruby
# heart.ruby v0.0.6
# heart.ruby v0.0.7
# nelbren@gmail.com
# UseMultipleAssign
# GlobalVarsToLocal
@a = ['','','','','','','','']
@rc = [ [1,4], [0,5], [1,6] ]
a = ['','','','','','','','']
rc = [ [1,4], [0,5], [1,6] ]
cb,ce = 0
8.times do |r|
if r > 2
@cb += 1
cb += 1
else
@cb,@ce = @rc[r][0],@rc[r][1]
cb,ce = rc[r][0],rc[r][1]
end
7.times { |c| @a[r] += (@cb..@ce).include?(c) ? 'x' : ' ' }
7.times { |c| a[r] += (cb..ce).include?(c) ? 'x' : ' ' }
end
@a.each { |r| p r + r.reverse }
a.each { |r| p r + r.reverse }

0 comments on commit 8b59281

Please sign in to comment.