Advertisement
Guest User

Untitled

a guest
Jun 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1.         private static bool Marked(int x, int y)
  2.         {
  3.             const int patternHeight = 4;
  4.             const int patternWidth = 3;
  5.  
  6.             var posX = x % patternWidth;
  7.             var posY = y % patternHeight;
  8.  
  9.             if (posY == 0)
  10.                 return false;
  11.  
  12.             if (posX == 0 && posY != patternHeight - 1)
  13.                 return false;
  14.  
  15.             if (posY == 1 && posX == 1)
  16.                 return false;
  17.            
  18.             return true;
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement