Guest User

Untitled

a guest
May 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. while(rowStart<myPuzzle.numRows)
  2. {
  3.     colStart = 0;
  4.     while(colStart+strlen(checkWord)<=myPuzzle.numColumns)
  5.     {
  6.         for(pos=0; pos<strlen(checkWord); pos++)
  7.         {
  8.             if(myPuzzle.entry[rowStart][colStart+pos].letter == checkWord[pos])  
  9.             {
  10.                 if (pos == (strlen(checkWord) - 1))
  11.                 {
  12.                     for (i=0; i<strlen(checkWord); i++)
  13.                     {
  14.                         myPuzzle.entry[rowStart][colStart  + i].fg = f_cyan;
  15.                         myPuzzle.entry[rowStart][colStart  + i].bg = b_black;
  16.                     }
  17.                     return true;
  18.                 }
  19.             }
  20.             else
  21.                 pos = strlen(checkWord);
  22.         }
  23.         colStart++;
  24.     }
  25. rowStart++;
  26. }
Add Comment
Please, Sign In to add comment