title: Diamond square algorithm
body: <p>I'm trying to write the <a href="http://en.wikipedia.org/wiki/Diamond-square_algorithm" rel="noreferrer">Diamond-Square algorithm</a> in Java to generate a random map but can't figure out the implementation...</p>
  
  <p>Anyone with some Java code (or other language) so i can check how the loop is made would be greatly appreciated!</p>
  
  <p>Thanks!</p>