Code Monkey home page Code Monkey logo

elixir-scavanger-kata's Introduction

Scavanging Robots

(Wanted) Features

  • a robot can move forward on the map (advancing on the square in the direction it face)
  • a robot can turn left or right
  • a robot has a durability score of 10
  • a robot can scavange scrap on the map and gain 1 of durability each time
  • the map has a size and is like a "donut" aka a robot moving at the top appears at the bottom and at the left appears at the right (and vice versa)
  • a map can have multiple robots
  • robots knows where scrap or other robots are due to an old satelitte giving clue :)
  • (better idea ?) a robot can fight or collaborate with another robot when they meet on the same square with the following rules:
Stategy Attack Collaborate
Attack -5,-5 5,-5
Collaborate -5,5 3,3

Inspired by some Nash equilibrium and game thoery :D

US

As a robot, I want to move on the world to reach a destination
As a robot, I want to know where are scraps to pick them
As a robot, I want to pick scraps to increase my durability

schema of interaction

interaction pick scrap

Testing with Property Based Testing

Trying Quixir ? https://github.com/pragdave/quixir

Types

https://stackoverflow.com/questions/39243025/enums-in-elixir
https://stackoverflow.com/questions/29977776/what-does-type-t-module-mean-in-elixir
https://elixirschool.com/en/lessons/advanced/typespec/

Agent vs GenServer

https://stackoverflow.com/questions/57107324/when-to-use-agent-instead-of-genserver-in-elixir
https://awochna.com/2017/03/03/elixir-state-management.html
https://crypt.codemancers.com/posts/2020-08-28-real-world-usecase-for-genserver-agent-in-elixir/

Retro on the first try - 2021/04/01

retrospective
Actions

  • One driver by session
  • Write functional needs
  • Architecture schema for a strategic vision

Installation

If available in Hex, the package can be installed by adding treasure_hunter to your list of dependencies in mix.exs:

def deps do
  [
    {:treasure_hunter, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc

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.