Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion en/pygame/014_sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def update(self, seconds):

pygame.display.set_caption("[FPS]: %.2f birds: %i" % (clock.get_fps(), len(birdgroup)))

# ------ collision detecttion
# ------ collision detection
for bird in birdgroup:
bird.catched = False # set all Bird sprites to not catched

Expand Down
2 changes: 1 addition & 1 deletion en/pygame/015_more_sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def update(self, seconds):
pygame.display.set_caption("ms: %i max(ms): %i fps: %.2f birds: %i gravity: %s bad:%s clever:%s"% (milliseconds,
millimax, clock.get_fps(), len(birdgroup), Fragment.gravity, badcoding, clevercoding))

# ------ collision detecttion
# ------ collision detection
for bird in birdgroup:
bird.cleanstatus()

Expand Down
2 changes: 1 addition & 1 deletion en/pygame/part2step014-sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def update(self, seconds):

pygame.display.set_caption("[FPS]: %.2f birds: %i" % (clock.get_fps(), len(birdgroup)))

# ------ collision detecttion
# ------ collision detection
for bird in birdgroup:
bird.catched = False # set all Bird sprites to not catched

Expand Down
2 changes: 1 addition & 1 deletion en/python/battleship/chat_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def accept_incoming_connections():
"""Sets up handling for incoming clients."""
while True:
client, client_address = SERVER.accept() # client_adress is ip and port
client, client_address = SERVER.accept() # client_address is ip and port
print("client {}:{} has connected with server".format(client_address[0], client_address[1]))
#client.send(bytes("Welcome to Battleships! Please type your name and press enter!", "utf8"))
addresses[client] = client_address
Expand Down
2 changes: 1 addition & 1 deletion en/python/tictactoe/step003c_play_until_bored.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""tic tac toe for 2 players, without win checking"""

# ----- defnine some top-level variables ------
# ----- define some top-level variables ------
cells = [[" ", " ", " "],
[" ", " ", " "],
[" ", " ", " "],
Expand Down
2 changes: 1 addition & 1 deletion en/python/tictactoe/step004a_check_win.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""tic tac toe for 2 players, wit win checking"""
# ----- defnine some top-level variables ------
# ----- define some top-level variables ------
cells = [[" " for x in range(3)] for y in range(3)]
symbols = ("x", "o") # tuples are read-only
greeting = "This is turn {}. Player {}, where do you put your '{}'?"
Expand Down
2 changes: 1 addition & 1 deletion en/python/tictactoe/step006b_medium_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def choose_free_cell(free_cells, mychar) -> str:


def make_human_coordinates(row: int, column: int) -> str:
"""returns a human-readable string, cloumns ABC, rows 123"""
"""returns a human-readable string, columns ABC, rows 123"""
return "ABC"[column]+","+str(row+1)

def find_winning_move(mychar: str) -> Optional[str]:
Expand Down
2 changes: 1 addition & 1 deletion en/python/tictactoe/step006btest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def display() -> None:


def make_human_coordinates(row: int, column: int) -> str:
"""returns a human-readable string, cloumns ABC, rows 123"""
"""returns a human-readable string, columns ABC, rows 123"""
return "ABC"[column]+","+str(row+1)


Expand Down
2 changes: 1 addition & 1 deletion en/python/tictactoe/step006c_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def choose_a_free_cell(cells: List[List[str]], my_char: str ,


def make_human_coordinates(row: int, column: int) -> str:
"""returns a human-readable string, cloumns ABC, rows 123"""
"""returns a human-readable string, columns ABC, rows 123"""
return "ABC"[column] + "," + str(row + 1)


Expand Down
2 changes: 1 addition & 1 deletion examples/image_merge_and_meme.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_concat_h_blank(im1, im2, color=(0, 0, 0)):
return dst

def get_concat_v_blank(im1, im2, color=(0, 0, 0)):
"""merge images vertically, leaving blank the leftoer, see https://note.nkmk.me/en/python-pillow-basic/"""
"""merge images vertically, leaving blank the leftover, see https://note.nkmk.me/en/python-pillow-basic/"""
dst = PIL.Image.new('RGB', (max(im1.width, im2.width), im1.height + im2.height), color)
dst.paste(im1, (0, 0))
dst.paste(im2, (0, im1.height))
Expand Down
8 changes: 4 additions & 4 deletions examples/pygameMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def create_menu(self):
# ---- video (submenu of settings) ----
# ----list of possible video resolutions without double entries -> set ----
reslist = list(set(pygame.display.list_modes(flags=pygame.FULLSCREEN)))
reslist.sort() # sort the list from smalles resolution to biggest
reslist.sort() # sort the list from smallest resolution to biggest
# concert list of tuples( int,int) into list of strings
# print("reslist", reslist)
reslist = ["x".join((str(x), str(y))) for (x, y) in reslist]
Expand Down Expand Up @@ -283,12 +283,12 @@ def __init__(self,

@property
def font(self):
"""read only attribute, influened by fontname and fontsize"""
"""read only attribute, influenced by fontname and fontsize"""
return pygame.font.SysFont(name=self.fontname, size=self.fontsize, bold=True, italic= False)

@property
def smallfont(self):
"""read only attribute, influened by fontname and helptextfontsize"""
"""read only attribute, influenced by fontname and helptextfontsize"""
return pygame.font.SysFont(name=self.fontname, size=self.helptextfontsize, bold=True, italic=False)

def cursor_up(self, menupoints):
Expand Down Expand Up @@ -425,7 +425,7 @@ def run(self):
menupoints = [p for p in self.menu.items]
selection = self.menu.items[self.i] # self.menudict[self.menuname][self.i]
# ------- cursor animation --------
# bounce coursor from left to right:
# bounce cursor from left to right:
maxcursordistance = 20
## first value is animation time (lower is slower), second value is travel distance of Curosr
#cursordistance = (self.menutime * 20) % 50
Expand Down