Skip to content

Commit

Permalink
Merge pull request #247 from CodebreakerApp/246-5x5x4-algorithm
Browse files Browse the repository at this point in the history
analyzer: changed version number
  • Loading branch information
christiannagel authored Sep 7, 2024
2 parents 7fa44f0 + b6b0f86 commit 3c1c4a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ namespace Codebreaker.GameAPIs.Analyzer.Tests;

public class ShapeGame5x5x4AnalyzerTests
{
[Fact]
public void SetMove_ShouldReturnOneWhiteAndJustOneBlueBecauseOfWhite()
{
ShapeAndColorResult expectedKeyPegs = new(0, 1, 1);
ShapeAndColorResult? resultKeyPegs = AnalyzeGame(
["Square;Green", "Square;Purple", "Circle;Yellow", "Triangle;Blue"],
["Triangle;Green", "Circle;Yellow", "Star;Yellow", "Circle;Red"]
);
// Position 2: pair ok, wrong position (white)
// Position 1: Green is correct (blue)
// Position 3: Yellow is correct, but the position 2 already has a white for circle/yellow, thus not another blue is added!
// Position 4: all wrong

Assert.Equal(expectedKeyPegs, resultKeyPegs);
}

[Fact]
public void SetMove_ShouldNotReturnBlueWithOneWhite()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<VersionPrefix>3.7.1</VersionPrefix>
<PackageTags>
Codebreaker;CNinnovation;GameAnalyzers
</PackageTags>
Expand Down

0 comments on commit 3c1c4a1

Please sign in to comment.