Ruby on Rails Thursday, May 7, 2015

if you go that route, you may have problems editing the letters. imc, i actually created a drawing / image of all the letters in a text file, then compress / decompress the file when needed.  i arranged the letters in a column, one big letter-width-wise column ie, because it was easier for me to edit the letters and i can visibly see if they align or go out of bounds/edges.

there are vector-based-like version of this; see figlet and artii gems eg.

kind regards --botp



On Fri, May 8, 2015 at 8:29 AM, Miles Morales <nncy.vallejo@gmail.com> wrote:

How can you alter the following code to replicate the letters 'G' and 'X' into your command prompt using ROR? I was able to create the letter H to display on my cmd. 


Draw top Region 1
    for y in 1..8
     
for x in 1..6
       
print "*"
     
end
   
     
for x in 1..8
       
print " "
     
end
   
     
for x in 1..6
       
print "p"
     
end
   
     
print "\n"
   
end
   

Draw center bar Region 2 goes all the way across the bar
Use a different character or different regions.
    
 
  for y in 1..3
     
for x in 1..20
       
print "*"
     
end
     
print "\n"
   
end

    
Draw bottom bar Region 3 Look like the top bar
   
for y in 1..8
     
for x in 1..6
       
print "*"
     
end
   
     
for x in 1..8
       
print " "
     
end
   
     
for x in 1..6
       
print "*"
     
end
   
     
print "\n"
   
end

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/48237a6d-2b72-4a0b-9174-84e2eea6e351%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAAwHHQjZNo%2Bx_Z-QxQV1EU_S_%3DbAG3EFR3bWDRJZx6T1Udvugw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment