aeroson

Untitled

Oct 17th, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package javaapplication2;
  6.  
  7. /**
  8. *
  9. * @author a
  10. */
  11. public class JavaApplication2 {
  12.  
  13. /**
  14. * @param args the command line arguments
  15. */
  16. static int size=51;
  17. public static void main(String[] args) {
  18.  
  19. char[][] buffer=new char[size][size];
  20. drawFrame(buffer);
  21. drawLine(buffer,270,21);
  22. drawLine(buffer,180,15);
  23.  
  24. for(int x=0; x<size; x++) {
  25. System.out.println(buffer[x]);
  26. }
  27.  
  28. }
  29. public static void drawLine(char[][] buffer, int degrees, int length) {
  30.  
  31. }
  32. public static void drawFrame(char[][] buffer) {
  33. for(int x=0; x<size; x++) {
  34. for(int y=0; y<size; y++) {
  35. buffer[x][y]=' ';
  36. }
  37.  
  38. if(x%10==0) {
  39. buffer[0][x]='@';
  40. buffer[size-1][x]='@';
  41. buffer[x][0]='@';
  42. buffer[x][size-1]='@';
  43. } else {
  44. buffer[0][x]='X';
  45. buffer[size-1][x]='X';
  46. buffer[x][0]='X';
  47. buffer[x][size-1]='X';
  48. }
  49.  
  50.  
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment