Ejemplo n.º 1
0
        public void PlayErrorTest()
        {
            var tsm = new TurtleStateMachine(new BusinessLog());

            tsm.Initialize(
                new Model.Entities.TableConfig
            {
                SizeX         = 2,
                SizeY         = 2,
                StartPosition = new Model.Entities.Position {
                    X = 1, Y = 1, Direction = Model.Enums.Directions.E
                },
                Exit = new Model.Entities.Coordinate {
                    X = 0, Y = 0
                },
                Mines = new System.Collections.Generic.List <Model.Entities.Coordinate>
                {
                    new Model.Entities.Coordinate {
                        X = 0, Y = 1
                    }
                }
            },
                new Model.Entities.MovesConfig {
                Model.Enums.Moves.M
            });
            Assert.AreEqual(tsm.Play(), Model.Enums.State.LeftTable);
        }