From 7de83a90e2e0bc4d4b6563058b3f58a6bc01ffb7 Mon Sep 17 00:00:00 2001 From: Aaron Snoswell Date: Sat, 31 Jul 2021 21:27:40 +1000 Subject: [PATCH] Fix a typo in code listing for part 6 The tutorial text says the player Actor should use BaseAI, not HostileEnemy. It turns out, the tutorial still works, even without this, but thought I'd correct it to avoid confusion :) Thanks for an awesome tutorial! I'm having heaps of fun following it :D --- content/tutorials/tcod/v2/part-6.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/tutorials/tcod/v2/part-6.md b/content/tutorials/tcod/v2/part-6.md index 3d88734a..007502de 100644 --- a/content/tutorials/tcod/v2/part-6.md +++ b/content/tutorials/tcod/v2/part-6.md @@ -1339,7 +1339,7 @@ With all that in place, we'll need to refactor our `entity_factories.py` file to {{< codetab >}} {{< diff-tab >}} {{< highlight diff >}} -+from components.ai import HostileEnemy ++from components.ai import BaseAI, HostileEnemy +from components.fighter import Fighter +from entity import Actor -from entity import Entity @@ -1348,7 +1348,7 @@ With all that in place, we'll need to refactor our `entity_factories.py` file to + char="@", + color=(255, 255, 255), + name="Player", -+ ai_cls=HostileEnemy, ++ ai_cls=BaseAI, + fighter=Fighter(hp=30, defense=2, power=5), +) -player = Entity(char="@", color=(255, 255, 255), name="Player", blocks_movement=True)