Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package terceiraQuestao;
  2.  
  3. public class Labirinto {
  4.         private char[][] labirinto;
  5.         private int linha;
  6.         private int coluna;
  7.  
  8.  
  9.         public Labirinto (int tamanho) {
  10.                 this.labirinto = new char[tamanho][tamanho];
  11.                 for (int i = 0; i < tamanho; i++) {
  12.                         for (int j = 0; j < tamanho; j++){
  13.                                 labirinto[i][j] = labirinto [linha][coluna];
  14.                         }
  15.                 }
  16.         }
  17.        
  18.         public void preencher (int tamanho, char p){
  19.                 for(int m = 0; m < tamanho; m++) {
  20.                         labirinto[linha][m] = p;
  21.                         linha++;
  22.                 }
  23.         }
  24.  
  25.         public char[][] getLabirinto() {
  26.                 return labirinto;
  27.         }
  28.  
  29.  
  30. }