Coder Social home page Coder Social logo

highway's Introduction

Warning
=======
This game is not finished!

Installation
============
$ git clone git://github.com/ollie/highway.git
$ cd highway
$ bundle install

Running the game
================
$ ruby init.rb --help
Options:
  --map, -m <s>:   Which map to load? Defaults to map/001.txt. (Default: maps/001.txt)
  --pos, -p <s>:   Start at which position? For example "19,29" starts at row 19 column 29.
     --help, -h:   Show this message

$ ruby init.rb                                 # Start from the beginning
$ ruby init.rb -m maps/002.txt                 # Start in level 2
$ ruby init.rb --map=maps/002.txt              # Same thing
$ ruby init.rb -p 10,20                        # Start from the beginning on row 10 column 20
$ ruby init.rb --pos=10,20                     # Same thing
$ ruby init.rb -m maps/002.txt -p 15,10        # Start in level 2 on row 15, column 20
$ ruby init.rb --map=maps/002.txt --pos=15,10  # Same thing

Note: GitHub breaks the ASCII image.
┌─┬──────────────────────────────────────────┐
│ │                 Level 1                  │
│ │012345678901234567890123456789012345678901│
├─┼──────────────────────────────────────────┤
│0│       │                                  │
│1│       │                                  │
│2│       │                                  │
│3│       │                                  │
│4│       │                                  │
│5│       │                                  │
│6│       │                     ┌────────────│
│7│       │                     │            │
│8│       │                     │            │
│9│       │                     │            │
│0│       └────────▒────────────┤            │
│1│                             │            │
│2│                             │            │
│3│                             │            │
│4│                             │            │
│5│                             ▓            │
│6│                             │            │
│7│                             │            │
│8│                             │            │
│9│                             │            │
└─┴──────────────────────────────────────────┘
Fuel: 100 %
Position: [15, 29]
Which way to go? [wsadq]:

TODO
====
Add meta info to maps
 * So they know about each other.
 * Define starting position.
Refactor ugly code.
Use Curses?
Print legend?

Maps
====
x - Road
S - Fuel station

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.