added double buffering for sharks and player