daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function createBacteries( count )
  2.     local bacteria = {}
  3.     bacteria.count = count
  4.     bacteria.speed = 10
  5.     bacteria.bacteriesInGroup = 10
  6.    
  7.     -- public functions
  8.     function bacteria:sendArmy(persent, sourceColony, destColony)
  9.         local groups = math.ceil((bacteria.count * persent / 100) / bacteria.bacteriesInGroup)
  10.         local army = math.ceil(bacteria.count * persent / 100)
  11.         bacteria.count = bacteria.count - army
  12.        
  13.         local distance = math.sqrt(math.pow((sourceColony.x - destColony.x),2) + math.pow((sourceColony.y - destColony.y),2))
  14. ...
  15. ...
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