Guest User

Untitled

a guest
May 23rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 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.                 if (pos == (strlen(checkWord) - 1))
  10.                 {
  11.                     for (i=0; i<strlen(checkWord); i++)
  12.                     {
  13.                         myPuzzle.entry[rowStart][colStart  + i].fg = f_cyan;
  14.                         myPuzzle.entry[rowStart][colStart  + i].bg = b_black;
  15.                     }
  16.                     return true;
  17.                 }
  18.             else
  19.             pos = strlen(checkWord);
  20.         }
  21.         colStart++;
  22.     }
  23. rowStart++;
  24. }
Add Comment
Please, Sign In to add comment