Giter Site home page Giter Site logo

learning-rust's Introduction

Learning Rust via Ruby

A text-based adventure game being built in Rust and Ruby (simultaneously)

If you want to play it:

  1. clone this repository
  2. cd into it (i.e. enter cd learning-rust in your terminal)
  3. for the Ruby version: enter ruby lib/main.rb in your terminal and hit return. For the Rust version: enter cargo run in your terminal and hit return
  4. play :)

The actual narrative still needs to be ported over & some prettifying still needs to happen, but you can play a super simplistic placeholder game right now. Both games should basically work at this point, but please submit an issue if you notice something's broken! The Ruby side seems to be especially fragile.

Built mostly by @lbaillie with help from @wycats

Contributing

Contributions are welcome! Check out the issues for what's currently needed and comment on any issue you might be interested in. I'm happy to help guide you if you need help :D

learning-rust's People

Contributors

barabadzhi avatar wycats avatar zackmdavis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learning-rust's Issues

Fix Ruby Game.take and Player.remove_from_inventory

Ruby Game.take and Player.remove_from_inventory methods don't break anymore, but NPC/Player inventory item is not removed (should be removed). This bug allows players to keep taking the same items from the same NPCs and using them over and over. Not the end of the world, but not great.

Add tests

There are some very outdated tests on the Rust side and zero tests on the Ruby side. Should probably just write tests from scratch at this point, for both sides. Any tests at all would be great! I've tried to figure out how to test console output specifically but haven't figure out a solution yet.

Make real maps!

Make the map in both games an actual map and not just a list of room names. This means some sort of printed display that shows the room layout and maybe the room name inside.

Format Rust game more neatly

Currently for things like look around we kind of just spit out the available objects and it's pretty ugly.

This room contains: [InventoryItem { count: 1, name: "dog potion", effects: "this potion has turned you into a C00L d0g!" }]

Yuck! Make it look more like:

This room contains 1 dog potion.

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.