private static Player nightPhaseHelper(GameState state, Color faction)
	{
		for(Player p : state.getPlayerList())
		{
			if(p.getFaction().equals(faction))
			{
				while(state.getTime() == Time.NIGHT)
				{
					Player player = state.getPlayer(faction);
					
					if(player != null)
					{
						ArrayList<Card> den = new ArrayList<Card>(player.getDen());
						Collections.sort(den);
						
						int index = den.size()-1;
						
						while(index >= 0 && den.get(index).checkPhase(Time.NIGHT))
						{
							index--;
						}
						
						if(index < 0)
						{
							state.setTime(Time.PICK_CARDS);
						}
						else
						{
							state = den.get(index).nightAction(new GameState(state));
							
							//Gotta make sure to check if the card is still in play or not
							if(state.getPlayer(faction).getDen().contains(den.get(index)))
							{
								state.getPlayer(faction).removeFromDen(den.get(index));
								
								Card replacement = den.get(index);
								replacement.setTrue(Time.NIGHT);
								state.getPlayer(faction).addToDen(den.get(index));
							}
						}
					}
				}
				
				for(Card c : state.getPlayer(faction).getDen())
				{
					state.getPlayer(faction).removeFromDen(c);
					c.resetPhases();
					state.getPlayer(faction).addToDen(c);
				}
				return state.getPlayer(faction);	
			}
		}
		
		return null;
	}