public Move findRandomMove(String player) {
    	  // Check if player is valid (so we don't have to worry about
    	  // null pointers later).
    	    if (player == null || ! (player.equals("red") ||
    	                  player.equals("blue")))
    	      return null;

    	    MyList moves = new MyList();

    	    // Iterate over all Hexpos's
    	    Set set = owner.keySet();

    	    Iterator it = set.iterator();
    	    while(it.hasNext()) {
    	      Hexpos hp = (Hexpos) it.next();
    	      MyList movesTo = findMovesTo(hp, player);
    	      if (movesTo != null)
    	         moves.addAll(findMovesTo(hp, player));
    	      }
    	      if(moves.size()==0){
    	        return null;
    	    }
    	    int random = (int)(Math.random()*moves.size());
    	    return (Move) moves.get(random);
    	  }