Skip to content

Commit

Permalink
fixed point counting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Albrecht committed Dec 17, 2021
1 parent d7a6126 commit d5fa3cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BeARouter/BeARouter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWPF>true</UseWPF>
<ApplicationIcon>c_router_blue_BoB_icon.ico</ApplicationIcon>
<Authors>Philipp Albrecht</Authors>
<Version>1.0</Version>
<Version>1.1</Version>
<PackageProjectUrl>https://github.com/muqiuq/BeASwitch</PackageProjectUrl>
<PackageIcon>c_router_blue.png</PackageIcon>
<PackageIconUrl />
Expand Down
13 changes: 11 additions & 2 deletions BeARouter/GameEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,24 @@ public void CheckSolution()
});

LastAttemptCorrect = false;
var AllCorrect = true;
var theOneIsCorrect = false;

foreach (var routerPort in Ports)
{
if (routerPort.IsChecked && routerPort.IsMarked)
{
NumberOfCorrectAttempts++;
LastAttemptCorrect = true;
theOneIsCorrect = true;
}
if (routerPort.IsChecked && !routerPort.IsMarked)
{
AllCorrect = false;
}
}
if(AllCorrect && theOneIsCorrect)
{
NumberOfCorrectAttempts++;
}
NumberOfAttempts++;
}

Expand Down

0 comments on commit d5fa3cf

Please sign in to comment.