100% found this document useful (1 vote)
5K views11 pages

Ozaria Chap 3

The document contains Python code for moving a hero character through various maze-like patterns using conditionals and loops. It includes sections with movements like moving right and up in triangles, serpentines, stairs, and blind jumps depending on if the hero can move in a given direction. The goal is to navigate the hero through each maze-like section of code.

Uploaded by

jorgeserrano1100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
5K views11 pages

Ozaria Chap 3

The document contains Python code for moving a hero character through various maze-like patterns using conditionals and loops. It includes sections with movements like moving right and up in triangles, serpentines, stairs, and blind jumps depending on if the hero can move in a given direction. The goal is to navigate the hero through each maze-like section of code.

Uploaded by

jorgeserrano1100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

For mouse

for i in range(3):
hero.moveRight(1)
hero.moveUp(2)
hero.moveRight(1)
hero.moveDown(6)

for i in range(3):
hero.moveRight(1)
hero.moveUp(2)
hero.moveRight(1)
hero.moveDown(6)
For inside

for i in range(2):
for j in range(3):
hero.moveRight()
hero.moveDown(2)
hero.moveRight()
hero.moveUp(6)
Triple Slalom

for i in range(3):
hero.moveRight()
for j in range(3):
hero.moveRight()
hero.moveDown()
hero.moveLeft()
hero.moveDown()
hero.moveRight(2)
hero.moveUp(6)
Serpentines

for i in range(3):
for j in range(3):
hero.moveRight()
hero.moveUp()
hero.moveLeft()
hero.moveUp()
hero.moveRight(2)
hero.moveDown(6)
hero.moveRight()
Haven Stairs

for i in range(2):
walkDistance = 1
for j in range(3):
hero.moveUp(walkDistance)
hero.moveRight()
walkDistance = walkDistance +1
hero.moveDown(6)
hero.moveRight()
Dark Downstairs

for i in range(2):
walkDistance = 3
for j in range(3):
hero.moveDown(walkDistance)
hero.moveRight()
walkDistance = walkDistance -1
hero.moveUp(6)
hero.moveRight()
Blind Steps

hero.moveUp(2)
hero.sneakRight(2)
hero.jumpRight()
hero.moveRight()
A loop in the fog

for i in range(3):
hero.sneakRight()
hero.sneakUp()

hero.sneakRight()
hero.jumpRight()
Double choice

hero.moveRight()

if hero.canMoveUp():
hero.moveUp()
hero.moveRight()
else:
hero.moveRight()
hero.moveUp()

if hero.canMoveUp():
hero.moveUp()
hero.moveRight()
else:
hero.moveRight()
hero.moveUp()

hero.moveUp()
hero.jumpRight()
hero.moveRight()
Into the unknown

hero.moveUp(2)
hero.moveRight(1)

if hero.canMoveUp():
hero.moveUp()
else:
hero.moveRight()

if hero.canMoveUp():
hero.moveUp()
else:
hero.moveRight()

if hero.canMoveUp():
hero.moveUp()
else:
hero.moveRight()

if hero.canMoveUp():
hero.moveUp()
else:
hero.moveRight()

if hero.canMoveUp():
hero.moveUp()
else:
hero.jumpRight()
Storm Rising

hero.moveRight()

for i in range(7):
if hero.canMoveDown():
hero.moveDown()
else:
hero.moveRight()

hero.jumpRight()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy