From ab5413f885429a8d22d01331150e6f0b5fae37cc Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Wed, 14 Dec 2016 00:08:17 -0600 Subject: [PATCH] Improved code generation required reducing the optimal cost of the single-byte test --- SpriteCompiler.Test/MarioTests.cs | 2 +- SpriteCompiler.Test/Tests.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SpriteCompiler.Test/MarioTests.cs b/SpriteCompiler.Test/MarioTests.cs index 61629e6..56ae88f 100644 --- a/SpriteCompiler.Test/MarioTests.cs +++ b/SpriteCompiler.Test/MarioTests.cs @@ -64,7 +64,7 @@ namespace SpriteCompiler.Test { // Arrange var problem = SpriteGeneratorSearchProblem.CreateSearchProblem(); - var search = SpriteGeneratorSearchProblem.Create(80); // max budget of 80 cycles + var search = SpriteGeneratorSearchProblem.Create(); // max budget of 80 cycles var sprite = new List { new SpriteByte(0x11, 0x00, 3), diff --git a/SpriteCompiler.Test/Tests.cs b/SpriteCompiler.Test/Tests.cs index 8b25407..43ec52a 100644 --- a/SpriteCompiler.Test/Tests.cs +++ b/SpriteCompiler.Test/Tests.cs @@ -44,14 +44,14 @@ namespace SpriteCompiler.Test // TCS // SHORT A // LDA #$AA - // STA 0,s - // LONG A = 14 cycles + // PHA + // LONG A = 13 cycles // Write out the solution WriteOutSolution(solution); Assert.AreEqual(5, solution.Count()); - Assert.AreEqual(14, (int)solution.Last().PathCost); + Assert.AreEqual(13, (int)solution.Last().PathCost); } [TestMethod]