コード例 #1
0
		public void Ctor_None_NoMoves()
		{
			var instruction = new MoveInstruction();
			var act = instruction.ToString();
			var exp = "no_moves";

			Assert.AreEqual(exp, act);
		}
コード例 #2
0
		public void Ctor_Skip_Skip()
		{
			var instruction = new MoveInstruction(ActionType.Skip);
			var act = instruction.ToString();
			var exp = "skip";

			Assert.AreEqual(exp, act);
		}
コード例 #3
0
		public void Ctor_TurnRightRightRightRightLeftDown_TurnRightRightDrop()
		{
			var instruction = new MoveInstruction(ActionType.TurnRight, ActionType.Right, ActionType.Right, ActionType.Right, ActionType.Left, ActionType.Left, ActionType.Down);
			var act = instruction.ToString();
			var exp = "turnright,right,drop";

			Assert.AreEqual(exp, act);
		}
コード例 #4
0
		public void Ctor_LeftDown_LeftDrop()
		{
			var instruction = new MoveInstruction(ActionType.Left, ActionType.Down);
			var act = instruction.ToString();
			var exp = "left,drop";

			Assert.AreEqual(exp, act);
		}
コード例 #5
0
		public BotResponse GetResponse(TimeSpan time)
		{
			SetDuration(time);

			var path = DecisionMaker.GetMove(Field, Opponent, Current, Next, State.Round);
			var move = new MoveInstruction(path.Moves.ToArray());

			var response = new BotResponse()
			{
				Move = move,
				Log = DecisionMaker.GetLog(),
			};
			return response;
		}