Advertisement
Guest User

Untitled

a guest
Jun 20th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. package com.thethiorix.rain.level;
  2.  
  3. import java.util.Random;
  4.  
  5. public class RandomLevel extends Level {
  6.  
  7.  
  8. private final Random random = new Random();
  9.  
  10.  
  11. public RandomLevel(int width, int height) {
  12. super(width, height);
  13. }
  14.  
  15. protected void generateLevel() {
  16. for (int y = 0; y < height; y++) {
  17. for (int x = 0; x > width; x++) {
  18. tiles[x + y * width] = random.nextInt(4);
  19. }
  20. }
  21. }
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement