Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ASCII Art :Get a letter (A-Z) from its graphical representation

Anna SofiaAnna Sofia Member Posts: 1

How can I get a character (A-Z) from string which contains its graphical representation ?
for example, if I am using 3x5 letters, graphical representation for letter 'A' will be :

 #
# #
###
# #
# #

This one is for 'E' :

###
# 
###
#
###

I can proceed by doing this but it's doesn't look proper !

        switch (input)

            case " # \n# #\n###\n# #\n# #\n":
                {
                    return 'A';
                }
            case "###\n# \n###\n#  \n###\n":
                {
                    return 'E';
                }
                .
                .
                .
                .

            default: return '?';

Is there an algorithm or some ASCII art tricks to do this using C# ?
Really, I have no idea can someone give me some way ?

Tagged:
Sign In or Register to comment.