daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Funkcia, ktora zisti, ci doslo k zasahu lode na zadanych suradniciach (row,col) hracom s cislom playerID.
  2. int checkHit(int row, int col, int playerID)
  3. {
  4.     if(attack_grid[row][col] != 0)
  5.         return 0;//Dato polje je neko vec gadjao
  6.  
  7.     if(deployment_grid[row][col] == 0)
  8.     {
  9.         //Promasio je
  10.         attack_grid[row][col] = (playerID * -1);
  11.         //attack_grid[row][col] -= playerID; Moze i ovako...
  12.         return 0;
  13.     }
  14.     else
  15.     {
  16.         //Pogodio je
  17.         attack_grid[row][col] = playerID;
  18.         return 1;
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top