示例#1
0
    def test_moving_sw_from_odd_column(self):
        p = Program()
        p.q = 3
        p.r = 3

        p.move("sw")

        self.assertEqual(p.q, 2)
        self.assertEqual(p.r, 3)
示例#2
0
    def test_moving_sw_from_even_column(self):
        p = Program()
        p.q = 4
        p.r = 3

        p.move("sw")

        self.assertEqual(p.q, 3)
        self.assertEqual(p.r, 4)
示例#3
0
    def test_moving_ne_from_odd_column(self):
        p = Program()
        p.q = 3
        p.r = 3

        p.move("ne")

        self.assertEqual(p.q, 4)
        self.assertEqual(p.r, 2)
示例#4
0
    def test_moving_n(self):
        p = Program()
        p.q = 3
        p.r = 3

        p.move("n")

        self.assertEqual(p.q, 3)
        self.assertEqual(p.r, 2)
示例#5
0
    def test_moving_ne_from_even_column(self):
        p = Program()
        p.q = 4
        p.r = 3

        p.move("ne")

        self.assertEqual(p.q, 5)
        self.assertEqual(p.r, 3)