Advertisement
CLooker

Untitled

Jul 8th, 2018
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (count <= -cardCount || count >= cardCount) {
  2.   return 0;
  3. }
  4.  
  5. if (x < 0 && x < -factor && x + cardWidth >= 0) {
  6.   return --count;
  7. }
  8.  
  9. if (x < 0 && x < -factor) {
  10.   return processXTraveledAndReturnCount((x += cardWidth), --count);
  11. }
  12.  
  13. if (x < 0) {
  14.   return count;
  15. }
  16.  
  17. if (x > 0 && x > factor && x - cardWidth <= 0) {
  18.   return ++count;
  19. }
  20.  
  21. if (x > 0 && x > factor) {
  22.   return processXTraveledAndReturnCount((x -= cardWidth), ++count);
  23. }
  24.  
  25. if (x > 0) {
  26.   return count;
  27. }
  28.  
  29. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement