import unittest
from gameworld import Avatar, Game, Map, Wall, event

class AvatarTest(unittest.TestCase):

    def setUp(self):
        self.g = Game()
        self.a = Avatar()
        self.g.spawn(self.a, (5,5))
        
    def test_walk(self):
        assert self.g.locate(self.a) == (5,5)
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5,4)

    def test_walk_blocked(self):
        self.g.place(Wall(), (5,4))
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5,5)


if __name__=="__main__":
    unittest.main()

514ff219f9a4366121bec0d94e4d24a50df3664c
<mask token>


class AvatarTest(unittest.TestCase):

    def setUp(self):
        self.g = Game()
        self.a = Avatar()
        self.g.spawn(self.a, (5, 5))
    <mask token>

    def test_walk_blocked(self):
        self.g.place(Wall(), (5, 4))
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 5)


<mask token>

<mask token>


class AvatarTest(unittest.TestCase):

    def setUp(self):
        self.g = Game()
        self.a = Avatar()
        self.g.spawn(self.a, (5, 5))

    def test_walk(self):
        assert self.g.locate(self.a) == (5, 5)
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 4)

    def test_walk_blocked(self):
        self.g.place(Wall(), (5, 4))
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 5)


<mask token>

<mask token>


class AvatarTest(unittest.TestCase):

    def setUp(self):
        self.g = Game()
        self.a = Avatar()
        self.g.spawn(self.a, (5, 5))

    def test_walk(self):
        assert self.g.locate(self.a) == (5, 5)
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 4)

    def test_walk_blocked(self):
        self.g.place(Wall(), (5, 4))
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 5)


if __name__ == '__main__':
    unittest.main()

import unittest
from gameworld import Avatar, Game, Map, Wall, event


class AvatarTest(unittest.TestCase):

    def setUp(self):
        self.g = Game()
        self.a = Avatar()
        self.g.spawn(self.a, (5, 5))

    def test_walk(self):
        assert self.g.locate(self.a) == (5, 5)
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 4)

    def test_walk_blocked(self):
        self.g.place(Wall(), (5, 4))
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5, 5)


if __name__ == '__main__':
    unittest.main()

import unittest
from gameworld import Avatar, Game, Map, Wall, event

class AvatarTest(unittest.TestCase):

    def setUp(self):
        self.g = Game()
        self.a = Avatar()
        self.g.spawn(self.a, (5,5))
        
    def test_walk(self):
        assert self.g.locate(self.a) == (5,5)
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5,4)

    def test_walk_blocked(self):
        self.g.place(Wall(), (5,4))
        self.a.walk(Map.NORTH)
        assert self.g.locate(self.a) == (5,5)


if __name__=="__main__":
    unittest.main()
