Coder Social home page Coder Social logo

life_view's Introduction

LiveView's Game of Life

A Phoenix LiveView implementation of Conway's Game of Life.

ezgif-7-2fad6e52d271

Details

Life is an umbrella application in order to better separate the core game context (Life) from the interface (LifeWeb). In this way, it's easier to extract the core implementation to use with other interfaces (like terminal or a different framework).

The main modules are Life.Grid (game core functions) and LifeWeb.PageLive (LiveView implementation). For now the initial input comes from the configuration defined inside config/grid.exs. As we only keep track of the alive cells, all you need to do to change the initial input is to add the two-dimensional alive positions as tuples to the List.

To-do

  • Show the current generation count
  • Add Start/Pause/Reset buttons
  • Enable initial input editing from the webpage
  • Add tick speed controls
  • Improve style

Running

  • Install dependencies with mix deps.get
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

life_view's People

Contributors

gchapim avatar

Stargazers

Thiago Della Libera Moreira avatar Rolf Håvard Blindheim avatar

Watchers

 avatar

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.