Skip to content

Commit

Permalink
Change the URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
arnauddupuis committed Oct 16, 2022
1 parent e93024f commit 88891ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/tutorials/01-game-basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def update_game(game: engine.Game, key, elapsed_time):
)
# Then we create 2 basic boards. Please have a look at the wiki for a complete
# tutorial on Boards:
# https://github.com/arnauddupuis/pygamelib/wiki/Getting-started-Board
# https://github.com/pygamelib/pygamelib/wiki/Getting-started-Board
# And the documentation for the Board class:
# https://pygamelib.readthedocs.io/en/latest/pygamelib.engine.Board.html
board1 = engine.Board(
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/02-move-player.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def update_game(game: engine.Game, key, elapsed_time):
)
# Then we create 2 basic boards. Please have a look at the wiki for a complete
# tutorial on Boards:
# https://github.com/arnauddupuis/pygamelib/wiki/Getting-started-Board
# https://github.com/pygamelib/pygamelib/wiki/Getting-started-Board
# And the documentation for the Board class:
# https://pygamelib.readthedocs.io/en/latest/pygamelib.engine.Board.html
board1 = engine.Board(
Expand Down
15 changes: 11 additions & 4 deletions examples/tutorials/03-gmighty-wizard/99-final-game.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def whale_behavior():
# their type.
# This matches both "left_whale" and "right_whale"
for item in g.current_board().get_movables(type="whale"):
item.sprixel.bg_color = core.Color(124, 183, 255)
if item.type == "right_whale" or item.type == "left_whale":
whales.append(item)
if len(whales) > 0:
Expand All @@ -223,7 +224,8 @@ def whale_behavior():
1,
board_items.NPC(
sprixel=core.Sprixel(
graphics.Models.OCTOPUS, core.Color(0, 0, 255)
graphics.Models.OCTOPUS,
core.Color(124, 183, 255),
),
name="Swimming Octopus (Left)",
item_type="swimming_octopus",
Expand All @@ -238,7 +240,8 @@ def whale_behavior():
1,
board_items.NPC(
sprixel=core.Sprixel(
graphics.Models.OCTOPUS, core.Color(0, 0, 255)
graphics.Models.OCTOPUS,
core.Color(124, 183, 255),
),
name="Swimming Octopus (Right)",
item_type="swimming_octopus",
Expand Down Expand Up @@ -512,12 +515,16 @@ def teleport_player(row, column):
# Now let's place the 2 river tiles (we use the Door object as a shortcut to get a
# overlapable, restorable item)
g.current_board().place_item(
board_items.Door(sprixel=core.Sprixel.blue_square()), 0, 26
board_items.Door(sprixel=core.Sprixel(" ", core.Color(124, 183, 255))), 0, 26
)
g.current_board().place_item(
board_items.Door(sprixel=core.Sprixel.blue_square()), 11, 0
board_items.Door(sprixel=core.Sprixel(" ", core.Color(124, 183, 255))), 11, 0
)

for item in g.current_board().get_movables(type="whale"):
if item.type == "right_whale" or item.type == "left_whale":
item.sprixel.bg_color = core.Color(124, 183, 255)

# Now we need to take care of the explosions. Hide them and set the callback functions.
for item in g.current_board().get_immovables():
# Here we need to set the functions that are going to be called when the player
Expand Down

0 comments on commit 88891ad

Please sign in to comment.