public boolean parseMessage(ActionMessage am, Player player) {
		//Check if the player can act
		if (player != currentActor) {
			return false;
		}
		
		int position = getPositionFor(player);
		
		//That just leaves betting and folding
		if (am.action == Action.FOLD) {
			stillInGame.remove(position);
			
			//Check for end of game resulting from this action
			if (stillInGame.size() <= 1) {
				calculateWinner();
			}
		} else if (am.action == Action.BET){
			//Betting
			Integer amount = (Integer) am.getParameter("Amount");
			
			//Player already checked if they have enough
			//So we just add it to the pot
			pot += amount;
			
		} else {
			return false;
		}
		
		//Continue on
		currentActor = getNextValidPlayer(position);
		//If the next player is the dealer, advance the state
		if (currentActor == dealer) {
			advanceState();
		}
		messageStateChanged();
		return true;
	}