Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KSudoku
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Games
KSudoku
Commits
790c032f
Commit
790c032f
authored
Jan 04, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix generate i18n
parent
f4cc5b6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
src/generator/sudokuboard.cpp
src/generator/sudokuboard.cpp
+5
-8
No files found.
src/generator/sudokuboard.cpp
View file @
790c032f
...
...
@@ -170,18 +170,19 @@ void SudokuBoard::generatePuzzle (BoardContents & puzzle,
QWidget
owner
;
int
ans
=
0
;
if
(
m_accum
.
nGuesses
==
0
)
{
const
QString
rating
=
QString
(
"%1"
).
arg
(
bestRating
,
0
,
'f'
,
1
);
ans
=
KMessageBox
::
questionYesNo
(
&
owner
,
i18n
(
"It will be possible to solve the generated puzzle "
"by logic alone. No guessing will be required.
\n
"
"
\n
"
"The internal difficulty rating is %1. There are "
"%2 clues at the start and %3 moves to go."
)
.
arg
(
bestRating
,
0
,
'f'
,
1
).
arg
(
bestNClues
)
.
arg
(
m_stats
.
nCells
-
bestNClues
),
"%2 clues at the start and %3 moves to go."
,
rating
,
bestNClues
,
(
m_stats
.
nCells
-
bestNClues
)),
i18n
(
"Difficulty Level"
),
KGuiItem
(
i18n
(
"&OK"
)),
KGuiItem
(
i18n
(
"&Retry"
)));
}
else
{
const
QString
average
=
QString
::
fromLatin1
(
"%1"
).
arg
(((
float
)
bestNGuesses
)
/
5.0
,
0
,
'f'
,
1
);
const
QString
rating
=
QString
::
fromLatin1
(
"%1"
).
arg
(
bestRating
,
0
,
'f'
,
1
);
ans
=
KMessageBox
::
questionYesNo
(
&
owner
,
i18n
(
"Solving the generated puzzle will require an "
"average of %1 guesses or branch points and if you "
...
...
@@ -189,11 +190,7 @@ void SudokuBoard::generatePuzzle (BoardContents & puzzle,
"first guess should come after %2 moves.
\n
"
"
\n
"
"The internal difficulty rating is %3, there are "
"%4 clues at the start and %5 moves to go."
)
.
arg
(((
float
)
bestNGuesses
)
/
5.0
,
0
,
'f'
,
1
)
.
arg
(
bestFirstGuessAt
)
.
arg
(
bestRating
,
0
,
'f'
,
1
).
arg
(
bestNClues
)
.
arg
(
m_stats
.
nCells
-
bestNClues
),
"%4 clues at the start and %5 moves to go."
,
average
,
bestFirstGuessAt
,
rating
,
(
m_stats
.
nCells
-
bestNClues
)),
i18n
(
"Difficulty Level"
),
KGuiItem
(
i18n
(
"&OK"
)),
KGuiItem
(
i18n
(
"&Retry"
)));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment