Unofficial community resource. Not affiliated with, maintained by, or endorsed by WOWCube / Cubios Inc. Cubios Inc. does not guarantee the accuracy or completeness of this content. Official WOWCube Development Kit

WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelogDeveloper Toolkit
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.

Unofficial community resource. Not affiliated with, maintained by, or endorsed by WOWCube / Cubios Inc. Cubios Inc. does not guarantee the accuracy or completeness of this content. For official documentation and the SDK, see the WOWCube Development Kit.

Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. API
  4. scramble
Mission NodeSDK 6.1PawnAPI Reference

scramble

PawnLibs/scramble Summary A helper library that facilitates level initialization. Description This library contains several useful utilities which simulate c...

API / SDK 6.1 / Pawn / API Reference
VersionSDK 6.3SDK 6.2SDK 6.1
Report issue

PawnLibs/scramble

Summary

A helper library that facilitates level initialization.

Description

This library contains several useful utilities which simulate cube twists. An application can initialize its inner state data with wining condition and do some virtual twists to prepare initial arrangement for player like deck shuffling or Rubik'c cube scramble.

To use this library several functions have to be defined:

  • RememberDataBeforeTwist()
  • SetDataAfterTwist(moduleTo, screenTo, moduleFrom, screenFrom)
  • VirtualTwist(twist[TOPOLOGY_TWIST_INFO])

TBD - add detailed descriptions of required functions

Example

TBD - add example description

scramble
PAWN
1 new mapping[MODULES_MAX][SCREENS_MAX];
2 new mappingTemp[MODULES_MAX][SCREENS_MAX];
3
4 RememberDataBeforeTwist() {
5 // Back up current mapping
6 mappingTemp = mapping;
7 }
8
9 SetDataAfterTwist(moduleTo, screenTo, moduleFrom, screenFrom) {
10 // Fill mapping according to the new topology after twise
11 mapping[moduleTo][screenTo] = mappingTemp[moduleFrom][screenFrom];
12 }
13
14 VirtualTwist(twist[TOPOLOGY_TWIST_INFO]) {
15 // Additional handling of virtual twist if necessary
16 myTwist = twist;
17 }
18
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

PawnLibs/scramble/Scramble

Summary

Scramble the cube randomly the specified number of times.

Synopsis

scramble
PAWN
1Scramble(twistsCount)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • twistsCount - how many times to twist the cube for scramble

PawnLibs/scramble/ScrambleRotate

Summary

Twist the cube around some screen in a specified direction.

Synopsis

scramble
PAWN
1ScrambleRotate(scr, dir)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Inputs

  • scr - a screen to twist around
  • dir - a direction of the twist

Trust & provenance

Document status

Source
Scramble · installed SDK headers
Classification
API reference
Verification
Community-maintained · verify against installed SDK

Catalog updated Oct 20, 2018

Structured index

Symbols on this page

Names and signatures are extracted from this SDK-derived page. Signature hashes detect accidental changes.

scrambleMember
ScrambleMember
ScrambleRotateMember

Used in SDK snippets

scramble→ScrambleApp.cppscramble→ScrambleApp.cppscramble→ScrambleApp.cppScramble→MyScramble.hScramble→wowcubeapp-build.json
Jump Grid

On This Page

PawnLibs/scramblePawnLibs/scramble/ScramblePawnLibs/scramble/ScrambleRotate
Back to top ↑
Context Rail

Related nodes

SELF\ ID
API / SDK 6.1 / Pawn / API Reference
graphics
API / SDK 6.1 / Pawn / API Reference
SND\ cacheSounds
API / SDK 6.1 / Pawn / API Reference
topology
API / SDK 6.1 / Pawn / API Reference
Previous Node
log
API / SDK 6.1 / Pawn / API Reference
Next Node
network
API / SDK 6.1 / Pawn / API Reference