-

1. Code structure and Utilities

-

In this lesson we will set up the file structure for EvAdventure. We will make some +

1. Code Structure and Utilities

+

In this lesson, we will set up the file structure for EvAdventure. We will make some utilities that will be useful later. We will also learn how to write tests.

-

1.1. Folder structure

+

1.1. Folder Structure

-

Create a new folder under your mygame folder, named evadventure. Inside it, create -another folder tests/ and make sure to put empty __init__.py files in both. This turns both -folders into packages Python understands to import from.

+

Create a new folder named evadventure under your mygame folder. Inside it the new folder, create another folder named tests/. Make sure to put empty __init__.py files in both new folders. Doing so turns both new folders into packages from which Python understands to import automatically.

mygame/
    commands/
    evadventure/         <---
@@ -156,7 +154,7 @@ folders into packages Python understands to import from.

Importing anything from inside this folder from anywhere else under mygame will be done by

# from anywhere in mygame/
-from evadventure.yourmodulename import whatever 
+from evadventure.yourmodulename import whatever
 

This is the ‘absolute path` type of import.

@@ -166,7 +164,7 @@ folders into packages Python understands to import from.