https://github.com/elct9620/elixir-mud
Elixir TCP Server practice
https://github.com/elct9620/elixir-mud
dsl elixir ruby
Last synced: about 1 month ago
JSON representation
Elixir TCP Server practice
- Host: GitHub
- URL: https://github.com/elct9620/elixir-mud
- Owner: elct9620
- Created: 2020-03-03T17:53:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T06:22:43.000Z (over 6 years ago)
- Last Synced: 2025-10-08T21:42:23.594Z (9 months ago)
- Topics: dsl, elixir, ruby
- Language: Elixir
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Elixir MUD
===
Use Ruby as DSL backend to generate story and handle TCP connection by Elixir
## Installation
Use `mix deps.get` to install
## Usage
Start server by `mix run --no-halt`
Connect to game by `telnet localhost 6666`
## Write Story in Ruby
```ruby
# stories/chapter1.rb
# Create a chapter
chapter 1 do
# Create an action
action do # Index: 0
say "Hi, Welcome to Elixir.MUD" # Print message
say "Do you want to continue?(Y/n)"
jump 1 # Jump to Index: 1
wait_input # Display "> " to user
end
action do # Index: 1
say "Cool, you learned how to create a MUD"
close # Close connection to end the game
end
end
```