Git Product home page Git Product logo

maze's Introduction

Maze

Epicodus Project in Ruby, 9/12/17

By Kelsey Langlois and L. Devin MacKrell

Description

A Ruby Script

Setup/Installation Requirements

  • Clone this repository

Specifications

Room

  • Room stores which sides have doors and which have walls.
    • Example input: entry_room
    • Example output: {"north" => "wall", "east" => "door", "west" => "wall", "south" => "wall"}
  • Room stores its location (0-indexed, from Northwest corner of maze)
    • Example input: entry_room
    • Example output: [1, 0]
  • Room allows user to look in a direction.
    • Example input: entry_room.look("east")
    • Example output: "There is a door."
  • Room does not allow user to exit through a wall.
    • Example input: entry_room.exit("north")
    • Example output: "You cannot do that."
  • Room allows user to exit through a door, and returns coordinates of next room.
    • Example input: entry_room.exit("east")
    • Example output: [2, 0]

Maze

  • Maze stores all rooms in maze.
    • Example input: room_0_0, room_0_1, room_1_0, room_1_1
    • Example output: [[room_0_0, room_0_1], [room_1_0, room_1_1]]
  • Maze stores the room the user is in.
    • Example input: maze.location()
    • Example output: "room_0_1"
  • Maze does not allow movement to a room that does not exist.
    • Example input: maze.move([9, 8])
    • Example output: "You cannot do that."
  • Maze allows movement to a room that exists, based on its coordinates.
    • Example input: maze.move([0, 1])
    • Example output: "You are now in room_0_1"
  • Maze knows when it has been solved.
    • Example input: maze.move([3, 4])
    • Example output: "You have reached the maze's end!"

Support and contact details

Please contact [email protected] or [email protected] with questions, comments, or issues.

Technologies Used

  • Ruby

License

Copyright (c) 2017 Kelsey Langlois & L. Devin MacKrell

This software is licensed under the MIT license.

maze's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.