stevegrossi / sengoku

An online Risk-like game built with Elixir and Phoenix LiveView
https://www.playsengoku.com/
60 stars 3 forks source link

A new LiveView tool to help with building boards #70

Closed stevegrossi closed 4 years ago

stevegrossi commented 4 years ago
Screen Shot 2020-06-06 at 3 34 08 PM

I've been using this tool to build hex grids for the game's maps, but would like to add something to Sengoku to help with this. This PR introduces a new LiveView at /builder that lets you "paint" the board with the different regions. You still have to manually enter the board data in lib/sengoku/board.ex for now...

This PR also updates the Board module to no longer require passing the board's tiles under both regions: and tiles: keys. The tiles: key is now built from the tiles in the regions: key, since every tile must belong to a region.

Soon

I'd eventually like the ability to export a board, either to a database or a string you could paste in when creating a new game in order to play on a custom board. This is being tracked in #71

And a new board! 🐉

What good is a board builder if I'm not going to use it, so in the screenshot above you can see my attempt as a new "Westeros" map with lots of connections, based on this image I found online:

Screen Shot 2020-06-06 at 3 35 32 PM

It's a bit awkwardly compressed, particularly in The North, but fun!