crossword c#- algorthm searched

This is a very broad question, I think you need to spend some time thinking about the design before you start trying to code the solution.

Some possible sub problems you will need to solve:

  1. You’ll need some data store of words, will you make your own or use something from online?
  2. You will need some way of checking the letters in these words to ensure the words have common letters you can use to cross the words over each other
  3. You will need to measure the lengths of words and ensure the words do not run over each other (unless they are supposed to cross over!) or fit within the screen. You will need to retest these rules each time you generate a grid to ensure it is valid
  4. You could store the grid as an n x n array, words will need to be written either in a single row or column, assuming you’re not using diagonals.
  5. To ensure your words go left to right, or top to bottom, you must ensure the starting letters index is always less then the letter at the end.
  6. You will probably also need to store a count of words per row or column, to ensure there is an even spacing of words across the grid

Leave a Comment