/// <summary>Runs it all.</summary>
		public void DoRun(IBot bot, IEnumerable<IInstruction> instructions)
		{
			if (bot == null) { throw new ArgumentNullException("bot"); }
			if (instructions == null) { throw new ArgumentNullException("instructions"); }

			var settings = new Settings();
			var state = new GameState();

			foreach (var instruction in instructions)
			{
				if (settings.Apply(instruction))
				{
					bot.ApplySettings(settings);
				}
				else if (state.Apply(instruction)){ }
				else if (instruction is RequestMoveInstruction)
				{
					bot.Update(state);
					try
					{
						var response = bot.GetResponse(((RequestMoveInstruction)instruction).Time);
						Writer.WriteLine(response.Move);
						if (!String.IsNullOrEmpty(response.Log))
						{
							Logger.WriteLine(response.Log);
						}
					}
					catch (Exception x)
					{
						Writer.WriteLine(new MoveInstruction(4, 4));
						Logger.WriteLine(x);
					}
				}
			}
		}
		void IBot.Update(GameState state)
		{
			State = state;
		}
		public static GameState Create(IEnumerable<IInstruction> instructions)
		{
			var state = new GameState();

			foreach (var instruction in instructions.Where(i => Mapping.ContainsKey(i.GetType())))
			{
				Mapping[instruction.GetType()].Invoke(instruction, state);
			}
			return state;
		}