mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added free hint option.
This commit is contained in:
parent
b80bfc4ca6
commit
2abdc419f3
11 changed files with 73 additions and 8 deletions
|
@ -99,7 +99,8 @@ to the main <i>data/tiles</i> or your home <i>~/.PySolFC/tiles</i> directory.
|
||||||
<li> Scoring only begins after you make your first move.
|
<li> Scoring only begins after you make your first move.
|
||||||
Also, if you undo all your moves back to the start
|
Also, if you undo all your moves back to the start
|
||||||
the game won't score either.
|
the game won't score either.
|
||||||
<li> You will lose a game if you consume a hint or start demo mode.
|
<li> You will lose a game if you consume a hint (unless free hints are enabled)
|
||||||
|
or start demo mode.
|
||||||
<li> You can restart any time to get another chance to win this game.
|
<li> You can restart any time to get another chance to win this game.
|
||||||
<li> If you don't want to score a lost game you can temporarily change
|
<li> If you don't want to score a lost game you can temporarily change
|
||||||
the player options.
|
the player options.
|
||||||
|
|
|
@ -3,7 +3,7 @@ msgstr ""
|
||||||
"Project-Id-Version: PySol 0.0.1\n"
|
"Project-Id-Version: PySol 0.0.1\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-12 09:02-0500\n"
|
"PO-Revision-Date: 2022-05-26 22:09-0400\n"
|
||||||
"Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n"
|
"Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n"
|
||||||
"Language-Team: German\n"
|
"Language-Team: German\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
|
@ -2426,6 +2426,9 @@ msgstr "Tips zulassen"
|
||||||
msgid "Enable shuffle"
|
msgid "Enable shuffle"
|
||||||
msgstr "Neu mischen zulassen"
|
msgstr "Neu mischen zulassen"
|
||||||
|
|
||||||
|
msgid "Free hints"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/kivy/menubar.py:561
|
#: pysollib/kivy/menubar.py:561
|
||||||
msgid "Enable highlight piles"
|
msgid "Enable highlight piles"
|
||||||
msgstr "Spielfeldstapel hervorheben"
|
msgstr "Spielfeldstapel hervorheben"
|
||||||
|
@ -4798,6 +4801,9 @@ msgstr ""
|
||||||
msgid "Enable shu&ffle"
|
msgid "Enable shu&ffle"
|
||||||
msgstr "Sound aktivieren"
|
msgstr "Sound aktivieren"
|
||||||
|
|
||||||
|
msgid "Free hin&ts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/ui/tktile/menubar.py:491
|
#: pysollib/ui/tktile/menubar.py:491
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Enable highlight p&iles"
|
msgid "Enable highlight p&iles"
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgstr ""
|
||||||
"Project-Id-Version: 1.02\n"
|
"Project-Id-Version: 1.02\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-12 09:02-0500\n"
|
"PO-Revision-Date: 2022-05-26 22:10-0400\n"
|
||||||
"Last-Translator: Eric Rausch <neelix570@gmail.com>\n"
|
"Last-Translator: Eric Rausch <neelix570@gmail.com>\n"
|
||||||
"Language-Team: French\n"
|
"Language-Team: French\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
@ -2468,6 +2468,9 @@ msgstr "Activer indices"
|
||||||
msgid "Enable shuffle"
|
msgid "Enable shuffle"
|
||||||
msgstr "Activer mélanger"
|
msgstr "Activer mélanger"
|
||||||
|
|
||||||
|
msgid "Free hints"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/kivy/menubar.py:561
|
#: pysollib/kivy/menubar.py:561
|
||||||
msgid "Enable highlight piles"
|
msgid "Enable highlight piles"
|
||||||
msgstr "Surbrillance des piles"
|
msgstr "Surbrillance des piles"
|
||||||
|
@ -4846,6 +4849,9 @@ msgstr "Activer &indice"
|
||||||
msgid "Enable shu&ffle"
|
msgid "Enable shu&ffle"
|
||||||
msgstr "Activer &mélanger"
|
msgstr "Activer &mélanger"
|
||||||
|
|
||||||
|
msgid "Free hin&ts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/ui/tktile/menubar.py:491
|
#: pysollib/ui/tktile/menubar.py:491
|
||||||
msgid "Enable highlight p&iles"
|
msgid "Enable highlight p&iles"
|
||||||
msgstr "Surbrillance des piles"
|
msgstr "Surbrillance des piles"
|
||||||
|
|
|
@ -12,7 +12,7 @@ msgstr ""
|
||||||
"Project-Id-Version: it_pysol\n"
|
"Project-Id-Version: it_pysol\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-12 09:02-0500\n"
|
"PO-Revision-Date: 2022-05-26 22:10-0400\n"
|
||||||
"Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n"
|
"Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n"
|
||||||
"Language-Team: Italiano <it@li.org>\n"
|
"Language-Team: Italiano <it@li.org>\n"
|
||||||
"Language: it\n"
|
"Language: it\n"
|
||||||
|
@ -2481,6 +2481,9 @@ msgstr "Abilita suggerimenti"
|
||||||
msgid "Enable shuffle"
|
msgid "Enable shuffle"
|
||||||
msgstr "Abilita mescola"
|
msgstr "Abilita mescola"
|
||||||
|
|
||||||
|
msgid "Free hints"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/kivy/menubar.py:561
|
#: pysollib/kivy/menubar.py:561
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Enable highlight piles"
|
msgid "Enable highlight piles"
|
||||||
|
@ -4912,6 +4915,9 @@ msgstr "Abilita su&ggerimenti"
|
||||||
msgid "Enable shu&ffle"
|
msgid "Enable shu&ffle"
|
||||||
msgstr "Abilita m&escola"
|
msgstr "Abilita m&escola"
|
||||||
|
|
||||||
|
msgid "Free hin&ts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/ui/tktile/menubar.py:491
|
#: pysollib/ui/tktile/menubar.py:491
|
||||||
msgid "Enable highlight p&iles"
|
msgid "Enable highlight p&iles"
|
||||||
msgstr "Abilita evidenzia p&ile"
|
msgstr "Abilita evidenzia p&ile"
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-12 09:02-0500\n"
|
"PO-Revision-Date: 2022-05-26 22:10-0400\n"
|
||||||
"Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n"
|
"Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n"
|
||||||
"Language-Team: Polish <pl@li.org>\n"
|
"Language-Team: Polish <pl@li.org>\n"
|
||||||
"Language: pl\n"
|
"Language: pl\n"
|
||||||
|
@ -2518,6 +2518,9 @@ msgstr "Włacz podpowiedzi"
|
||||||
msgid "Enable shuffle"
|
msgid "Enable shuffle"
|
||||||
msgstr "Włącz tasowanie"
|
msgstr "Włącz tasowanie"
|
||||||
|
|
||||||
|
msgid "Free hints"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/kivy/menubar.py:561
|
#: pysollib/kivy/menubar.py:561
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Enable highlight piles"
|
msgid "Enable highlight piles"
|
||||||
|
@ -4972,6 +4975,9 @@ msgstr "Włacz podpowiedzi"
|
||||||
msgid "Enable shu&ffle"
|
msgid "Enable shu&ffle"
|
||||||
msgstr "Włącz tasowanie"
|
msgstr "Włącz tasowanie"
|
||||||
|
|
||||||
|
msgid "Free hin&ts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/ui/tktile/menubar.py:491
|
#: pysollib/ui/tktile/menubar.py:491
|
||||||
msgid "Enable highlight p&iles"
|
msgid "Enable highlight p&iles"
|
||||||
msgstr "Włącz podśw&ietlanie stosów"
|
msgstr "Włącz podśw&ietlanie stosów"
|
||||||
|
|
|
@ -2303,6 +2303,9 @@ msgstr ""
|
||||||
msgid "Enable shuffle"
|
msgid "Enable shuffle"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Free hints"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/kivy/menubar.py:561
|
#: pysollib/kivy/menubar.py:561
|
||||||
msgid "Enable highlight piles"
|
msgid "Enable highlight piles"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -4601,6 +4604,9 @@ msgstr ""
|
||||||
msgid "Enable shu&ffle"
|
msgid "Enable shu&ffle"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Free hin&ts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/ui/tktile/menubar.py:491
|
#: pysollib/ui/tktile/menubar.py:491
|
||||||
msgid "Enable highlight p&iles"
|
msgid "Enable highlight p&iles"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -7,7 +7,7 @@ msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
"POT-Creation-Date: 2021-12-10 10:19-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-12 09:01-0500\n"
|
"PO-Revision-Date: 2022-05-26 22:10-0400\n"
|
||||||
"Last-Translator: Skomoroh <skomoroh@gmail.com>\n"
|
"Last-Translator: Skomoroh <skomoroh@gmail.com>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
"Language: ru\n"
|
"Language: ru\n"
|
||||||
|
@ -2494,6 +2494,9 @@ msgstr "Разрешить &подсказки"
|
||||||
msgid "Enable shuffle"
|
msgid "Enable shuffle"
|
||||||
msgstr "Разрешить перемешивание &фишек"
|
msgstr "Разрешить перемешивание &фишек"
|
||||||
|
|
||||||
|
msgid "Free hints"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/kivy/menubar.py:561
|
#: pysollib/kivy/menubar.py:561
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Enable highlight piles"
|
msgid "Enable highlight piles"
|
||||||
|
@ -4936,6 +4939,9 @@ msgstr "Разрешить &подсказки"
|
||||||
msgid "Enable shu&ffle"
|
msgid "Enable shu&ffle"
|
||||||
msgstr "Разрешить перемешивание &фишек"
|
msgstr "Разрешить перемешивание &фишек"
|
||||||
|
|
||||||
|
msgid "Free hin&ts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pysollib/ui/tktile/menubar.py:491
|
#: pysollib/ui/tktile/menubar.py:491
|
||||||
msgid "Enable highlight p&iles"
|
msgid "Enable highlight p&iles"
|
||||||
msgstr "Разрешить показывать к&учи"
|
msgstr "Разрешить показывать к&учи"
|
||||||
|
|
|
@ -1987,10 +1987,11 @@ class Game(object):
|
||||||
|
|
||||||
def getWinStatus(self):
|
def getWinStatus(self):
|
||||||
won = self.isGameWon() != 0
|
won = self.isGameWon() != 0
|
||||||
if not won or self.stats.hints > 0 or self.stats.demo_moves > 0:
|
if (not won or (self.stats.hints > 0 and not self.app.opt.free_hint)
|
||||||
|
or self.stats.demo_moves > 0):
|
||||||
# sorry, you lose
|
# sorry, you lose
|
||||||
return won, 0, self.U_LOST
|
return won, 0, self.U_LOST
|
||||||
if _stats__is_perfect(self.stats):
|
if _stats__is_perfect(self.stats) and self.stats.hints < 1:
|
||||||
return won, 2, self.U_PERFECT
|
return won, 2, self.U_PERFECT
|
||||||
return won, 1, self.U_WON
|
return won, 1, self.U_WON
|
||||||
|
|
||||||
|
|
|
@ -557,6 +557,11 @@ class OptionsMenuDialog(LMenuDialog):
|
||||||
self.menubar.tkopt.shuffle,
|
self.menubar.tkopt.shuffle,
|
||||||
self.menubar.mOptEnableShuffle)
|
self.menubar.mOptEnableShuffle)
|
||||||
|
|
||||||
|
self.addCheckNode(tv, rg,
|
||||||
|
_('Free hints'),
|
||||||
|
self.menubar.tkopt.free_hint,
|
||||||
|
self.menubar.mOptFreeHints)
|
||||||
|
|
||||||
self.addCheckNode(tv, rg,
|
self.addCheckNode(tv, rg,
|
||||||
_('Enable highlight piles'),
|
_('Enable highlight piles'),
|
||||||
self.menubar.tkopt.highlight_piles,
|
self.menubar.tkopt.highlight_piles,
|
||||||
|
@ -1250,6 +1255,7 @@ class PysolMenubarTk:
|
||||||
undo=BooleanVar(),
|
undo=BooleanVar(),
|
||||||
bookmarks=BooleanVar(),
|
bookmarks=BooleanVar(),
|
||||||
hint=BooleanVar(),
|
hint=BooleanVar(),
|
||||||
|
free_hint=BooleanVar(),
|
||||||
shuffle=BooleanVar(),
|
shuffle=BooleanVar(),
|
||||||
highlight_piles=BooleanVar(),
|
highlight_piles=BooleanVar(),
|
||||||
highlight_cards=BooleanVar(),
|
highlight_cards=BooleanVar(),
|
||||||
|
@ -1310,6 +1316,7 @@ class PysolMenubarTk:
|
||||||
tkopt.quickplay.set(opt.quickplay)
|
tkopt.quickplay.set(opt.quickplay)
|
||||||
tkopt.undo.set(opt.undo)
|
tkopt.undo.set(opt.undo)
|
||||||
tkopt.hint.set(opt.hint)
|
tkopt.hint.set(opt.hint)
|
||||||
|
tkopt.free_hint.set(opt.free_hint)
|
||||||
tkopt.shuffle.set(opt.shuffle)
|
tkopt.shuffle.set(opt.shuffle)
|
||||||
tkopt.bookmarks.set(opt.bookmarks)
|
tkopt.bookmarks.set(opt.bookmarks)
|
||||||
tkopt.highlight_piles.set(opt.highlight_piles)
|
tkopt.highlight_piles.set(opt.highlight_piles)
|
||||||
|
@ -2029,6 +2036,12 @@ the next time you restart the %(app)s""") % {'app': TITLE})
|
||||||
self.app.opt.hint = self.tkopt.hint.get()
|
self.app.opt.hint = self.tkopt.hint.get()
|
||||||
self.game.updateMenus()
|
self.game.updateMenus()
|
||||||
|
|
||||||
|
def mOptFreeHints(self, *args):
|
||||||
|
if self._cancelDrag(break_pause=False):
|
||||||
|
return
|
||||||
|
self.app.opt.free_hint = self.tkopt.free_hint.get()
|
||||||
|
self.game.updateMenus()
|
||||||
|
|
||||||
def mOptEnableShuffle(self, *args):
|
def mOptEnableShuffle(self, *args):
|
||||||
if self._cancelDrag(break_pause=False):
|
if self._cancelDrag(break_pause=False):
|
||||||
return
|
return
|
||||||
|
|
|
@ -72,6 +72,7 @@ shuffle = boolean
|
||||||
undo = boolean
|
undo = boolean
|
||||||
bookmarks = boolean
|
bookmarks = boolean
|
||||||
hint = boolean
|
hint = boolean
|
||||||
|
free_hint = boolean
|
||||||
highlight_piles = boolean
|
highlight_piles = boolean
|
||||||
highlight_cards = boolean
|
highlight_cards = boolean
|
||||||
highlight_samerank = boolean
|
highlight_samerank = boolean
|
||||||
|
@ -219,6 +220,7 @@ class Options:
|
||||||
('undo', 'bool'),
|
('undo', 'bool'),
|
||||||
('bookmarks', 'bool'),
|
('bookmarks', 'bool'),
|
||||||
('hint', 'bool'),
|
('hint', 'bool'),
|
||||||
|
('free_hint', 'bool'),
|
||||||
('highlight_piles', 'bool'),
|
('highlight_piles', 'bool'),
|
||||||
('highlight_cards', 'bool'),
|
('highlight_cards', 'bool'),
|
||||||
('highlight_samerank', 'bool'),
|
('highlight_samerank', 'bool'),
|
||||||
|
@ -307,6 +309,7 @@ class Options:
|
||||||
self.undo = True
|
self.undo = True
|
||||||
self.bookmarks = True
|
self.bookmarks = True
|
||||||
self.hint = True
|
self.hint = True
|
||||||
|
self.free_hint = False
|
||||||
self.highlight_piles = True
|
self.highlight_piles = True
|
||||||
self.highlight_cards = True
|
self.highlight_cards = True
|
||||||
self.highlight_samerank = True
|
self.highlight_samerank = True
|
||||||
|
|
|
@ -164,6 +164,7 @@ class PysolMenubarTkCommon:
|
||||||
undo=tkinter.BooleanVar(),
|
undo=tkinter.BooleanVar(),
|
||||||
bookmarks=tkinter.BooleanVar(),
|
bookmarks=tkinter.BooleanVar(),
|
||||||
hint=tkinter.BooleanVar(),
|
hint=tkinter.BooleanVar(),
|
||||||
|
free_hint=tkinter.BooleanVar(),
|
||||||
shuffle=tkinter.BooleanVar(),
|
shuffle=tkinter.BooleanVar(),
|
||||||
highlight_piles=tkinter.BooleanVar(),
|
highlight_piles=tkinter.BooleanVar(),
|
||||||
highlight_cards=tkinter.BooleanVar(),
|
highlight_cards=tkinter.BooleanVar(),
|
||||||
|
@ -218,6 +219,7 @@ class PysolMenubarTkCommon:
|
||||||
tkopt.quickplay.set(opt.quickplay)
|
tkopt.quickplay.set(opt.quickplay)
|
||||||
tkopt.undo.set(opt.undo)
|
tkopt.undo.set(opt.undo)
|
||||||
tkopt.hint.set(opt.hint)
|
tkopt.hint.set(opt.hint)
|
||||||
|
tkopt.free_hint.set(opt.free_hint)
|
||||||
tkopt.shuffle.set(opt.shuffle)
|
tkopt.shuffle.set(opt.shuffle)
|
||||||
tkopt.bookmarks.set(opt.bookmarks)
|
tkopt.bookmarks.set(opt.bookmarks)
|
||||||
tkopt.highlight_piles.set(opt.highlight_piles)
|
tkopt.highlight_piles.set(opt.highlight_piles)
|
||||||
|
@ -508,6 +510,9 @@ class PysolMenubarTkCommon:
|
||||||
submenu.add_checkbutton(
|
submenu.add_checkbutton(
|
||||||
label=n_("Enable shu&ffle"), variable=self.tkopt.shuffle,
|
label=n_("Enable shu&ffle"), variable=self.tkopt.shuffle,
|
||||||
command=self.mOptEnableShuffle)
|
command=self.mOptEnableShuffle)
|
||||||
|
submenu.add_checkbutton(
|
||||||
|
label=n_("Free hin&ts"), variable=self.tkopt.free_hint,
|
||||||
|
command=self.mOptFreeHints)
|
||||||
submenu.add_checkbutton(
|
submenu.add_checkbutton(
|
||||||
label=n_("Enable highlight p&iles"),
|
label=n_("Enable highlight p&iles"),
|
||||||
variable=self.tkopt.highlight_piles,
|
variable=self.tkopt.highlight_piles,
|
||||||
|
@ -1411,6 +1416,12 @@ Unsupported game for import.
|
||||||
self.app.opt.hint = self.tkopt.hint.get()
|
self.app.opt.hint = self.tkopt.hint.get()
|
||||||
self.game.updateMenus()
|
self.game.updateMenus()
|
||||||
|
|
||||||
|
def mOptFreeHints(self, *args):
|
||||||
|
if self._cancelDrag(break_pause=False):
|
||||||
|
return
|
||||||
|
self.app.opt.free_hint = self.tkopt.free_hint.get()
|
||||||
|
self.game.updateMenus()
|
||||||
|
|
||||||
def mOptEnableShuffle(self, *args):
|
def mOptEnableShuffle(self, *args):
|
||||||
if self._cancelDrag(break_pause=False):
|
if self._cancelDrag(break_pause=False):
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue