Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. for(int x = 0; x<console_width; x++)
  2. {
  3. for(int y = 5; y<console_height; y++)
  4. {
  5.  
  6. for(int rx = x-1; rx<x+2; rx++)
  7. {
  8. for(int ry = y-1; ry<y+2; ry++)
  9. {
  10. //checking the extremes
  11.  
  12. WrapePos(rx,ry);
  13.  
  14. if((rx > -1 && rx < console_width-1)&&(ry > -1 && ry < console_height-1))
  15. {
  16. //checking the cell neighbours
  17. if(console_buffer[rx+console_width*ry].Attributes == 0)
  18. {
  19. if(!(x == rx && y == ry))
  20. uicheck++;
  21. }
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement