class AsciiParadise::StaticPacman
Constants
- PACMAN_WIDTH
#¶ ↑
PACMAN_WIDTH
¶ ↑#¶ ↑
Public Class Methods
Public Instance Methods
atan2(a, b)
click to toggle source
return_proper_width()
click to toggle source
run()
click to toggle source
#¶ ↑
run¶ ↑
#¶ ↑
# File lib/ascii_paradise/static_ascii/static_pacman.rb, line 40 def run (-10 .. 10).each { |y| _ = ''.dup return_proper_width.each {|x| _ << ( x ** 2 + y ** 2 < 11 ** 2 && atan2(y,x) < Math::PI * 0.8 && atan2(y,x) >- Math::PI * 0.8 && x ** 2+(y+6) ** 2>1 ? '@':' ') * 2 } puts _ } end