Skip to content

chandley/Adventure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

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

About

Pre-course adventure game exercise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages