MCPcopy Create free account
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/lib/level-generation.js:1125–1131  ·  view source on GitHub ↗
({ type, direction, distance, loopVariable, loopCount })

Source from the content-addressed store, hash-verified

1123
1124class Action {
1125 constructor ({ type, direction, distance, loopVariable, loopCount }) {
1126 this.type = type // 'move', 'hit', 'zap', 'spin', 'look', 'for'
1127 this.direction = direction // A Direction like 'up', 'down', 'left', 'right', or undefined for spin/for
1128 this.distance = distance
1129 this.loopVariable = loopVariable
1130 this.loopCount = loopCount
1131 }
1132
1133 clone () {
1134 return new Action({ type: this.type, direction: this.direction, distance: this.distance, loopVariable: this.loopVariable, loopCount: this.loopCount })

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected