course

package module
v0.0.0-...-c936166 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2020 License: MIT Imports: 9 Imported by: 1

README

course

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block int

type Course

type Course struct {
	Live            bool
	HasPass         bool
	Title           string
	Note            string
	GameMode        string
	Credits         []string
	Gravity         float64
	MaxTime         int
	MinRank         int
	Song            int
	CowboyChance    int
	Items           []int
	BackgroundColor color.Color
	BackgroundImage int

	Blocks                                  Layer
	Line00, Line0, Line1, Line2, Line3      Layer
	Stamp00, Stamp0, Stamp1, Stamp2, Stamp3 Layer

	Pass string
	// contains filtered or unexported fields
}

func Default

func Default() *Course

Default level as in PR2 level editor.

func Parse

func Parse(data string) (*Course, error)

Parse a course from a data string.

func (*Course) String

func (c *Course) String(user, token string) string

String returns a formatted course that can be uploaded to PR2.

func (*Course) Upload

func (c *Course) Upload(user, token string) string

type Layer

type Layer map[XY][]interface{}

func (Layer) Get

func (l Layer) Get(x, y int) ([]interface{}, bool)

func (Layer) Peek

func (l Layer) Peek(x, y int) (interface{}, bool)

func (Layer) Pop

func (l Layer) Pop(x, y int) interface{}

func (Layer) Push

func (l Layer) Push(x, y int, obj interface{})

type Line

type Line struct {
	Erase     bool
	Thickness int
	Color     color.RGBA
	Segments  []XY
}

type Stamp

type Stamp struct {
	Type           int
	ScaleX, ScaleY float64
}

type Text

type Text struct {
	Content        string
	ScaleX, ScaleY float64
	Color          color.RGBA
}

type XY

type XY struct{ X, Y int }

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL