Skip to content
Snippets Groups Projects
Commit 93742e4a authored by PowerfulShuffle's avatar PowerfulShuffle
Browse files

bug fix

parent 458e7ae4
No related branches found
No related tags found
No related merge requests found
...@@ -179,6 +179,7 @@ namespace PuzzlePlayer_Namespace ...@@ -179,6 +179,7 @@ namespace PuzzlePlayer_Namespace
{ {
Board.Hint(); Board.Hint();
penalty++; penalty++;
if (Board.IsBoardSolved()) Win();
Draw(); Draw();
}; };
CreateButton(solvebutton); CreateButton(solvebutton);
...@@ -256,7 +257,10 @@ namespace PuzzlePlayer_Namespace ...@@ -256,7 +257,10 @@ namespace PuzzlePlayer_Namespace
HasWon = false; HasWon = false;
return; return;
case Keys.H: case Keys.H:
Board.Hint();
penalty++;
if (Board.IsBoardSolved()) Win();
Draw();
return; return;
case Keys.Space: case Keys.Space:
Board.Solve(false); Board.Solve(false);
...@@ -307,7 +311,7 @@ namespace PuzzlePlayer_Namespace ...@@ -307,7 +311,7 @@ namespace PuzzlePlayer_Namespace
Draw(); Draw();
if (!legit) return; if (!legit) return;
int completiontime = (int)stopwatch.ElapsedMilliseconds / 1000; int completiontime = (int)stopwatch.ElapsedMilliseconds / 1000;
int reward = (int)GetMoney((double)completiontime, (double)Board.getBoardBaseScore(), (double)penalty); int reward = (int)GetMoney((double)completiontime, (double)Board.getBoardBaseScore(), 10*(double)penalty);
MessageBox.Show($"oi oi oi, {completiontime}, +{reward} out of {Board.getBoardBaseScore()}, legit:{legit}, penalty:{penalty}"); MessageBox.Show($"oi oi oi, {completiontime}, +{reward} out of {Board.getBoardBaseScore()}, legit:{legit}, penalty:{penalty}");
UserDataManager.Money += reward; UserDataManager.Money += reward;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment