This approach works for me:

How to give a merchant A Lot of Gold


Write down how much gold you have for reference.
Give yourself A Lot of Gold.
Buy everything the shopkeeper owns
Sell it back to him at a tenth or so of the price.
Repeat 3 and 4 until you no longer have A Lot of Gold.
The merchant now has A Lot of Gold.
Set your own gold amount back to the number you wrote down in 1.


Is there a console command to give vendors gold to help with selling?
I got my 1 dimensional program to work just fine so I figured I just need a few tweaks to get the 2D to work as well. It's not fully completed but it would helpful to know if I am on the right track or completely off base with where I am at.

import java.util.Scanner;
import java.util.Random;

public class MS2D 
{
    public static int[][] map = new int[10][10];    // mine field is 10 cells

    public static boolean[][] played = new boolean[10][10]; // played moves

    public static int row_pick;               // row picked to play          
    public static int col_pick;               // column picked to play

    public static int threshold = 6;          // low threshold = more mines

      public static void main(String[] args) 
      {
         int r, c;                               // each 'row' &amp; 'column' in 2-D array
         Scanner kb = new Scanner(System.in);    // keyboard input
         boolean hit, done;

         InitMap();          // get the map randomized
         ShowMap();          // show current map (all hidden)

         while( true ) // play loop starts
         {
            System.out.print("Which row and column to play? ( -1 to quit) ");
            row_pick = kb.nextInt();
            col_pick = kb.nextInt();
            if ((col_pick &lt; 0) || (col_pick &gt; map.length - 1) || (row_pick &lt; 0) 
                || (row_pick &gt; map.length - 1) )
            {
               System.out.println("Thanks for playing!");
               System.exit(0);
            }
            else 
            {
               if (played[row_pick][col_pick])
               {
                  System.out.println("That position has been played!");
                  continue;
               }    


            }   
            hit = false;
            done = false;
            if (map[row_pick][col_pick] == 9)
            {
               hit = true;
            }
            else
            {
               MarkPlayed(row_pick, col_pick);
               done = true;

               for (r = 0; r &lt;= played.length - 1; r++) 
               {
                  for (c = 0; c &lt;=played.length - 1; c++)
                  { 
                     if( played[r][c] == false)
                        done = false;
                  }
               }    
            }
            if (hit || done)
            {
               for(r = 0; r &lt;= played.length - 1; r++)
               {
                  for(c = 0; c &lt;= played.length - 1; c++)
                  {
                     played[r][c] = true;
                  }
               }
            }

            ShowMap();

            if (hit == true)
            {
               System.out.println("Boom! Bye, bye.");
               break;
            }   
            else if (done == true)
            {   
               System.out.println("Good Game!");
               break;      
            }  
         }
      }     
      public static int CountMines( int r, int c ) 
      {
         int count = 0; 
         if (c - 1 &gt;= 0 &amp;&amp; c - 1 == 9)
         {
            count++;
         }
         if (map[c + 1] == 9)
         {
            count++;
         }
         return count;

      } // end CountMines()

      public static void InitMap () 
      { // randomize map
         int r, c, num;
         Random rand_obj= new Random();// use Random class to create a rand_obj
         for (r = 0; r &lt; map.length - 1; r++)
         {
            for (c = 0; c &lt; map.length - 1; c++)
            {  
               num = rand_obj.nextInt(10);

               if (num &gt; threshold)
               {
                  map[r][c] = 9;
               }
               else
               {
                  map[r][c] = 0;
               }
            }
         }
         for (r = 0; r &lt; map.length - 1; r++)
         {
            for(c = 0; c &lt; map.length - 1; c++)
            {
               if (map[r][c] == 0)
                  CountMines( r, c);   
            }
         }
      } // end InitMap()

      public static void MarkPlayed(int r, int c ) 
      {
         played[r][c] = true;

         if (r - 1 &gt;= 0 &amp;&amp; r - 1 != 9)  it true
         {
            if(c - 1 &gt;= 0 &amp;&amp; c - 1 != 9)
            {
               played[r][c] = true;
            }
            if (r + 1 &gt;= 0 &amp;&amp; r + 1 != 9)
            {
               if(c + 1 &gt;= 0 &amp;&amp; c + 1 != 9)
               {
                  played[r][c] = true;  
               }
            }
         }      
      } // end MarkPlayed()


      public static void ShowMap() 
      {
         int r, c;

         for ( r = 0; r &lt; played.length; r++ )
         {
            for ( c = 0; c &lt; played.length; c++ )
            {
               if ( played[r][c] ) // can show
               {
                  System.out.print( map[r][c] + " " );
               }    
               else 
               {
                  System.out.print(". "); // hidden
               }
            }
         }
         System.out.println();

         for ( c = 0; c &lt; played.length; c++ )
         {  
            System.out.print(c + " ");
         }  
         System.out.println();

      } // end ShowMap ()
} // end class

