public void joined(ViewProxy proxy, String name) {
	
		int id;
		
		if (names[PLAYER_ONE - 1] == null) {
			names[PLAYER_ONE - 1] = name;
			id = PLAYER_ONE;
		}
		
		else {
			names[PLAYER_TWO - 1] = name;
			id = PLAYER_TWO;
			//Tell player 2 about player 1
			modelListeners.get(id-1).playerInfo(PLAYER_ONE, names[PLAYER_ONE -1]);
		}
		
		
		//inform the player of their id
		modelListeners.get(id-1).joined(id);
		
		//Tell everyone about the new player
		Iterator<ModelListener> iter = modelListeners.iterator();
		while (iter.hasNext()) {
			ModelListener listener = iter.next();
			listener.playerInfo(id, name);

		}
		
		//Tell everyone the new game has started if player two has arrived
		if (id == PLAYER_TWO) {
			newGame();
		}
		
			
	}