Requires
- git
- nodejs (npm)
Create the project:
PROJECT="my-project-name"
mkdir "$PROJECT"| var fs = require('fs'); | |
| var map = {}; | |
| var seen = {}; | |
| function go(module, indent) { | |
| if (!!seen[module]) return; | |
| console.log(indent + module); |
| import Html exposing (..) | |
| import Dict exposing (Dict) | |
| type alias Board = | |
| { tiles : Dict (Int, Int) Int | |
| , empty : (Int, Int) | |
| } | |
| newBoard = |
Requires
Create the project:
PROJECT="my-project-name"
mkdir "$PROJECT"| class Game { | |
| int ballX = 0; | |
| int ballY = 0; | |
| int ballYSpeed = 3; | |
| int paddleX = 30; | |
| int paddleY = 500; | |
| public void update() { | |
| ballX = ballX + 5; | |
| ballY = ballY + ballYSpeed; |
| class Game { | |
| int ballX = 0; | |
| int ballY = 0; | |
| public void draw(Graphics g) { | |
| // draw the background | |
| g.setColor(new Color(178, 223, 224)); | |
| g.fillRect(0, 0, 800, 600); | |
| // draw the ball |
| class Game { | |
| int ballX = 0; | |
| int ballY = 0; | |
| public void update() { | |
| ballX = ballX + 5; | |
| ballY = ballY + 5; | |
| } | |
| } |
| import Json.Decode as Decode | |
| decodeClickLocation : Decode.Decoder (Int,Int) | |
| decodeClickLocation = | |
| Decode.object2 (,) | |
| (Decode.object2 (-) | |
| (Decode.at ["pageX"] Decode.int) | |
| (Decode.at ["target", "offsetLeft"] Decode.int) | |
| ) | |
| (Decode.object2 (-) |
| -- Only works with Elm 0.15 | |
| import Html | |
| import Task | |
| import Port | |
| import Debug | |
| import Dict | |
| import Time | |
| -- MODEL |
| -- -- -- type definitions | |
| type Outline = Outline | |
| { title : String | |
| , description: String | |
| , inbox : List Outline | |
| , children : List Outline | |
| } | |
| type OutlineCrumb |
| import Color | |
| import Mouse | |
| e (col,text) = plainText text |> color col |> width 400 | |
| type Model = [(Color, String)] | |
| model : Model | |
| model = | |
| [ (Color.red, "short") |