Add a New Dependency
Learn how to add a new dependency in the game engine.
We'll cover the following...
The game engine
Now that we have a new Application to act as the web interface, we need to bring the game engine in as a dependency. The interface needs to have access to all the game logic we wrote so far in the course. In particular, it must be able to see all the public functions in the IslandsEngine.Game
module.
This works just like any other dependency in Elixir and is about as easy as it can possibly be. Only two steps are involved.
We need to compile IslandsEngine
with the rest of the project and start it when we start the IslandsInterface
Application.
Changes to mix.exs
To make :islands_engine
a compile-time dependency, we’ve added it to the deps/0
...