A standalone, grid-based game that players can join, move around on and attack each other. This can be run on any client, although this Phoenix application is recommended as a good online interface. There is a GameDisplay
module for working in the console when developing the application itself.
Add the following line to your to your list of dependencies in mix.exs
:
def deps do
[
{:adventure_time, git: "[email protected]:felixfortis/adventure_time.git", tag: "0.1.0"}
]
end
- Create a few heroes:
iex> AdventureTime.HeroSupervisor.start_hero("test_hero_1")
iex> AdventureTime.HeroSupervisor.start_hero("test_hero_2")
- Use the
GameDisplay
module in the console for a basic view of the game from the point of view of the passed in hero:
iex> AdventureTime.GameDisplay.render_game("test_hero_1")
- Make changes to the heroes and render the game again to see the results:
# Note that heroes can only move one tile at a time, and only on "walkable" tiles.
# Consult AdventureTime.Arena.arena() to see which tiles are walkable and what their tile_refs are.
# This assumes that "test_hero_1" is somewhere like {4, 6} and wants to move up one tile to {3, 6}
iex> AdventureTime.HeroServer.move_to("test_hero_1", {3, 6})
iex> AdventureTime.GameDisplay.render_game("test_hero_1")
- Clone the project to your development machine
- Install dependencies with
mix deps.get
- Run the tests with
mix test