SHARE
TWEET

Untitled

ChrisM88 Dec 8th, 2019 159 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. METHOD SORTGAMEARRAY
  2.  
  3.     BOOLEAN swapped = true
  4.  
  5.     while (swapped)
  6.    
  7.         swapped = false
  8.  
  9.         FOR INT i=0; i < (count-1); i++
  10.        
  11.             IF nameArray[i] COMPARE TO (nameArray[i + 1]) > 0
  12.            
  13.                 STRING tempName = nameArray[i]
  14.                 STRING tempPlatform = platformArray[i]
  15.                 STRING tempGenre = genreArray[i]
  16.                
  17.                 nameArray[i] = nameArray[i + 1]
  18.                 nameArray[i + 1] = tempName
  19.                
  20.                 platformArray[i] = platformArray[i + 1]
  21.                 platformArray[i + 1] = tempPlatform
  22.                
  23.                 genreArray[i] = genreArray[i + 1]
  24.                 genreArray[i + 1] = tempGenre
  25.                
  26.                 swapped = true
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