Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Three-stripe sky background.

  • Loading branch information...
commit c463e52c4027f9d419eac9d00f46f6d13dc282f7 1 parent 87c146e
@pda authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 asc.rb
View
4 asc.rb
@@ -97,7 +97,7 @@ def to_s
end
class Background
- PALETTE = [ 16, 232 ]
+ PALETTE = [ 16, 232, 233 ]
PERIOD = 5.0
SPEED = 10.0
def pixel x, y, char = ":"
@@ -105,7 +105,7 @@ def pixel x, y, char = ":"
end
def color x, y
sin = Math.sin((x + Time.new.to_f * SPEED) / PERIOD + y / PERIOD)
- PALETTE[(0.5 * sin + 0.5).round]
+ PALETTE[(0.9 * sin + 0.9).round]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.