Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new LessonTwoCpSix(ctx: CanvasRenderingContext2D, editor: Editor): LessonTwoCpSix

Properties

_constraint

_constraint: string = "code"

_goal

_goal: any

Optional _instrBoxes

_instrBoxes: Instruction[] = []

Optional _instrIndex

_instrIndex: number = 0

_instructions

_instructions: string = `<p>Lesson 2 - Checkpoint 6</p>` +`<p>GOAL: Enlarge one of the circles referred to by c on the CANVAS.</p>`

_latestInstrIndex

_latestInstrIndex: number = 1

_name

_name: string = "l2c6"

_starterCode

_starterCode: "a = emoji("angry", 100, 100);b = emoji("cool", 100, 100);c = emoji("pirate", 75, 75);print(c, 100, 100);print(c, 300, 100)" = `a = emoji("angry", 100, 100);b = emoji("cool", 100, 100);c = emoji("pirate", 75, 75);print(c, 100, 100);print(c, 300, 100)`

ctx

ctx: CanvasRenderingContext2D

editor

editor: Editor

font_size

font_size: number = 20

square_size

square_size: number = 250

x

x: number = 25

y

y: number = 25

Accessors

instructions

  • get instructions(): string

name

  • get name(): string

numInstructions

  • get numInstructions(): number

Methods

checkGoal

  • checkGoal(document: Document, effects: Effect<any>[]): boolean
  • A lesson on using variables in multiple places in the scope, taught using DM

    Parameters

    • document: Document

      the HTML document

    • effects: Effect<any>[]

      the list of effects currently on the CANVAS

    Returns boolean

drawGuides

  • drawGuides(): void

renderInstruction

  • renderInstruction(document: Document): void

renderLatestInstruction

  • renderLatestInstruction(document: Document): void

renderNextInstruction

  • renderNextInstruction(document: Document): void

renderPrevInstruction

  • renderPrevInstruction(document: Document): void

skipInstructions

  • skipInstructions(document: Document): boolean

Generated using TypeDoc