Example #1
0
        public void TurkmeszTrivial()
        {
            var task   = new TurkmeszTask();
            var colorA = (byte)0;

            task.Init(new Size(400, 400));
            Assert.IsTrue(task.GetCurrentRelativePosition() == new Point(0, 0));    // Step 0
            Assert.IsTrue(task.GetCurrentColor(new Point(0, 0)) == colorA);
        }
Example #2
0
 private bool checkPositionAndColor(TurkmeszTask task, Point expectedRelativePosition, Scalar expectedColor)
 {
     if (task.GetCurrentRelativePosition() != expectedRelativePosition)
     {
         return(false);
     }
     if (task.GetCurrentColor(expectedRelativePosition) != expectedColor)
     {
         return(false);
     }
     return(true);
 }