Ejemplo n.º 1
0
            private ICollection <Cell <double> > possibleOutcomes(Cell <double> c, CellWorldAction a)
            {
                // There can be three possible outcomes for the planned action
                ICollection <Cell <double> > outcomes = CollectionFactory.CreateQueue <Cell <double> >();

                outcomes.Add(cw.Result(c, a));
                outcomes.Add(cw.Result(c, a.GetFirstRightAngledAction()));
                outcomes.Add(cw.Result(c, a.GetSecondRightAngledAction()));

                return(outcomes);
            }
Ejemplo n.º 2
0
        public void testMoveUpIntoAdjacentCellChangesPositionCorrectly()
        {
            Cell <double> sDelta = cw.Result(cw.GetCellAt(1, 1), CellWorldAction.Up);

            Assert.AreEqual(1, sDelta.getX());
            Assert.AreEqual(2, sDelta.getY());
        }