Guest User

Untitled

a guest
May 26th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. package pressure.screen;
  2.  
  3. import pressure.Main;
  4.  
  5. public class Screen {
  6.  
  7.     public static char[][] screen = new char[58][30];
  8.  
  9.     public void render() {
  10.         for (int countX = 0; countX < 58; countX++) {
  11.             for (int countY = 0; countY < 30; countY++) {
  12.                 Main.font.drawString(countX * 8, countY * 8, "" + screen[countX][countY]);
  13.             }
  14.         }
  15.     }
  16.    
  17.     public void placeString(int X, int Y, String Out) {
  18.         char[] puts = Out.toCharArray();
  19.         for(int countX = X; countX < X + Out.length(); countX++) {
  20.             screen[countX][Y] = puts[countX - X];
  21.         }
  22.     }
  23.    
  24.     public void placeChar(int X, int Y, char Out) {
  25.         screen[X][Y] = Out;
  26.     }
  27. }
Add Comment
Please, Sign In to add comment