-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#7 Add randomization of upcoming tetroid on startup.
- Loading branch information
Showing
6 changed files
with
43 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
module Tetris exposing (main) | ||
|
||
import Browser | ||
import Messages exposing (Msg) | ||
import Model exposing (Model, initialModel) | ||
import Update exposing (Msg, update) | ||
import Update exposing (update) | ||
import View exposing (view) | ||
|
||
|
||
main : Program () Model Msg | ||
main = | ||
Browser.element | ||
{ init = \_ -> ( initialModel, Cmd.none ) | ||
{ init = \_ -> initialModel | ||
, subscriptions = \_ -> Sub.none | ||
, view = View.view | ||
, update = \msg model -> ( Update.update msg model, Cmd.none ) | ||
, update = \msg model -> update msg model | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
module Update exposing (Msg(..), update) | ||
module Update exposing (update) | ||
|
||
import Messages exposing (Msg(..)) | ||
import Model exposing (Model) | ||
|
||
|
||
|
||
-- Just placeholder. Will be placed in Messages.elm asap. | ||
|
||
|
||
type Msg | ||
= NoOp | ||
|
||
|
||
update : Msg -> Model -> Model | ||
update : Msg -> Model -> ( Model, Cmd Msg ) | ||
update msg model = | ||
model | ||
case msg of | ||
Start tetroid -> | ||
( { model | upcomingTetroid = Just tetroid }, Cmd.none ) | ||
|
||
_ -> | ||
( model, Cmd.none ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters