Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaapplication2;
- /**
- *
- * @author a
- */
- public class JavaApplication2 {
- /**
- * @param args the command line arguments
- */
- static int size=51;
- public static void main(String[] args) {
- char[][] buffer=new char[size][size];
- drawFrame(buffer);
- drawLine(buffer,270,21);
- drawLine(buffer,180,15);
- for(int x=0; x<size; x++) {
- System.out.println(buffer[x]);
- }
- }
- public static void drawLine(char[][] buffer, int degrees, int length) {
- }
- public static void drawFrame(char[][] buffer) {
- for(int x=0; x<size; x++) {
- for(int y=0; y<size; y++) {
- buffer[x][y]=' ';
- }
- if(x%10==0) {
- buffer[0][x]='@';
- buffer[size-1][x]='@';
- buffer[x][0]='@';
- buffer[x][size-1]='@';
- } else {
- buffer[0][x]='X';
- buffer[size-1][x]='X';
- buffer[x][0]='X';
- buffer[x][size-1]='X';
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment