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

Fix some typos as reported by codespell.

Thanks to Jan for inspiring this.
This commit is contained in:
Shlomi Fish 2017-04-08 19:13:59 +03:00
parent 2d6d4b5c8a
commit c1d7918c27
21 changed files with 35 additions and 35 deletions

View file

@ -122,7 +122,7 @@ The toolkit layer
ship with every Python installation, but a very experimental version
for Gnome (using the pygnome and pygtk bindings) exists as well.
A more exicting idea is to use JPython to make PySol run under a
A more exciting idea is to use JPython to make PySol run under a
Java VM using Swing as the toolkit.
Because Tkinter is the "main" interface other toolkit layers have

View file

@ -19,7 +19,7 @@ more than eight cards in a row.
<p>
The cards in the tableau build from first rank to fourth, without regard
to suit. The third and fourth rank cards are interchangable. Any card
to suit. The third and fourth rank cards are interchangeable. Any card
can be played on the canvas.
<p>

View file

@ -11,7 +11,7 @@ Move all cards to the foundations.
Cards can be played on the tableau by suits or by rank.
Plum 1 plays on Pine 1, Maple 3 on Mum 3, Pine 2 on
Phoenix 2, etc. Any second rank card can be played on
any first. The third and fourth ranks are interchangable
any first. The third and fourth ranks are interchangeable
for all suits. Only first rank cards can be played on the
canvas. There can be no more than 26 cards in a row.
<p>

View file

@ -8,7 +8,7 @@ Arrange all the cards on the rows.
This is a <a href="fan.html">Fan</a>
type game adapted to the Hanafuda cards. The tableau consists of
twelve rows. Any stack may be moved, but only a first rank card
will play on an empty row. The trash cards are not interchangable,
will play on an empty row. The trash cards are not interchangeable,
and no more than eight cards can be played on a row. The game is
won when all twelve suits are arranged in order in their respective
places on the tableau.

View file

@ -10,7 +10,7 @@ Move all cards to the foundation.
<p>
The cards can only be moved to the foundation as entire suits, in order.
As in <a href="oonsoo.html">Oonsoo</a>,
the third and fourth rank cards are interchangable
the third and fourth rank cards are interchangeable
for all suits except Rain. Only first rank cards can play on the canvas.
First build the suits on the tableau. Then pick up all four cards at
once and drop them on the foundation. The foundation will only accept

View file

@ -10,9 +10,9 @@ Arrange all twelve suits in order.
<p>
When the hand is dealt there are two rows of six cards face down with
six more face up on top. You can play a card on another card if it's
in the same suit and in decending rank order. The third and fourth
rank cards are interchangable for all suits except Rain. Plum 4 on
Plum 3 is ok. Plum 3 on Plum 4 is ok. Gaji can only be played on
in the same suit and in descending rank order. The third and fourth
rank cards are interchangeable for all suits except Rain. Plum 4 on
Plum 3 is OK. Plum 3 on Plum 4 is OK. Gaji can only be played on
Rain 3.
<h3>Strategy</h3>

View file

@ -10,8 +10,8 @@ Arrange all twelve suits in order.
<p>
When the hand is dealt there are two rows of six cards face down with
six more face up on top. You can play a card on another card if it's
in the same suit and in decending rank order. The third and fourth
rank cards are interchangable for all suits except Rain. Plum 4 on
in the same suit and in descending rank order. The third and fourth
rank cards are interchangeable for all suits except Rain. Plum 4 on
Plum 3 is ok. Plum 3 on Plum 4 is ok. Gaji can only be played on
Rain 3.

View file

@ -22,7 +22,7 @@ sequence of cards as a unit to another pile with an appropriate card (e.g.
<p>
When all possible moves are made (or the player has done all the possible
moves one can make), the piles are picked up in reverse order. For example,
the twelth pile is placed over the eleventh pile, and this new pile is placed
the twelfth pile is placed over the eleventh pile, and this new pile is placed
on the tenth pile, and so on. Then, without shuffling, the cards are dealt to
as many piles of four as the remaining decks will allow. To ensure that the
order of the cards is not disturbed for the most part, it is suggested that

View file

@ -261,7 +261,7 @@ class DuplicateError(ConfigObjError):
class ConfigspecError(ConfigObjError):
"""
An error occured whilst parsing a configspec.
An error occurred whilst parsing a configspec.
"""
class InterpolationError(ConfigObjError):
@ -791,7 +791,7 @@ class Section(dict):
unless ``raise_errors=False``, in which case set the return value to
``False``.
Any unrecognised keyword arguments you pass to walk, will be pased on
Any unrecognised keyword arguments you pass to walk, will be passed on
to the function you pass in.
Note: if ``call_on_sections`` is ``True`` then - on encountering a
@ -1600,7 +1600,7 @@ class ConfigObj(Section):
Handle an error according to the error settings.
Either raise the error or store it.
The error will have occured at ``cur_index``
The error will have occurred at ``cur_index``
"""
line = infile[cur_index]
cur_index += 1

View file

@ -863,7 +863,7 @@ def is_boolean(value):
except KeyError:
raise VdtTypeError(value)
# we do an equality test rather than an identity test
# this ensures Python 2.2 compatibilty
# this ensures Python 2.2 compatibility
# and allows 0 and 1 to represent True and False
if value == False:
return False

View file

@ -1980,7 +1980,7 @@ Congratulations, you did it !
to_stack, ncards = s.canDropCards(self.s.foundations)
if to_stack:
# each single drop is undo-able (note that this call
# is before the acutal move)
# is before the actual move)
self.finishMove()
if sound:
self.playSample("autodrop", priority=30)

View file

@ -28,7 +28,7 @@ import sys
from Tkinter import Menu, Text, TclError
def runningAsOSXApp():
""" Returns True iff running from the PySol.app bundle on OSX """
""" Returns True if-and-only-if running from the PySol.app bundle on OSX """
return (sys.platform == 'darwin' and 'PySol.app' in sys.argv[0])
def hideTkConsole(root):

View file

@ -48,7 +48,7 @@ class AtomicMove:
def __str__(self):
return str(self.__dict__)
# Custom comparision for detecting redo moves. See Game.finishMove().
# Custom comparison for detecting redo moves. See Game.finishMove().
def cmpForRedo(self, other):
return -1

View file

@ -409,7 +409,7 @@ class SelectGameDialogWithPreview(MfxDialog):
self.preview_app.opt.shadow = 0
self.preview_app.opt.shade = 0
#
self.preview_app.audio = None # turn off audio for intial dealing
self.preview_app.audio = None # turn off audio for initial dealing
if animations >= 0:
self.preview_app.opt.animations = animations
#

View file

@ -340,7 +340,7 @@ class Cardset(Resource):
nbottoms = 7,
nletters = 4,
nshadows = 1 + 13,
# selection criterias
# selection criteria
si = si,
# implicit
backname = None,

View file

@ -454,16 +454,16 @@ class Stack:
self.closeStack()
return card
def insertCard(self, card, positon, unhide=1, update=1):
def insertCard(self, card, position, unhide=1, update=1):
model, view = self, self
model.cards.insert(positon, card)
for c in model.cards[positon:]:
model.cards.insert(position, card)
for c in model.cards[position:]:
c.tkraise(unhide=unhide)
if view.can_hide_cards and len(model.cards) >= 3 and len(model.cards)-positon <= 2:
if view.can_hide_cards and len(model.cards) >= 3 and len(model.cards)-position <= 2:
# we only need to display the 2 top cards
model.cards[-3].hide(self)
card.item.addtag(view.group)
for c in model.cards[positon:]:
for c in model.cards[position:]:
view._position(c)
if update:
view.updateText()

View file

@ -60,13 +60,13 @@ class PysolStatsFormatter:
}
sort_func = sort_functions[sort_by]
g = sort_func(player=player)
twon, tlost, tgames, ttime, tmoves = 0, 0, 0, 0, 0
t_won, tlost, tgames, ttime, tmoves = 0, 0, 0, 0, 0
for id in g:
won, lost, time, moves = app.stats.getFullStats(player, id)
if won > 0 or lost > 0 or id == app.game.id:
# yield only played games
name = app.getGameTitleName(id)
twon, tlost = twon + won, tlost + lost
t_won, tlost = t_won + won, tlost + lost
ttime, tmoves = ttime+time, tmoves+moves
if won + lost > 0:
perc = "%.1f" % (100.0 * won / (won + lost))
@ -77,7 +77,7 @@ class PysolStatsFormatter:
yield [name, won+lost, won, lost, t, m, perc, id]
tgames += 1
# summary
won, lost = twon, tlost
won, lost = t_won, tlost
if won + lost > 0:
if won > 0:
time = format_time(ttime/tgames)
@ -111,7 +111,7 @@ class PysolStatsFormatter:
return _("Game"), _("Game number"), _("Started at"), _("Status")
def getLogResults(self, player, prev_games):
twon, tlost = 0, 0
t_won, tlost = 0, 0
for pg in prev_games:
if not isinstance(pg, tuple):
continue
@ -144,7 +144,7 @@ class PysolStatsFormatter:
date = time.strftime("%Y-%m-%d %H:%M", time.localtime(pg[3]))
if pg[2] >= 0:
won = pg[2] > 0
twon, tlost = twon + won, tlost + (1 - won)
t_won, tlost = t_won + won, tlost + (1 - won)
status = "*error*"
if -2 <= pg[2] <= 2:
status = (_("Loaded"), _("Not won"), _("Lost"), _("Won"), _("Perfect")) [pg[2]+2]

View file

@ -489,7 +489,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
self.preview_app.opt.shadow = 0
self.preview_app.opt.shade = 0
#
self.preview_app.audio = None # turn off audio for intial dealing
self.preview_app.audio = None # turn off audio for initial dealing
if animations >= 0:
self.preview_app.opt.animations = animations
#

View file

@ -693,7 +693,7 @@ class Combobox(Entry):
textvariable, values, width
"""
# The "values" option may need special formatting, so leave to
# _format_optdict the responsability to format it
# _format_optdict the responsibility to format it
if "values" in kw:
kw["values"] = _format_optdict({'v': kw["values"]})[1]
@ -1023,7 +1023,7 @@ class Progressbar(Widget):
"""Begin autoincrement mode: schedules a recurring timer event
that calls method step every interval milliseconds.
interval defaults to 50 milliseconds (20 steps/second) if ommited."""
interval defaults to 50 milliseconds (20 steps/second) if ommitted."""
self.tk.call(self._w, "start", interval)

View file

@ -490,7 +490,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
self.preview_app.opt.shadow = 0
self.preview_app.opt.shade = 0
#
self.preview_app.audio = None # turn off audio for intial dealing
self.preview_app.audio = None # turn off audio for initial dealing
if animations >= 0:
self.preview_app.opt.animations = animations
#

View file

@ -9,7 +9,7 @@
#
# python make_pysol_freecell_board.py [board number] | fc-solve
#
# This program is platform independant and will generate the same results
# This program is platform independent and will generate the same results
# on all architectures and operating systems.
#
# Based on the code by Markus Franz Xaver Johannes Oberhumer.