Guest User

Untitled

a guest
Jun 25th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public int getWidth(String[] level){
  2.         return level[0].length();
  3.     }
  4.  
  5. public void printPrint(String level){
  6.         int y = -64;
  7.         int x = 0;
  8.         for(int i = 0; i < level.length(); i++){
  9.             if( i % getWidth() == 0)
  10.                 y += 64;
  11.                 //x = level.length()*64;
  12.             char c = level.charAt(i);
  13.             GImage fieldImage = createGImage(c);
  14.             add(fieldImage, 64*i, y);
  15.         }
  16.     }
Add Comment
Please, Sign In to add comment