bouncing-crusher
Safe HaskellNone
LanguageHaskell2010

MapEditor

Synopsis

Documentation

data MapEditorState #

A data structure to hold the state of the map editor.

Constructors

Game 

Fields

Instances

Instances details
Show MapEditorState # 
Instance details

Defined in MapEditor

changeIndex #

Arguments

:: Int

Current index.

-> Int

Delta for addition.

-> Int

Current length of backgroundFiles.

-> Int

New index.

Retrun index after performing and addition operation with delta

changeRadius #

Arguments

:: Maybe EnemyPeg

Current ball.

-> Float

Delta.

-> Maybe EnemyPeg

New ball with changed radius.

Change radius of ball on delta.

changeBallType #

Arguments

:: Maybe EnemyPeg

Current ball.

-> Int

Delta.

-> Maybe EnemyPeg

New ball with changed durability.

Change durability of ball with its type.

inBoundaries #

Arguments

:: Coords

Coordinates to check.

-> Float

Radidius of ball.

-> Bool

Result value of check.

Check weather ball with Coords is in boundaries.

handleKeys #

Arguments

:: Event

Event.

-> MapEditorState

Current state of map editor.

-> MapEditorState

New map state of map editor.

Change background on previous picture with arrow Left.

emptyMap :: MapInfo #

Empty map info.

editorStateFrom #

Arguments

:: MapInfo

Input MapInfo.

-> MetaInfo

Input MetaInfo.

-> [String]

Input array of picture names.

-> MapEditorState

Output MapEditorState.

Get editor state from map, and meta-info.

render #

Arguments

:: MapEditorState

The map state to render.

-> Picture

The output picture.

Renderer of MapEditorState.

update #

Update the game by moving the ball.

moveCurBall #

Arguments

:: MapEditorState

MapEditorState before move.

-> MapEditorState

MapEditorState after move.

Move current ball using current mouse position.