MineField() {
		squares = new HashMap(100);

		for(int i=0;i<100;i++) {
			squares.put(new Integer(i),new BlankSquare(i));
		}
		
		mineLocations = generateRandomNumbers(10);
		
		for(Iterator it = mineLocations.iterator();it.hasNext();) {
			Integer location = (Integer)it.next();
			Square mine = new MineSquare(location.intValue());
			squares.put(location,mine);

			List neighbors = getNeighbors(location.intValue());

			for(Iterator it2 = neighbors.iterator();it2.hasNext();) {
				location = (Integer)it2.next();

				if (squares.get(location) instanceof NumberSquare) {
					NumberSquare ns = (NumberSquare)squares.get(location);
					ns.incrementValue();
				}else if(squares.get(location) instanceof BlankSquare) {
					squares.put(location,new NumberSquare(location.intValue(),1));
				}
			}
		}		
		
		for(int location =0;location<100;location++) {

			Square square = (Square)squares.get(new Integer(location));
			List neighbors = getNeighbors(location);

			for(Iterator it = neighbors.iterator();it.hasNext();) {
				square.addNeighbor((Square)(squares.get((Integer)it.next())));
			}
		}
	}