Skip to content

Instantly share code, notes, and snippets.

@josephbales
Created October 22, 2020 12:59
Show Gist options
  • Save josephbales/2e110cc187ea3db17aeb4520ca402f66 to your computer and use it in GitHub Desktop.
Save josephbales/2e110cc187ea3db17aeb4520ca402f66 to your computer and use it in GitHub Desktop.
Coding problem sent to me by Chris
char[,] puzzle = new char[15, 15]
{
{ 'e', 'i', 'v', 'o', 'm', 'y', 'r', 'a', 'c', 's', 'm', 'h', 'p', 's', 'b' },
{ 'n', 'i', 'l', 'b', 'o', 'g', 'm', 't', 'z', 't', 'o', 'o', 'n', 'r', 'r' },
{ 'r', 'r', 't', 'e', 't', 'y', 'a', 'd', 'a', 'e', 'n', 'c', 'e', 'e', 'o' },
{ 'o', 's', 'o', 'r', 'l', 'b', 'd', 'c', 'x', 's', 's', 'u', 'e', 'd', 'o' },
{ 'e', 'c', 'e', 'c', 'i', 'p', 'k', 'f', 'k', 'u', 't', 's', 'w', 'i', 'm' },
{ 'n', 'w', 'o', 'v', 'y', 'c', 'p', 'l', 'd', 'o', 'e', 'p', 'o', 'p', 's' },
{ 'l', 'i', 'f', 's', 'a', 'd', 'k', 'a', 'w', 'h', 'r', 'o', 'l', 's', 'y' },
{ 'n', 'k', 'k', 'l', 't', 'e', 'n', 'o', 'l', 'd', 'd', 'c', 'l', 'h', 'k' },
{ 'd', 'f', 'b', 'p', 'j', 'u', 'l', 'a', 'r', 'e', 'o', 'u', 'a', 'c', 'o' },
{ 'a', 'u', 't', 'u', 'm', 'n', 'm', 'f', 'c', 't', 'm', 's', 'h', 't', 'o' },
{ 'y', 'm', 'm', 'u', 'm', 'u', 'y', 'e', 'g', 'n', 'r', 'a', 'q', 'i', 'p' },
{ 'z', 'o', 'm', 'b', 'i', 'e', 'p', 'w', 'h', 'u', 'i', 'e', 'r', 'w', 's' },
{ 'r', 'e', 'b', 'o', 't', 'c', 'o', 'v', 'o', 'a', 'g', 'e', 'a', 'a', 'z' },
{ 'd', 'e', 'c', 'o', 'r', 'a', 't', 'e', 's', 'h', 'h', 's', 'n', 't', 'c' },
{ 'j', 'a', 'c', 'k', 'o', 'l', 'a', 'n', 't', 'e', 'r', 'n', 'g', 'y', 't' }
};
string[] wordBank = new[]
{
"autumn",
"bat",
"blackcat",
"brooms",
"candycorn",
"caramelapple",
"costume",
"decorate",
"ghost",
"goblin",
"halloween",
"hauntedhouse",
"jackolantern",
"hocuspocus",
"leaves",
"monster",
"mummy",
"october",
"pumpkin",
"scarymovie",
"spiders",
"spooky",
"trickortreat",
"witch",
"zombie"
};
//The goal would be to output each word from the wordbank highlighted in the grid of letters on a per word basis, with a label at the top of each grid specifying what word is being shown in the grid
//For example, assuming the word was the first from the word bank, "Autumn" this would be the output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment