Пример #1
0
        public void 잡은_것이_아이템일_경우만_플레이어아이템이_되는가()
        {
            Player player = new Player(0, 0, 0, 3, false);
            Item   item   = new Key("Key", 0, 0, 4, 3);

            player.GripItem(item);

            Assert.AreEqual((item as Key).Name, player.playerItem.Name);
        }
Пример #2
0
        public void 키의_이름과_문의_이름이_일치하지_않으면_열리지않는가()
        {
            Door   door   = new Door("ClassRoom", 0, 0, 5, 3);
            Key    key    = new Key("LabroomKey", 0, 0, 0, 3);
            Player player = new Player(0, 0, 0, 3, false);

            player.GripItem(key);
            player.Move(0, 0, 3);
            player.OpenDoor(door);

            Assert.AreEqual(false, door.isOpened);
        }
Пример #3
0
        public void 키의_이름과_문의_이름이_일치하면_열리는가()
        {
            Door   door   = new Door("Labroom", 0, 0, 5, 3);
            Item   key    = new Key("LabroomKey", 0, 0, 2, 3);
            Player player = new Player(0, 0, 0, 3, false);

            player.GripItem(key);
            player.Move(0, 0, 3);
            player.OpenDoor(door);

            Assert.AreEqual(true, door.isOpened);
        }