Beispiel #1
0
        static void Main(string[] args)
        {
            RollerCoasterMaker game = new RollerCoasterMaker();

            game.BuildUpward();
            game.BuildDownward();
            game.BuildLoop();
            game.Back();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
        }
        public void BuildStright()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();


            game.BuildStright();
            Assert.AreEqual(67, game.coaster.TrackCount);
        }
        public void RemoveChunk()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();


            game.BuildStright();
            game.Back();
            Assert.AreEqual(64, game.coaster.TrackCount);
        }
        public void DetectMaxY()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();


            for (int i = 0; i < 45; i++)
            {
                game.BuildStright();
            }

            Assert.AreEqual(game.builder.initialTaskResults, TaskResults.MaxY);
        }
        public void BuildLoop()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();

            for (int i = 0; i < 10; i++)
            {
                game.BuildStright();
            }
            game.BuildLoop();

            Assert.AreEqual(false, game.builder.lastBuildActionFail);
        }
        public void DetectCollision()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();


            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();

            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();


            Assert.AreEqual(game.builder.initialTaskResults, TaskResults.Collison);
        }
        public void FixMaxY()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();


            for (int i = 0; i < 45; i++)
            {
                game.BuildStright();
            }

            Assert.AreEqual(game.builder.initialTaskResults, TaskResults.MaxY);
            Assert.AreEqual(game.builder.lastBuildActionFail, false);
        }
        public void DetectMaxX()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();

            game.BuildRight();
            game.BuildRight();
            game.BuildRight();
            game.BuildRight();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();

            Assert.AreEqual(game.builder.initialTaskResults, TaskResults.MaxX);
        }
        public void FixMaxX()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();

            game.BuildRight();
            game.BuildRight();
            game.BuildRight();
            game.BuildRight();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();

            Assert.AreEqual(game.builder.initialTaskResults, TaskResults.MaxX);
            Assert.AreEqual(game.builder.lastBuildActionFail, false);
        }
        public void FixTrackCollison()
        {
            RollerCoasterMaker game = new RollerCoasterMaker();


            for (int i = 0; i < 6; i++)
            {
                game.BuildStright();
            }
            for (int i = 0; i < 15; i++)
            {
                game.BuildLeft();
            }
            Assert.AreEqual(game.builder.initialTaskResults, TaskResults.Collison);
            Assert.AreEqual(game.builder.lastBuildActionFail, false);
        }
        static void Main(string[] args)
        {
            RollerCoasterMaker game = new RollerCoasterMaker();

            game.BuildStright();
            game.BuildStright();

            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();
            game.BuildLeft();

            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            game.BuildStright();
            //game.BuildFinsh();

            //game.Back();
            //game.Back();
        }