Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1.  public Minesweeper(File seedFile) {
  2.      
  3.      try {
  4.          Scanner seedInput = new Scanner(seedFile);
  5.          this.rows = seedInput.nextInt();
  6.          this.cols = seedInput.nextInt();
  7.          this.mines = seedInput.nextInt();
  8.          
  9.          for (int c = 0; c<mines; c++) {
  10.              mineBoard[seedInput.nextInt()][seedInput.nextInt()] = "M";
  11.          }
  12.        
  13.      
  14.        
  15.      } catch (FileNotFoundException e) {
  16.          // handler exception here
  17.      } // try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement