Skip to content

Latest commit

 

History

History
68 lines (41 loc) · 1.56 KB

README.md

File metadata and controls

68 lines (41 loc) · 1.56 KB

Adventure

Test Coverage Code Climate

Summary

Pre-course adventure game excercise from Learning Ruby the Hard Way

Problem

User moves between rooms in a dungeon, interacts with objects and monsters

Languages/Platforms/Tools

Languages Technologies Testing Frameworks Misc
Ruby no tests

Solution

  • The player can move between rooms, pick up and manipulate items, and shoot the monster.
  • Room, item and monster Classes inherit off Dungeon_thing generic class
  • A big classless loop handles the game mechanics

Setup

ruby adventure.rb

Tests

no tests

Images

You are in a cluttered kitchen, light streams in through the window.
there is an exit N to dining room
you see item toast
you see monster angry Hobgoblin

please enter instruction (verb, noun)
get toast
you pick up toast

To do

  • Methods are too long
  • Lacks game object

Learning points

  • Learned about class inheritance
  • Control flow and parsing text input
  • Rewriting the exercise was useful - improved each time