Skip to content

zValidationHelperFunctions Documentation

Dan edited this page Nov 5, 2022 · 2 revisions

Library Source: Click Here

Functions

checkOneSprite(spriteIds)boolean

Category: HELLO WORLD

Checks if there is at least one sprite.

minimumSprites(spriteIds, n)boolean

Category: SPRITE LAB

Checks if there are a specified minimum number of sprites.

checkBackgroundChanged()boolean

Category: HELLO WORLD LEVEL

Checks if the background was changed.

checkSpriteLocations(spriteIds)boolean

Category: HELLO WORLD

Checks the locations of all sprites.

checkSpriteCostumes(spriteIds)boolean

Category: HELLO WORLD

Checks the costumes of all sprites.

checkMatchingSpriteCostumes(spriteIds)boolean

Category: SPRITE LAB

Checks the costumes of all sprites.

checkSpritesTouching(spriteIds)boolean

Category: HELLO WORLD

Checks if sprites are touching.

checkActiveSpeech(spriteIds)boolean

Category: HELLO WORLD LEVEL

Checks if any sprite has active speech.

checkTwoSprites(spriteIds)boolean

Checks if there are at least two sprites.

checkOneSprite(spriteIds) ⇒ boolean

Category: HELLO WORLD

Checks if there is at least one sprite.

Kind: global function
Returns: boolean - Returns true if there is at least one sprite and false otherwise.

Param Type Description
spriteIds array array of current active sprites

minimumSprites(spriteIds, n) ⇒ boolean

Category: SPRITE LAB

Checks if there are a specified minimum number of sprites.

Kind: global function
Returns: boolean - Returns true if there are at least n sprites and false otherwise.

Param Type Description
spriteIds array array of current active sprites
n number number of sprites to check

checkBackgroundChanged() ⇒ boolean

Category: HELLO WORLD LEVEL

Checks if the background was changed.

Kind: global function
Returns: boolean - Returns true if the background was changed and false otherwise.

checkSpriteLocations(spriteIds) ⇒ boolean

Category: HELLO WORLD

Checks the locations of all sprites.

Kind: global function
Returns: boolean - Returns true if all sprites have different locations and false otherwise.

Param Type Description
spriteIds array array of current active sprites

checkSpriteCostumes(spriteIds) ⇒ boolean

Category: HELLO WORLD

Checks the costumes of all sprites.

Kind: global function
Returns: boolean - Returns true if all sprites have different costumes and false otherwise.

Param Type Description
spriteIds array array of current active sprites

checkMatchingSpriteCostumes(spriteIds) ⇒ boolean

Category: SPRITE LAB

Checks the costumes of all sprites.

Kind: global function
Returns: boolean - Returns true if all sprites have the SAME costume and false otherwise.

Param Type Description
spriteIds array array of current active sprites

checkSpritesTouching(spriteIds) ⇒ boolean

Category: HELLO WORLD

Checks if sprites are touching.

Kind: global function
Returns: boolean - Returns true if no sprites are touching and false otherwise.

Param Type Description
spriteIds array array of current active sprites

checkActiveSpeech(spriteIds) ⇒ boolean

Category: HELLO WORLD LEVEL

Checks if any sprite has active speech.

Kind: global function
Returns: boolean - Returns true if any sprite has active speech and false otherwise.

Param Type Description
spriteIds array array of current active sprites

checkTwoSprites(spriteIds) ⇒ boolean

Checks if there are at least two sprites.

Kind: global function
Returns: boolean - Returns true if there are at least two sprites and false otherwise.

Param Type Description
spriteIds array array of current active sprites
Clone this wiki locally