1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

+ 5 new games

- pysollib/acard.py, pysollib/tk/card.py - removed support of old version tk
* misc. improvements


git-svn-id: https://pysolfc.svn.sourceforge.net/svnroot/pysolfc/PySolFC/trunk@44 39dd0a4e-7c14-0410-91b3-c4f2d318f732
This commit is contained in:
skomoroh 2006-08-11 21:09:32 +00:00
parent 5f82560885
commit a74786ed32
17 changed files with 784 additions and 477 deletions

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PySol 0.0.1\n"
"POT-Creation-Date: Wed Aug 9 19:09:14 2006\n"
"POT-Creation-Date: Fri Aug 11 02:15:03 2006\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1602,9 +1602,6 @@ msgstr ""
msgid "Legion"
msgstr ""
msgid "Leo"
msgstr ""
msgid "Les Quatre Coins"
msgstr ""
@ -1944,9 +1941,6 @@ msgstr ""
msgid "Mahjongg Lattice"
msgstr ""
msgid "Mahjongg Leo"
msgstr ""
msgid "Mahjongg Lion"
msgstr ""

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: Wed Aug 9 19:09:09 2006\n"
"POT-Creation-Date: Fri Aug 11 02:14:56 2006\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,44 +15,44 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: pysollib/actions.py:358 pysollib/tk/toolbar.py:197
#: pysollib/actions.py:360 pysollib/tk/toolbar.py:197
msgid "New game"
msgstr ""
#: pysollib/actions.py:371 pysollib/tk/menubar.py:698
#: pysollib/tk/menubar.py:712
#: pysollib/actions.py:373 pysollib/tk/menubar.py:699
#: pysollib/tk/menubar.py:713
msgid "Select game"
msgstr ""
#: pysollib/actions.py:394
#: pysollib/actions.py:396
msgid "Invalid game number"
msgstr ""
#: pysollib/actions.py:395
#: pysollib/actions.py:397
msgid ""
"Invalid game number\n"
msgstr ""
#: pysollib/actions.py:412
#: pysollib/actions.py:414
msgid "Select next game number"
msgstr ""
#: pysollib/actions.py:421 pysollib/actions.py:431
#: pysollib/actions.py:423 pysollib/actions.py:433
msgid "Select new game number"
msgstr ""
#: pysollib/actions.py:422
#: pysollib/actions.py:424
msgid ""
"\n"
"\n"
"Enter new game number"
msgstr ""
#: pysollib/actions.py:423
#: pysollib/actions.py:425
msgid "&Next number"
msgstr ""
#: pysollib/actions.py:423 pysollib/app.py:1142 pysollib/app.py:1154
#: pysollib/actions.py:425 pysollib/app.py:1143 pysollib/app.py:1155
#: pysollib/game.py:904 pysollib/game.py:1828 pysollib/main.py:439
#: pysollib/main.py:447 pysollib/tk/colorsdialog.py:132
#: pysollib/tk/edittextdialog.py:82 pysollib/tk/fontsdialog.py:143
@ -61,7 +61,7 @@ msgstr ""
#: pysollib/tk/playeroptionsdialog.py:160 pysollib/tk/selectcardset.py:240
#: pysollib/tk/selectcardset.py:396 pysollib/tk/selecttile.py:158
#: pysollib/tk/soundoptionsdialog.py:170 pysollib/tk/soundoptionsdialog.py:211
#: pysollib/tk/timeoutsdialog.py:92 pysollib/tk/tkhtml.py:503
#: pysollib/tk/timeoutsdialog.py:92 pysollib/tk/tkhtml.py:499
#: pysollib/tk/tkstats.py:288 pysollib/tk/tkstats.py:573
#: pysollib/tk/tkstats.py:647 pysollib/tk/tkstats.py:663
#: pysollib/tk/tkstats.py:705 pysollib/tk/tkstats.py:777
@ -70,12 +70,12 @@ msgstr ""
msgid "&OK"
msgstr ""
#: pysollib/actions.py:423 pysollib/app.py:1154 pysollib/game.py:904
#: pysollib/actions.py:425 pysollib/app.py:1155 pysollib/game.py:904
#: pysollib/game.py:1290 pysollib/game.py:1305 pysollib/game.py:1312
#: pysollib/game.py:1318 pysollib/tk/colorsdialog.py:132
#: pysollib/tk/edittextdialog.py:82 pysollib/tk/fontsdialog.py:143
#: pysollib/tk/fontsdialog.py:205 pysollib/tk/menubar.py:893
#: pysollib/tk/menubar.py:895 pysollib/tk/playeroptionsdialog.py:85
#: pysollib/tk/fontsdialog.py:205 pysollib/tk/menubar.py:894
#: pysollib/tk/menubar.py:896 pysollib/tk/playeroptionsdialog.py:85
#: pysollib/tk/playeroptionsdialog.py:160 pysollib/tk/selectcardset.py:240
#: pysollib/tk/selectgame.py:266 pysollib/tk/selectgame.py:407
#: pysollib/tk/selecttile.py:158 pysollib/tk/soundoptionsdialog.py:170
@ -83,128 +83,128 @@ msgstr ""
msgid "&Cancel"
msgstr ""
#: pysollib/actions.py:439
#: pysollib/actions.py:441
msgid "Select random game"
msgstr ""
#: pysollib/actions.py:475
#: pysollib/actions.py:477
msgid "Select next game"
msgstr ""
#: pysollib/actions.py:508 pysollib/tk/toolbar.py:211
#: pysollib/actions.py:510 pysollib/tk/toolbar.py:211
msgid "Quit "
msgstr ""
#: pysollib/actions.py:558
#: pysollib/actions.py:560
msgid "Clear bookmarks"
msgstr ""
#: pysollib/actions.py:559
#: pysollib/actions.py:561
msgid "Clear all bookmarks ?"
msgstr ""
#: pysollib/actions.py:569
#: pysollib/actions.py:571
msgid "Restart game"
msgstr ""
#: pysollib/actions.py:570
#: pysollib/actions.py:572
msgid "Restart this game ?"
msgstr ""
#: pysollib/actions.py:611
#: pysollib/actions.py:613
msgid ""
"Comments for %s:\n"
"\n"
msgstr ""
#: pysollib/actions.py:613
#: pysollib/actions.py:615
msgid "Comments for "
msgstr ""
#: pysollib/actions.py:631 pysollib/actions.py:667
#: pysollib/actions.py:633 pysollib/actions.py:669
msgid "Error while writing to file"
msgstr ""
#: pysollib/actions.py:634 pysollib/actions.py:670
#: pysollib/actions.py:636 pysollib/actions.py:672
msgid " Info"
msgstr ""
#: pysollib/actions.py:635
#: pysollib/actions.py:637
msgid ""
"Comments were appended to\n"
"\n"
msgstr ""
#: pysollib/actions.py:652
#: pysollib/actions.py:654
msgid "Demo statistics"
msgstr ""
#: pysollib/actions.py:655
#: pysollib/actions.py:657
msgid "Your statistics"
msgstr ""
#: pysollib/actions.py:671
#: pysollib/actions.py:673
msgid ""
" were appended to\n"
"\n"
msgstr ""
#: pysollib/actions.py:685
#: pysollib/actions.py:687
msgid " Demo"
msgstr ""
#: pysollib/actions.py:685
#: pysollib/actions.py:687
msgid " Demo "
msgstr ""
#: pysollib/actions.py:688 pysollib/actions.py:706
#: pysollib/actions.py:690 pysollib/actions.py:708
msgid " for "
msgstr ""
#: pysollib/actions.py:694 pysollib/actions.py:713
#: pysollib/actions.py:696 pysollib/actions.py:715
msgid "Statistics for "
msgstr ""
#: pysollib/actions.py:697 pysollib/tk/selectgame.py:350
#: pysollib/actions.py:699 pysollib/tk/selectgame.py:350
#: pysollib/tk/toolbar.py:208
msgid "Statistics"
msgstr ""
#: pysollib/actions.py:700
#: pysollib/actions.py:702
msgid "Full log"
msgstr ""
#: pysollib/actions.py:703
#: pysollib/actions.py:705
msgid "Session log"
msgstr ""
#: pysollib/actions.py:709
#: pysollib/actions.py:711
msgid "Game Info"
msgstr ""
#: pysollib/actions.py:718
#: pysollib/actions.py:720
msgid "Full log for "
msgstr ""
#: pysollib/actions.py:723
#: pysollib/actions.py:725
msgid "Session log for "
msgstr ""
#: pysollib/actions.py:728
#: pysollib/actions.py:730
msgid "Reset all statistics"
msgstr ""
#: pysollib/actions.py:729
#: pysollib/actions.py:731
msgid ""
"Reset ALL statistics and logs for player\n"
"%s ?"
msgstr ""
#: pysollib/actions.py:735
#: pysollib/actions.py:737
msgid "Reset game statistics"
msgstr ""
#: pysollib/actions.py:736
#: pysollib/actions.py:738
msgid ""
"Reset statistics and logs for player\n"
"%s\n"
@ -212,27 +212,27 @@ msgid ""
"%s ?"
msgstr ""
#: pysollib/actions.py:792
#: pysollib/actions.py:794
msgid "Play demo"
msgstr ""
#: pysollib/actions.py:803
#: pysollib/actions.py:805
msgid "Set player options"
msgstr ""
#: pysollib/actions.py:898
#: pysollib/actions.py:906
msgid "Sound settings"
msgstr ""
#: pysollib/actions.py:919
#: pysollib/actions.py:927
msgid "Set colors"
msgstr ""
#: pysollib/actions.py:938
#: pysollib/actions.py:946
msgid "Set fonts"
msgstr ""
#: pysollib/actions.py:947
#: pysollib/actions.py:955
msgid "Set timeouts"
msgstr ""
@ -240,23 +240,23 @@ msgstr ""
msgid "Unknown"
msgstr ""
#: pysollib/app.py:1004
#: pysollib/app.py:1005
msgid "Loading %s %s..."
msgstr ""
#: pysollib/app.py:1039
#: pysollib/app.py:1040
msgid " load error"
msgstr ""
#: pysollib/app.py:1040
#: pysollib/app.py:1041
msgid "Error while loading "
msgstr ""
#: pysollib/app.py:1134
#: pysollib/app.py:1135
msgid "Incompatible "
msgstr ""
#: pysollib/app.py:1136
#: pysollib/app.py:1137
msgid ""
"The currently selected %s %s\n"
"is not compatible with the game\n"
@ -265,7 +265,7 @@ msgid ""
"Please select a %s type %s.\n"
msgstr ""
#: pysollib/app.py:1152
#: pysollib/app.py:1153
msgid "Please select a %s type %s"
msgstr ""
@ -678,14 +678,14 @@ msgstr ""
#: pysollib/games/braid.py:248 pysollib/games/camelot.py:555
#: pysollib/games/napoleon.py:182 pysollib/games/ultra/dashavatara.py:959
#: pysollib/games/ultra/hanafuda1.py:256 pysollib/games/ultra/hexadeck.py:1190
#: pysollib/games/ultra/hanafuda1.py:257 pysollib/games/ultra/hexadeck.py:1190
#: pysollib/games/ultra/mughal.py:802
msgid " Ascending"
msgstr ""
#: pysollib/games/braid.py:250 pysollib/games/camelot.py:554
#: pysollib/games/napoleon.py:184 pysollib/games/ultra/dashavatara.py:961
#: pysollib/games/ultra/hanafuda1.py:258 pysollib/games/ultra/hexadeck.py:1192
#: pysollib/games/ultra/hanafuda1.py:259 pysollib/games/ultra/hexadeck.py:1192
#: pysollib/games/ultra/mughal.py:804
msgid " Descending"
msgstr ""
@ -699,12 +699,12 @@ msgid ""
msgstr ""
#: pysollib/games/canfield.py:528 pysollib/games/special/tarock.py:224
#: pysollib/stack.py:1287 pysollib/util.py:81
#: pysollib/stack.py:1304 pysollib/util.py:81
msgid "King"
msgstr ""
#: pysollib/games/canfield.py:531 pysollib/games/special/tarock.py:224
#: pysollib/stack.py:1286 pysollib/util.py:81
#: pysollib/stack.py:1303 pysollib/util.py:81
msgid "Queen"
msgstr ""
@ -721,11 +721,11 @@ msgid "X"
msgstr ""
#: pysollib/games/golf.py:114 pysollib/games/golf.py:300
#: pysollib/stack.py:1898
#: pysollib/stack.py:1915
msgid "Tableau. No building."
msgstr ""
#: pysollib/games/golf.py:384 pysollib/stack.py:1831
#: pysollib/games/golf.py:385 pysollib/stack.py:1848
msgid "Foundation. Build up regardless of suit."
msgstr ""
@ -737,7 +737,7 @@ msgstr ""
msgid "Reserve. Only Kings are acceptable."
msgstr ""
#: pysollib/games/larasgame.py:163 pysollib/stack.py:1508
#: pysollib/games/larasgame.py:163 pysollib/stack.py:1525
msgid "Round %d"
msgstr ""
@ -786,7 +786,7 @@ msgstr ""
msgid "Deal %d"
msgstr ""
#: pysollib/games/numerica.py:259 pysollib/games/royalcotillion.py:841
#: pysollib/games/numerica.py:259 pysollib/games/royalcotillion.py:840
msgid "Foundation. Build up by color."
msgstr ""
@ -840,7 +840,7 @@ msgstr ""
#: pysollib/games/special/tarock.py:223
#: pysollib/games/ultra/dashavatara.py:351
#: pysollib/games/ultra/hexadeck.py:273 pysollib/games/ultra/mughal.py:254
#: pysollib/stack.py:1288 pysollib/util.py:80
#: pysollib/stack.py:1305 pysollib/util.py:80
msgid "Ace"
msgstr ""
@ -1566,201 +1566,201 @@ msgstr ""
msgid "Top 10"
msgstr ""
#: pysollib/stack.py:1282
#: pysollib/stack.py:1299
msgid "Base card - %s."
msgstr ""
#: pysollib/stack.py:1283
#: pysollib/stack.py:1300
msgid "Empty row cannot be filled."
msgstr ""
#: pysollib/stack.py:1284
#: pysollib/stack.py:1301
msgid "any card"
msgstr ""
#: pysollib/stack.py:1285 pysollib/util.py:81
#: pysollib/stack.py:1302 pysollib/util.py:81
msgid "Jack"
msgstr ""
#: pysollib/stack.py:1298
#: pysollib/stack.py:1315
msgid "No cards"
msgstr ""
#: pysollib/stack.py:1299
#: pysollib/stack.py:1316
msgid "1 card"
msgstr ""
#: pysollib/stack.py:1300
#: pysollib/stack.py:1317
msgid " cards"
msgstr ""
#: pysollib/stack.py:1517 pysollib/stack.py:1519 pysollib/stack.py:1550
#: pysollib/stack.py:1534 pysollib/stack.py:1536 pysollib/stack.py:1567
msgid "Redeal"
msgstr ""
#: pysollib/stack.py:1519
#: pysollib/stack.py:1536
msgid "Stop"
msgstr ""
#: pysollib/stack.py:1570
#: pysollib/stack.py:1587
msgid "Variable redeals."
msgstr ""
#: pysollib/stack.py:1571
#: pysollib/stack.py:1588
msgid "Unlimited redeals."
msgstr ""
#: pysollib/stack.py:1572
#: pysollib/stack.py:1589
msgid "No redeals."
msgstr ""
#: pysollib/stack.py:1573
#: pysollib/stack.py:1590
msgid "One redeal."
msgstr ""
#: pysollib/stack.py:1574
#: pysollib/stack.py:1591
msgid " redeals."
msgstr ""
#: pysollib/stack.py:1576
#: pysollib/stack.py:1593
msgid "Talon."
msgstr ""
#: pysollib/stack.py:1762 pysollib/stack.py:2212
#: pysollib/stack.py:1779 pysollib/stack.py:2229
msgid "Reserve. No building."
msgstr ""
#: pysollib/stack.py:1799
#: pysollib/stack.py:1816
msgid "Foundation."
msgstr ""
#: pysollib/stack.py:1815
#: pysollib/stack.py:1832
msgid "Foundation. Build up by suit."
msgstr ""
#: pysollib/stack.py:1816
#: pysollib/stack.py:1833
msgid "Foundation. Build down by suit."
msgstr ""
#: pysollib/stack.py:1817 pysollib/stack.py:1833 pysollib/stack.py:1855
#: pysollib/stack.py:1834 pysollib/stack.py:1850 pysollib/stack.py:1872
msgid "Foundation. Build by same rank."
msgstr ""
#: pysollib/stack.py:1832
#: pysollib/stack.py:1849
msgid "Foundation. Build down regardless of suit."
msgstr ""
#: pysollib/stack.py:1853
#: pysollib/stack.py:1870
msgid "Foundation. Build up by alternate color."
msgstr ""
#: pysollib/stack.py:1854
#: pysollib/stack.py:1871
msgid "Foundation. Build down by alternate color."
msgstr ""
#: pysollib/stack.py:1928
#: pysollib/stack.py:1945
msgid "Tableau. Build up by alternate color."
msgstr ""
#: pysollib/stack.py:1929
#: pysollib/stack.py:1946
msgid "Tableau. Build down by alternate color."
msgstr ""
#: pysollib/stack.py:1930 pysollib/stack.py:1940 pysollib/stack.py:1949
#: pysollib/stack.py:1958 pysollib/stack.py:1968 pysollib/stack.py:1991
#: pysollib/stack.py:2001
#: pysollib/stack.py:1947 pysollib/stack.py:1957 pysollib/stack.py:1966
#: pysollib/stack.py:1975 pysollib/stack.py:1985 pysollib/stack.py:2008
#: pysollib/stack.py:2018
msgid "Tableau. Build by same rank."
msgstr ""
#: pysollib/stack.py:1938
#: pysollib/stack.py:1955
msgid "Tableau. Build up by color."
msgstr ""
#: pysollib/stack.py:1939
#: pysollib/stack.py:1956
msgid "Tableau. Build down by color."
msgstr ""
#: pysollib/stack.py:1947
#: pysollib/stack.py:1964
msgid "Tableau. Build up by suit."
msgstr ""
#: pysollib/stack.py:1948
#: pysollib/stack.py:1965
msgid "Tableau. Build down by suit."
msgstr ""
#: pysollib/stack.py:1956
#: pysollib/stack.py:1973
msgid "Tableau. Build up regardless of suit."
msgstr ""
#: pysollib/stack.py:1957
#: pysollib/stack.py:1974
msgid "Tableau. Build down regardless of suit."
msgstr ""
#: pysollib/stack.py:1966
#: pysollib/stack.py:1983
msgid "Tableau. Build up in any suit but the same."
msgstr ""
#: pysollib/stack.py:1967
#: pysollib/stack.py:1984
msgid "Tableau. Build down in any suit but the same."
msgstr ""
#: pysollib/stack.py:1989
#: pysollib/stack.py:2006
msgid "Tableau. Build up regardless of suit. Sequences of cards in alternate color can be moved as a unit."
msgstr ""
#: pysollib/stack.py:1990
#: pysollib/stack.py:2007
msgid "Tableau. Build down regardless of suit. Sequences of cards in alternate color can be moved as a unit."
msgstr ""
#: pysollib/stack.py:1999
#: pysollib/stack.py:2016
msgid "Tableau. Build up regardless of suit. Sequences of cards in the same suit can be moved as a unit."
msgstr ""
#: pysollib/stack.py:2000
#: pysollib/stack.py:2017
msgid "Tableau. Build down regardless of suit. Sequences of cards in the same suit can be moved as a unit."
msgstr ""
#: pysollib/stack.py:2022
#: pysollib/stack.py:2039
msgid "Tableau. Build up by alternate color, can move any face-up cards regardless of sequence."
msgstr ""
#: pysollib/stack.py:2023
#: pysollib/stack.py:2040
msgid "Tableau. Build down by alternate color, can move any face-up cards regardless of sequence."
msgstr ""
#: pysollib/stack.py:2024 pysollib/stack.py:2037
#: pysollib/stack.py:2041 pysollib/stack.py:2054
msgid "Tableau. Build by same rank, can move any face-up cards regardless of sequence."
msgstr ""
#: pysollib/stack.py:2035
#: pysollib/stack.py:2052
msgid "Tableau. Build up by suit, can move any face-up cards regardless of sequence."
msgstr ""
#: pysollib/stack.py:2036
#: pysollib/stack.py:2053
msgid "Tableau. Build down by suit, can move any face-up cards regardless of sequence."
msgstr ""
#: pysollib/stack.py:2069
#: pysollib/stack.py:2086
msgid "Tableau. Build up or down by color."
msgstr ""
#: pysollib/stack.py:2080
#: pysollib/stack.py:2097
msgid "Tableau. Build up or down by alternate color."
msgstr ""
#: pysollib/stack.py:2091
#: pysollib/stack.py:2108
msgid "Tableau. Build up or down by suit."
msgstr ""
#: pysollib/stack.py:2102
#: pysollib/stack.py:2119
msgid "Tableau. Build up or down regardless of suit."
msgstr ""
#: pysollib/stack.py:2113
#: pysollib/stack.py:2130
msgid "Waste."
msgstr ""
#: pysollib/stack.py:2213
#: pysollib/stack.py:2230
msgid "Free cell."
msgstr ""
@ -2082,7 +2082,7 @@ msgstr ""
msgid "&Deal cards"
msgstr ""
#: pysollib/tk/menubar.py:307 pysollib/tk/menubar.py:342
#: pysollib/tk/menubar.py:307
msgid "&Auto drop"
msgstr ""
@ -2162,6 +2162,10 @@ msgstr ""
msgid "Auto &face up"
msgstr ""
#: pysollib/tk/menubar.py:342
msgid "A&uto drop"
msgstr ""
#: pysollib/tk/menubar.py:343
msgid "Auto &deal"
msgstr ""
@ -2243,159 +2247,163 @@ msgid "&Negative cards bottom"
msgstr ""
#: pysollib/tk/menubar.py:374
msgid "Shade &filled stacks"
msgid "Shrink face-down cards"
msgstr ""
#: pysollib/tk/menubar.py:375
msgid "A&nimations"
msgid "Shade &filled stacks"
msgstr ""
#: pysollib/tk/menubar.py:376
msgid "&None"
msgid "A&nimations"
msgstr ""
#: pysollib/tk/menubar.py:377
msgid "&Timer based"
msgid "&None"
msgstr ""
#: pysollib/tk/menubar.py:378
msgid "&Fast"
msgid "&Timer based"
msgstr ""
#: pysollib/tk/menubar.py:379
msgid "&Slow"
msgid "&Fast"
msgstr ""
#: pysollib/tk/menubar.py:380
msgid "&Very slow"
msgid "&Slow"
msgstr ""
#: pysollib/tk/menubar.py:381
msgid "Stick&y mouse"
msgid "&Very slow"
msgstr ""
#: pysollib/tk/menubar.py:382
msgid "Stick&y mouse"
msgstr ""
#: pysollib/tk/menubar.py:383
msgid "Use mouse for undo/redo"
msgstr ""
#: pysollib/tk/menubar.py:384
#: pysollib/tk/menubar.py:385
msgid "&Fonts..."
msgstr ""
#: pysollib/tk/menubar.py:385
#: pysollib/tk/menubar.py:386
msgid "&Colors..."
msgstr ""
#: pysollib/tk/menubar.py:386
#: pysollib/tk/menubar.py:387
msgid "Time&outs..."
msgstr ""
#: pysollib/tk/menubar.py:388
#: pysollib/tk/menubar.py:389
msgid "&Toolbar"
msgstr ""
#: pysollib/tk/menubar.py:390
#: pysollib/tk/menubar.py:391
msgid "Stat&usbar"
msgstr ""
#: pysollib/tk/menubar.py:391
#: pysollib/tk/menubar.py:392
msgid "Show &statusbar"
msgstr ""
#: pysollib/tk/menubar.py:392
#: pysollib/tk/menubar.py:393
msgid "Show &number of cards"
msgstr ""
#: pysollib/tk/menubar.py:393
#: pysollib/tk/menubar.py:394
msgid "Show &help bar"
msgstr ""
#: pysollib/tk/menubar.py:394
#: pysollib/tk/menubar.py:395
msgid "Save games &geometry"
msgstr ""
#: pysollib/tk/menubar.py:395
#: pysollib/tk/menubar.py:396
msgid "&Demo logo"
msgstr ""
#: pysollib/tk/menubar.py:396
#: pysollib/tk/menubar.py:397
msgid "Startup splash sc&reen"
msgstr ""
#: pysollib/tk/menubar.py:402
#: pysollib/tk/menubar.py:403
msgid "&Help"
msgstr ""
#: pysollib/tk/menubar.py:403
#: pysollib/tk/menubar.py:404
msgid "&Contents"
msgstr ""
#: pysollib/tk/menubar.py:404
#: pysollib/tk/menubar.py:405
msgid "&How to play"
msgstr ""
#: pysollib/tk/menubar.py:405
#: pysollib/tk/menubar.py:406
msgid "&Rules for this game"
msgstr ""
#: pysollib/tk/menubar.py:406
#: pysollib/tk/menubar.py:407
msgid "&License terms"
msgstr ""
#: pysollib/tk/menubar.py:409
#: pysollib/tk/menubar.py:410
msgid "&About "
msgstr ""
#: pysollib/tk/menubar.py:521
#: pysollib/tk/menubar.py:522
msgid "All &games..."
msgstr ""
#: pysollib/tk/menubar.py:523
#: pysollib/tk/menubar.py:524
msgid "Playable pre&view..."
msgstr ""
#: pysollib/tk/menubar.py:572
#: pysollib/tk/menubar.py:573
msgid "&Mahjongg games"
msgstr ""
#: pysollib/tk/menubar.py:610
#: pysollib/tk/menubar.py:611
msgid "&Popular games"
msgstr ""
#: pysollib/tk/menubar.py:618
#: pysollib/tk/menubar.py:619
msgid "&French games"
msgstr ""
#: pysollib/tk/menubar.py:625
#: pysollib/tk/menubar.py:626
msgid "&Oriental games"
msgstr ""
#: pysollib/tk/menubar.py:633
#: pysollib/tk/menubar.py:634
msgid "&Special games"
msgstr ""
#: pysollib/tk/menubar.py:639
#: pysollib/tk/menubar.py:640
msgid "All games by name"
msgstr ""
#: pysollib/tk/menubar.py:893 pysollib/tk/menubar.py:895
#: pysollib/tk/menubar.py:894 pysollib/tk/menubar.py:896
#: pysollib/tk/selectcardset.py:240
msgid "&Load"
msgstr ""
#: pysollib/tk/menubar.py:895
#: pysollib/tk/menubar.py:896
msgid "&Info..."
msgstr ""
#: pysollib/tk/menubar.py:898
#: pysollib/tk/menubar.py:899
msgid "Select "
msgstr ""
#: pysollib/tk/menubar.py:959
#: pysollib/tk/menubar.py:960
msgid "Select table background"
msgstr ""
#: pysollib/tk/menubar.py:971 pysollib/tk/selecttile.py:177
#: pysollib/tk/menubar.py:972 pysollib/tk/selecttile.py:177
msgid "Select table color"
msgstr ""
@ -2550,23 +2558,23 @@ msgstr ""
msgid "by Skill Level"
msgstr ""
#: pysollib/tk/selectgame.py:170 pysollib/tk/selectgame.py:542
#: pysollib/tk/selectgame.py:170 pysollib/tk/selectgame.py:534
msgid "Luck only"
msgstr ""
#: pysollib/tk/selectgame.py:171 pysollib/tk/selectgame.py:543
#: pysollib/tk/selectgame.py:171 pysollib/tk/selectgame.py:535
msgid "Mostly luck"
msgstr ""
#: pysollib/tk/selectgame.py:172 pysollib/tk/selectgame.py:544
#: pysollib/tk/selectgame.py:172 pysollib/tk/selectgame.py:536
msgid "Balanced"
msgstr ""
#: pysollib/tk/selectgame.py:173 pysollib/tk/selectgame.py:545
#: pysollib/tk/selectgame.py:173 pysollib/tk/selectgame.py:537
msgid "Mostly skill"
msgstr ""
#: pysollib/tk/selectgame.py:174 pysollib/tk/selectgame.py:546
#: pysollib/tk/selectgame.py:174 pysollib/tk/selectgame.py:538
msgid "Skill only"
msgstr ""
@ -2744,11 +2752,11 @@ msgstr ""
msgid "Playable Preview - "
msgstr ""
#: pysollib/tk/selectgame.py:549
#: pysollib/tk/selectgame.py:541
msgid "variable"
msgstr ""
#: pysollib/tk/selectgame.py:550
#: pysollib/tk/selectgame.py:542
msgid "unlimited"
msgstr ""
@ -2930,23 +2938,23 @@ msgstr ""
msgid "Text only"
msgstr ""
#: pysollib/tk/tkhtml.py:255
#: pysollib/tk/tkhtml.py:251
msgid "Index"
msgstr ""
#: pysollib/tk/tkhtml.py:259
#: pysollib/tk/tkhtml.py:255
msgid "Back"
msgstr ""
#: pysollib/tk/tkhtml.py:263
#: pysollib/tk/tkhtml.py:259
msgid "Forward"
msgstr ""
#: pysollib/tk/tkhtml.py:267
#: pysollib/tk/tkhtml.py:263
msgid "Close"
msgstr ""
#: pysollib/tk/tkhtml.py:389
#: pysollib/tk/tkhtml.py:385
msgid ""
"HTML limitation:\n"
"The %s protocol is not supported yet.\n"
@ -2956,7 +2964,7 @@ msgid ""
"%s\n"
msgstr ""
#: pysollib/tk/tkhtml.py:414 pysollib/tk/tkhtml.py:418
#: pysollib/tk/tkhtml.py:410 pysollib/tk/tkhtml.py:414
msgid ""
"Unable to service request:\n"
msgstr ""
@ -3204,7 +3212,7 @@ msgstr ""
msgid "Player options"
msgstr ""
#: pysollib/tk/toolbar.py:464
#: pysollib/tk/toolbar.py:466
msgid "Toolbar"
msgstr ""

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PySol 0.0.1\n"
"POT-Creation-Date: Wed Aug 9 19:09:14 2006\n"
"POT-Creation-Date: Fri Aug 11 02:15:03 2006\n"
"PO-Revision-Date: 2006-08-09 23:52+0400\n"
"Last-Translator: Скоморох <skomoroh@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
@ -1644,9 +1644,6 @@ msgstr "Le Grande Teton"
msgid "Legion"
msgstr "Легион"
msgid "Leo"
msgstr "Лев"
msgid "Les Quatre Coins"
msgstr "Les Quatre Coins"
@ -1990,9 +1987,6 @@ msgstr "Маджонг Лабиринт"
msgid "Mahjongg Lattice"
msgstr "Маджонг Решётка"
msgid "Mahjongg Leo"
msgstr "Маджонг Лев"
msgid "Mahjongg Lion"
msgstr "Маджонг Лион"
@ -3711,6 +3705,12 @@ msgstr "Зевс"
msgid "Zodiac"
msgstr "Зодиак"
#~ msgid "Leo"
#~ msgstr "Лев"
#~ msgid "Mahjongg Leo"
#~ msgstr "Маджонг Лев"
#, fuzzy
#~ msgid "Big Ground"
#~ msgstr "Большая гора"

File diff suppressed because it is too large Load diff

View file

@ -84,11 +84,8 @@ class AbstractCard:
self.y = y
self.item = None
self.face_up = 0
# To improve display speed, we move cards out of the visible canvas.
# Because the whole area that will be passed by a move will get
# updated by Tk, we must choose an optimal way off the screen.
# To improve display speed, we hide cards (except 2 top cards).
self.hide_stack = None
self.hide_x = self.hide_y = 0
def __str__(self):
# Return a string for debug print statements.
@ -99,12 +96,11 @@ class AbstractCard:
def moveTo(self, x, y):
# Move the card to absolute position (x, y).
# The card remains hidden.
dx, dy = 0, 0
if self.game.app.opt.randomize_place:
d = 1
dx, dy = randint(-d, d), randint(-d, d)
self.moveBy(x - self.x + self.hide_x + dx, y - self.y + self.hide_y + dy)
self.moveBy(x - self.x + dx, y - self.y + dy)
def moveBy(self, dx, dy):
# Move the card by (dx, dy).

View file

@ -1537,7 +1537,7 @@ for %d moves.
self.canvas.update_idletasks()
return EVENT_HANDLED
else:
# remove items later
# remove items later (find_card_dialog)
return items
def highlightNotMatching(self):

View file

@ -44,6 +44,7 @@ from pysollib.layout import Layout
from pysollib.hint import CautiousDefaultHint, FreeCellType_Hint
from pysollib.pysoltk import MfxCanvasText
# /***********************************************************************
# //
# ************************************************************************/
@ -231,6 +232,7 @@ class Fortress(Game):
# /***********************************************************************
# // Bastion
# // Ten by One
# // Castles End
# ************************************************************************/
class Bastion(Game):
@ -291,6 +293,84 @@ class TenByOne(Bastion):
self.s.talon.dealRowAvail()
class CastlesEnd_Foundation(SS_FoundationStack):
def acceptsCards(self, from_stack, cards):
if self.game.getState() == 0:
if cards[0].suit != self.cap.base_suit:
return False
return True
return SS_FoundationStack.acceptsCards(self, from_stack, cards)
class CastlesEnd_StackMethods:
def moveMove(self, ncards, to_stack, frames=-1, shadow=-1):
state = self.game.getState()
self.game.moveMove(ncards, self, to_stack,
frames=frames, shadow=shadow)
if state == 0:
base_rank = to_stack.cards[0].rank
self.game.base_rank = base_rank
for s in self.game.s.foundations:
s.cap.base_rank = base_rank
self.fillStack()
class CastlesEnd_RowStack(CastlesEnd_StackMethods, UD_AC_RowStack):
def acceptsCards(self, from_stack, cards):
if self.game.getState() == 0:
return False
return UD_AC_RowStack.acceptsCards(self, from_stack, cards)
class CastlesEnd_Reserve(CastlesEnd_StackMethods, OpenStack):
pass
class CastlesEnd(Bastion):
Foundation_Class = StackWrapper(CastlesEnd_Foundation, min_cards=1, mod=13)
RowStack_Class = StackWrapper(CastlesEnd_RowStack, mod=13)
ReserveStack_Class = CastlesEnd_Reserve
def createGame(self):
l = Bastion.createGame(self)
self.base_rank = None
tx, ty, ta, tf = l.getTextAttr(self.s.foundations[-1], 'se')
font = self.app.getFont('canvas_default')
self.texts.info = MfxCanvasText(self.canvas, tx, ty,
anchor=ta, font=font)
def updateText(self):
if self.preview > 1:
return
if not self.texts.info:
return
if self.base_rank is None:
t = ""
else:
t = RANKS[self.base_rank]
self.texts.info.config(text=t)
def getState(self):
for s in self.s.foundations:
if s.cards:
return 1
return 0
def _restoreGameHook(self, game):
for s in self.s.foundations:
s.cap.base_rank = game.loadinfo.base_rank
def _loadGameHook(self, p):
self.loadinfo.addattr(base_rank=p.load())
def _saveGameHook(self, p):
base_rank = NO_RANK
for s in self.s.foundations:
if s.cards:
base_rank = s.cards[0].rank
break
p.dump(base_rank)
shallHighlightMatch = Game._shallHighlightMatch_ACW
# /***********************************************************************
# // Chessboard
# ************************************************************************/
@ -805,3 +885,5 @@ registerGame(GameInfo(535, ExiledKings, "Exiled Kings",
GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(626, Soother, "Soother",
GI.GT_4DECK_TYPE | GI.GT_ORIGINAL, 4, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(650, CastlesEnd, "Castles End",
GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))

View file

@ -352,6 +352,106 @@ class One234(Calculation):
self.s.talon.dealRow(rows=self.s.foundations)
# /***********************************************************************
# // Senior Wrangler
# ************************************************************************/
class SeniorWrangler_Talon(DealRowTalonStack):
def canDealCards(self):
if self.round == self.max_rounds:
return False
return not self.game.isGameWon()
def dealCards(self, sound=0):
num_cards = 0
r = self.game.s.rows[self.round-1]
if not r.cards:
self.game.nextRoundMove(self)
return
if sound:
self.game.startDealSample()
old_state = self.game.enterState(self.game.S_DEAL)
while r.cards:
self.game.flipMove(r)
self.game.moveMove(1, r, self, frames=4, shadow=0)
self.dealRowAvail(rows=self.game.s.rows[self.round-1:], sound=0)
while self.cards:
num_cards += self.dealRowAvail(sound=0)
self.game.nextRoundMove(self)
self.game.leaveState(old_state)
if sound:
self.game.stopSamples()
return num_cards
class SeniorWrangler_RowStack(BasicRowStack):
#clickHandler = BasicRowStack.doubleclickHandler
pass
class SeniorWrangler(Game):
def createGame(self):
# create layout
l, s = Layout(self), self.s
# set window
self.setSize(l.XM+9.5*l.XS, l.YM+3*l.YS+l.TEXT_HEIGHT)
# create stacks
x, y = l.XM+1.5*l.XS, l.YM
for i in range(8):
stack = BetsyRoss_Foundation(x, y, self, base_rank=i,
max_cards=1, max_move=0, max_accept=0)
s.foundations.append(stack)
x = x + l.XS
x, y = l.XM+1.5*l.XS, l.YM+l.YS
for i in range(8):
stack = BetsyRoss_Foundation(x, y, self, base_rank=(2*i+3)%13,
mod=13, dir=i+1,
max_cards=12, max_move=0)
tx, ty, ta, tf = l.getTextAttr(stack, "s")
font = self.app.getFont("canvas_default")
stack.texts.misc = MfxCanvasText(self.canvas, tx, ty,
anchor=ta, font=font)
s.foundations.append(stack)
x = x + l.XS
x, y = l.XM+1.5*l.XS, l.YM+2*l.YS+l.TEXT_HEIGHT
for i in range(8):
stack = SeniorWrangler_RowStack(x, y, self, max_accept=0)
s.rows.append(stack)
stack.CARD_YOFFSET = 0
x += l.XS
x, y = l.XM, l.YM+l.YS
s.talon = SeniorWrangler_Talon(x, y, self, max_rounds=9)
tx, ty, ta, tf = l.getTextAttr(s.talon, "nn")
font = self.app.getFont("canvas_default")
s.talon.texts.rounds = MfxCanvasText(self.canvas, tx, ty,
anchor=ta, font=font)
# define stack-groups
l.defaultStackGroups()
def _shuffleHook(self, cards):
top = []
ranks = []
for c in cards[:]:
if c.rank in range(1,9) and c.rank not in ranks:
ranks.append(c.rank)
cards.remove(c)
top.append(c)
top.sort(lambda a, b: cmp(b.rank, a.rank))
return cards+top
def startGame(self):
self.s.talon.dealRow(rows=self.s.foundations[:8], frames=0)
for i in range(11):
self.s.talon.dealRow(frames=0)
self.startDealSample()
self.s.talon.dealRow()
# register the game
registerGame(GameInfo(256, Calculation, "Calculation",
@ -365,4 +465,6 @@ registerGame(GameInfo(134, BetsyRoss, "Betsy Ross",
"Quadruple Alliance", "Plus Belle") ))
registerGame(GameInfo(550, One234, "One234",
GI.GT_1DECK_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(653, SeniorWrangler, "Senior Wrangler",
GI.GT_2DECK_TYPE, 2, 8, GI.SL_BALANCED))

View file

@ -377,6 +377,7 @@ class AgnesSorel(Klondike):
# /***********************************************************************
# // 8 x 8
# // Achtmal Acht
# // Eight by Eight
# ************************************************************************/
class EightTimesEight(Klondike):
@ -404,6 +405,25 @@ class AchtmalAcht(EightTimesEight):
font=self.app.getFont("canvas_default"))
class EightByEight_RowStack(RK_RowStack):
def acceptsCards(self, from_stack, cards):
if not RK_RowStack.acceptsCards(self, from_stack, cards):
return False
if not self.cards:
return len(cards) == 1
return True
class EightByEight(EightTimesEight):
Layout_Method = Layout.klondikeLayout ##gypsyLayout
Talon_Class = CanfieldRush_Talon
RowStack_Class = EightByEight_RowStack
def createGame(self):
Klondike.createGame(self, rows=8, max_rounds=3)
shallHighlightMatch = Game._shallHighlightMatch_RK
# /***********************************************************************
# // Batsford
# // Batsford Again
@ -627,7 +647,6 @@ class Jane(Klondike):
x = x0 + ((i+1) & 1) * l.XS
stack = OpenStack(x, y, self, max_accept=0)
stack.CARD_YOFFSET = l.YM / 3
stack.is_open = 1
s.reserves.append(stack)
y = y + l.YS / 2
# not needed, as no cards may be placed on the reserves
@ -678,7 +697,7 @@ class Senate(Jane):
playcards = 10
l, s = Layout(self), self.s
self.setSize(3*l.XM+(rows+6)*l.XS, l.YM+2*(l.YS+playcards*l.YOFFSET))
self.setSize(l.XM+(rows+7)*l.XS, l.YM+2*(l.YS+playcards*l.YOFFSET))
x, y = l.XM, l.YM
for i in range(rows):
@ -686,22 +705,22 @@ class Senate(Jane):
x += l.XS
for y in l.YM, l.YM+l.YS+playcards*l.YOFFSET:
x = 2*l.XM+rows*l.XS
x = l.XM+rows*l.XS+l.XS/2
for i in range(4):
stack = OpenStack(x, y, self, max_accept=0)
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, l.YOFFSET
s.reserves.append(stack)
x += l.XS
x = 3*l.XM+(rows+4)*l.XS
x = l.XM+(rows+5)*l.XS
for i in range(2):
y = l.YM+l.YS
for j in range(4):
s.foundations.append(SS_FoundationStack(x, y, self, suit=j))
y += l.YS
x += l.XS
x, y = 3*l.XM+(rows+5)*l.XS, l.YM
x, y = self.width-l.XS, l.YM
s.talon = AgnesBernauer_Talon(x, y, self)
l.createText(s.talon, 'sw')
l.createText(s.talon, 'nw')
l.defaultStackGroups()
@ -1430,5 +1449,7 @@ registerGame(GameInfo(633, Athena, "Athena",
GI.GT_KLONDIKE, 1, -1, GI.SL_BALANCED))
registerGame(GameInfo(634, Chinaman, "Chinaman",
GI.GT_KLONDIKE, 1, 1, GI.SL_BALANCED))
registerGame(GameInfo(651, EightByEight, "Eight by Eight",
GI.GT_KLONDIKE, 2, 2, GI.SL_BALANCED))

View file

@ -765,6 +765,53 @@ class DerLetzteMonarch(Game):
return diff in (-13, -1, 1, 13)
# /***********************************************************************
# // Doublets
# ************************************************************************/
class DoubletsII(Game):
FILL_STACKS_AFTER_DROP = False # for Nestor_RowStack
def createGame(self):
l, s = Layout(self), self.s
self.setSize(l.XM+12*l.XS, l.YM+3*l.YS+3*l.YOFFSET)
x, y = l.XM, l.YM
for i in range(12):
s.rows.append(Nestor_RowStack(x, y, self,
max_move=1, max_accept=1,
dir=0, base_rank=NO_RANK))
x += l.XS
x, y = l.XM, self.height-l.YS
s.talon = TalonStack(x, y, self)
l.createText(s.talon, 'n')
x, y = self.width-l.XS, self.height-l.YS
s.foundations.append(AbstractFoundationStack(x, y, self, suit=ANY_SUIT,
max_move=0, max_cards=52,
base_rank=ANY_RANK, max_accept=0))
l.createText(s.foundations[0], "n")
l.defaultStackGroups()
def startGame(self):
for i in range(3):
self.s.talon.dealRow(frames=0, flip=0)
self.startDealSample()
self.s.talon.dealRow()
def fillStack(self, stack):
if stack in self.s.rows:
if stack.cards:
stack.flipMove()
else:
if self.s.talon.cards:
old_state = self.enterState(self.S_FILL)
self.s.talon.flipMove()
self.s.talon.moveMove(1, stack)
self.leaveState(old_state)
# register the game
registerGame(GameInfo(89, MonteCarlo, "Monte Carlo",
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_LUCK,
@ -795,4 +842,6 @@ registerGame(GameInfo(329, TheWishOpen, "The Wish (open)",
ranks=(0, 6, 7, 8, 9, 10, 11, 12) ))
registerGame(GameInfo(368, Vertical, "Vertical",
GI.GT_PAIRING_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_LUCK))
registerGame(GameInfo(649, DoubletsII, "Doublets II",
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_LUCK))

View file

@ -124,39 +124,40 @@ class Boudoir(Game):
def createGame(self):
l, s = Layout(self), self.s
self.setSize(l.XM+5*l.XS, l.YM+4*l.YS)
self.setSize(l.XM+5.5*l.XS, l.YM+4*l.YS)
x, y = l.XM, l.YM+l.YS-l.TEXT_HEIGHT/2
x, y = l.XM, l.YM+l.YS
s.talon = WasteTalonStack(x, y, self, max_rounds=3)
tx, ty, ta, tf = l.getTextAttr(s.talon, "nn")
font=self.app.getFont("canvas_default")
s.talon.texts.rounds = MfxCanvasText(self.canvas, tx, ty,
anchor=ta, font=font)
l.createText(s.talon, "s")
y += l.YS+l.TEXT_HEIGHT
l.createText(s.talon, 'ne')
y += l.YS
s.waste = WasteStack(x, y, self)
l.createText(s.waste, "s")
l.createText(s.waste, 'ne')
x, y = l.XM+l.XS, l.YM
x, y = l.XM+1.5*l.XS, l.YM
for i in range(4):
s.foundations.append(SS_FoundationStack(x, y, self, suit=i, max_cards=13))
s.foundations.append(SS_FoundationStack(x, y, self, suit=i,
max_cards=13))
x += l.XS
x = l.XM+l.XS
x = l.XM+1.5*l.XS
y += l.YS
for i in range(4):
s.rows.append(AbstractFoundationStack(x, y, self, suit=i,
max_cards=1, max_move=0, base_rank=QUEEN))
x += l.XS
x = l.XM+l.XS
x = l.XM+1.5*l.XS
y += l.YS
for i in range(4):
s.rows.append(AbstractFoundationStack(x, y, self, suit=i,
max_cards=1, max_move=0, base_rank=JACK))
x += l.XS
x = l.XM+l.XS
x = l.XM+1.5*l.XS
y += l.YS
for i in range(4):
s.foundations.append(SS_FoundationStack(x, y, self, suit=i,

View file

@ -146,7 +146,7 @@ class Terrace(Game):
self.setSize(l.XM + maxrows*l.XS + l.XM, l.YM + 3*l.YS + h)
# extra settings
self.base_card = None
self.base_rank = None
# create stacks
x, y = l.XM + w1, l.YM

View file

@ -281,6 +281,64 @@ class Saxony(Game):
self.s.talon.dealRow()
# /***********************************************************************
# // Ladies Battle
# ************************************************************************/
class LadiesBattle_RowStack(AC_RowStack):
def acceptsCards(self, from_stack, cards):
if not AC_RowStack.acceptsCards(self, from_stack, cards):
return False
if from_stack in self.game.s.reserves:
return False
return True
class LadiesBattle(Game):
Hint_Class = CautiousDefaultHint
def createGame(self):
l, s = Layout(self), self.s
self.setSize(l.XM+9*l.XS, max(l.YM+l.YS+20*l.YOFFSET, l.YM+6*l.YS))
x, y, = l.XM+1.5*l.XS, l.YM
for i in range(6):
s.rows.append(LadiesBattle_RowStack(x, y, self,
max_move=1, mod=13))
x = x + l.XS
x, y = l.XM, l.YM+l.YS/2
for i in range(4):
s.reserves.append(OpenStack(x, y, self, max_accept=0))
y += l.YS
x, y = self.width-l.XS, l.YM+l.YS/2
for i in range(4):
s.foundations.append(SS_FoundationStack(x, y, self, suit=i,
base_rank=QUEEN, mod=13))
y += l.YS
x, y = self.width-l.XS, self.height-l.YS
s.talon = DealRowTalonStack(x, y, self)
l.createText(s.talon, "sw")
l.defaultStackGroups()
def _shuffleHook(self, cards):
return self._shuffleHookMoveToTop(cards,
lambda c: (c.rank in (JACK, QUEEN), (c.rank, c.suit)))
def startGame(self):
self.s.talon.dealRow(rows=self.s.reserves, frames=0)
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
self.startDealSample()
self.s.talon.dealRow()
def fillStack(self, stack):
if stack in self.s.rows and not stack.cards:
if self.s.talon.cards:
self.s.talon.flipMove()
self.s.talon.moveMove(1, stack)
shallHighlightMatch = Game._shallHighlightMatch_ACW
# register the game
registerGame(GameInfo(303, Tournament, "Tournament",
@ -292,6 +350,8 @@ registerGame(GameInfo(386, KingsdownEights, "Kingsdown Eights",
GI.GT_2DECK_TYPE, 2, 0, GI.SL_BALANCED))
registerGame(GameInfo(645, Saxony, "Saxony",
GI.GT_2DECK_TYPE, 2, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(652, LadiesBattle, "Ladies Battle",
GI.GT_1DECK_TYPE, 1, 0, GI.SL_MOSTLY_LUCK))

View file

@ -211,6 +211,11 @@ class Stack:
# its face up on a (single or double) click, and also support
# moving a subpile around.
# constants
MIN_VISIBLE_XOFFSET = 5
MIN_VISIBLE_YOFFSET = 5
SHRINK_FACTOR = 2.
def __init__(self, x, y, game, cap={}):
# Arguments are the stack's nominal x and y position (the top
# left corner of the first card placed in the stack), and the
@ -239,6 +244,8 @@ class Stack:
model.id = id
model.game = game
model.cards = []
#
model.is_filled = False
# capabilites - the game logic
model.cap = Struct(
@ -305,8 +312,6 @@ class Stack:
view.is_open = -1
view.can_hide_cards = -1
view.max_shadow_cards = -1
#
view.is_filled = False
def destruct(self):
# help breaking circular references
@ -360,23 +365,12 @@ class Stack:
self.can_hide_cards = 0
elif self.canvas.preview:
self.can_hide_cards = 0
if self.can_hide_cards:
# compute hide-off direction (see class Card)
CW, CH = self.game.app.images.CARDW, self.game.app.images.CARDH
cx = self.x + CW / 2
cy = self.y + CH / 2
if cy < 3 * CH / 2:
self.hide_x, self.hide_y = 0, -10000 # hide at top
elif cx < 3 * CW / 2:
self.hide_x, self.hide_y = -10000, 0 # hide at left
elif cy > self.game.height - 3 * CH / 2:
self.hide_x, self.hide_y = 0, 10000 # hide at bottom
else:
self.hide_x, self.hide_y = 10000, 0 # hide at right
if self.is_open < 0:
self.is_open = (self.is_visible and
(abs(self.CARD_XOFFSET[0]) >= 5 or
abs(self.CARD_YOFFSET[0]) >= 5))
self.is_open = False
if (self.is_visible and
(abs(self.CARD_XOFFSET[0]) >= self.MIN_VISIBLE_XOFFSET or
abs(self.CARD_YOFFSET[0]) >= self.MIN_VISIBLE_YOFFSET)):
self.is_open = True
if self.max_shadow_cards < 0:
self.max_shadow_cards = 999999
if abs(self.CARD_YOFFSET[0]) != self.game.app.images.CARD_YOFFSET:
@ -385,9 +379,11 @@ class Stack:
self.max_shadow_cards = 1
if (self.game.app.opt.shrink_face_down and
type(ox) is int and type(oy) is int):
if ((ox == 0 and oy >= self.game.app.images.CARD_YOFFSET/2) or
(oy == 0 and ox >= self.game.app.images.CARD_XOFFSET/2)):
self.shrink_face_down = 2
# no shrink if xoffset/yoffset too small
f = self.SHRINK_FACTOR
if ((ox == 0 and oy >= self.game.app.images.CARD_YOFFSET/f) or
(oy == 0 and ox >= self.game.app.images.CARD_XOFFSET/f)):
self.shrink_face_down = f
# bottom image
if self.is_visible:
self.prepareBottom()
@ -745,7 +741,7 @@ class Stack:
for c in cards[-2:]:
##print "refresh unhide 1", c, c.hide_stack
c.unhide()
##print "refresh unhide 1", c, c.hide_stack, c.hide_x, c.hide_y
##print "refresh unhide 1", c, c.hide_stack
# update the card postions and stacking order
item = cards[0].item
x, y = view.x, view.y
@ -778,17 +774,15 @@ class Stack:
format = "%d"
if format:
t = format % len(self.cards)
if 0 and self.game.app.debug:
if 0 and self.game.app.debug >= 4:
visible = 0
for c in self.cards:
if c.isHidden():
assert c.hide_stack is not None
assert c.hide_x != 0 or c.hide_y != 0
else:
visible = visible + 1
assert c.hide_stack is None
assert c.hide_x == 0 and c.hide_y == 0
t = t + " %2d" % visible
t = t + " (%d)" % visible
self.texts.ncards.config(text=t)
def basicShallHighlightSameRank(self, card):
@ -800,11 +794,10 @@ class Stack:
return True
if not self.is_open:
return False
dx, dy = self.getOffsetFor(card)
if dx == 0 and dy <= 4:
return False
if dx <= 4 and dy == 0:
return False
## dx, dy = self.getOffsetFor(card)
## if ((dx == 0 and dy <= self.MIN_VISIBLE_XOFFSET) or
## (dx <= self.MIN_VISIBLE_YOFFSET and dy == 0)):
## return False
return True
def basicShallHighlightMatch(self, card):
@ -984,7 +977,7 @@ class Stack:
if self.game.demo:
self.game.stopDemo(event)
if self.game.busy: return EVENT_HANDLED
if not self.game.app.opt.sticky_mouse: # 1:
if not self.game.app.opt.sticky_mouse:
# use a timer to update the drag
# this allows us to skip redraws on slow machines
drag = self.game.drag
@ -1229,6 +1222,9 @@ class Stack:
def _shadeStack(self):
if not self.game.app.opt.shade_filled_stacks:
return
## if (self.CARD_XOFFSET != (0,) or
## self.CARD_YOFFSET != (0,)):
## return
if not self.images.shade_img:
img = self.game.app.images.getShade()
self.images.shade_img = img
@ -1237,11 +1233,11 @@ class Stack:
if img is None:
return
if not self.items.shade_item:
self.game.canvas.update_idletasks()
#self.game.canvas.update_idletasks()
card = self.cards[-1]
item = MfxCanvasImage(self.game.canvas, card.x, card.y,
image=img, anchor=ANCHOR_NW)
##item.tkraise()
#item.tkraise()
item.addtag(self.group)
self.items.shade_item = item
@ -1355,17 +1351,9 @@ class DealRow_StackMethods:
for r in stacks:
assert not self.getCard().face_up
assert r is not self
if frames == 0 and self.game.moves.state == self.game.S_INIT:
# optimized a little bit for initial dealing
c = self.removeCard(update=0)
r.addCard(c, update=0)
# doing the flip after the move seems to be a little faster
if flip:
c.showFace()
else:
if flip:
self.game.flipMove(self)
self.game.moveMove(1, self, r, frames=frames)
if flip:
self.game.flipMove(self)
self.game.moveMove(1, self, r, frames=frames)
self.game.leaveState(old_state)
return len(stacks)

View file

@ -49,36 +49,7 @@ from tkcanvas import MfxCanvasGroup, MfxCanvasImage
# //
# ************************************************************************/
# any Tk version
class _HideableCard_1(AbstractCard):
def hide(self, stack):
if stack is self.hide_stack:
return
if self.hide_stack:
hx, hy = stack.hide_x - self.hide_x, stack.hide_y - self.hide_y
else:
hx, hy = stack.hide_x, stack.hide_y
####self.item.move(hx, hy)
item = self.item
item.canvas.tk.call(item.canvas._w, "move", item.id, hx, hy)
self.hide_x, self.hide_y = stack.hide_x, stack.hide_y
self.hide_stack = stack
##print "hide:", self.id, hx, hy, self.item.coords()
def unhide(self):
if self.hide_stack is None:
return 0
####self.item.move(-self.hide_x, -self.hide_y)
item = self.item
item.canvas.tk.call(item.canvas._w, "move", item.id, -self.hide_x, -self.hide_y)
##print "unhide:", self.id, -self.hide_x, -self.hide_y, self.item.coords()
self.hide_x, self.hide_y = 0, 0
self.hide_stack = None
return 1
# needs Tk 8.3.0 or better
class _HideableCard_2(AbstractCard):
class _HideableCard(AbstractCard):
def hide(self, stack):
if stack is self.hide_stack:
return
@ -95,11 +66,6 @@ class _HideableCard_2(AbstractCard):
return 1
_HideableCard =_HideableCard_1
if 1 and tkversion >= (8, 3, 0, 0):
_HideableCard =_HideableCard_2
# /***********************************************************************
# // New implemetation since 2.10
# //

View file

@ -339,7 +339,7 @@ class PysolMenubar(PysolMenubarActions):
menu.add_command(label=n_("&Player options..."), command=self.mOptPlayerOptions)
submenu = MfxMenu(menu, label=n_("&Automatic play"))
submenu.add_checkbutton(label=n_("Auto &face up"), variable=self.tkopt.autofaceup, command=self.mOptAutoFaceUp)
submenu.add_checkbutton(label=n_("&Auto drop"), variable=self.tkopt.autodrop, command=self.mOptAutoDrop)
submenu.add_checkbutton(label=n_("A&uto drop"), variable=self.tkopt.autodrop, command=self.mOptAutoDrop)
submenu.add_checkbutton(label=n_("Auto &deal"), variable=self.tkopt.autodeal, command=self.mOptAutoDeal)
submenu.add_separator()
submenu.add_checkbutton(label=n_("&Quick play"), variable=self.tkopt.quickplay, command=self.mOptQuickPlay)

View file

@ -221,6 +221,8 @@ def plain_text():
if gi.category == GI.GC_FRENCH:
##print str(gi.gameclass)
print gi.name.encode('utf-8')
for n in gi.altnames:
print n.encode('utf-8')
##name = gi.name.lower()
##name = re.sub('\W', '', name)
##print id, name #, gi.si.game_type, gi.si.game_type == GI.GC_FRENCH