Esempio n. 1
0
  @Override
  public void displayOutput(AsciiPanel terminal) {
    int x = terminal.getWidthInCharacters() / 4;
    int y = terminal.getHeightInCharacters() / 4;
    int x2 = (x * 3) - 1;
    int y2 = y * 3;

    GameEngine.clearArea(x, y, x2, y2);

    this.menu.displayOutput(terminal);
  }
Esempio n. 2
0
 public ApplicationMain() {
   super();
   terminal = new AsciiPanel();
   terminal.write("RogueLike", 1, 1);
   add(terminal);
   pack();
 }
Esempio n. 3
0
  public static void displayBorders(int x, int y, int x2, int y2) {
    terminal.write((char) 201, x, y);
    terminal.write((char) 187, x2, y);
    terminal.write((char) 188, x2, y2);
    terminal.write((char) 200, x, y2);

    for (int i = x + 1; i < x2; i++) {
      terminal.write((char) 205, i, y);
      terminal.write((char) 205, i, y2);
    }
    for (int i = y + 1; i < y2; i++) {
      terminal.write((char) 186, x, i);
      terminal.write((char) 186, x2, i);
    }
  }
Esempio n. 4
0
 @Override
 public void displayOutput(@NotNull final AsciiPanel terminal) {
   terminal.write(1, 1, "You won.");
   terminal.writeCenter(22, "-- press [enter] to restart --");
 }
Esempio n. 5
0
 public void repaint() {
   super.repaint();
   terminal.repaint();
 }
Esempio n. 6
0
 public void init() {
   super.init();
   this.setSize(terminal.getWidth() + 20, terminal.getHeight() + 20);
 }
Esempio n. 7
0
 public AppletMain() {
   super();
   terminal = new AsciiPanel();
   terminal.write("rl tutorial", 1, 1);
   add(terminal);
 }
Esempio n. 8
0
 public static void clearArea(int x, int y, int x2, int y2) {
   for (int i = y; i < y2; i++) {
     for (int j = x; j < x2; j++) terminal.write(" ", j, i);
   }
 }
Esempio n. 9
0
 public static void clearScreen() {
   terminal.clear();
 }