Skip to content

Programming Concepts

Josh Callebaut edited this page Feb 2, 2016 · 2 revisions

Algorithms

Used in the later levels when covering a 'classical' algorithm problem. Fizzbuzz, solving a maze, and array sorting would fall under this concept.

Advanced Strings

This concept comes into play when performing actions on strings. For example: getting a string length, adding strings, splicing strings.

Arguments

When passing a value into a function, this concept is employed. this.moveRight(2), this.cleave(enemy), etc.

Arithmetic

Any sort of addition/subtraction/multiplication/division of numbers. nextStep = self.pos.x + 1, midX = (a.x + b.x) / 2.

Arrays

If the level includes arrays in any way. var enemies = this.findEnemies(), var friendNames = ['Molly', 'Bolly', 'Holly'].

Basic Syntax

All levels teach basic syntax. What do you think this is? Block-based programming?

Boolean Logic

If the level specifically goes into True/False instead of using Thruthy/Falsey behaviors of elements. Not: if enemy:.

Break Statements

Include this if the level covers breaking out of a loop prematurely.

Classes

If the player is required to create their own classes inside of CodeCombat.

Continue Statements

This is for levels that cover continue.

For Loops

If the level focuses on using for-loops. Note, some late desert levels use while-loops with a manual index, so be sure to place your level appropriately.

Functions

When the user creates their own functions in a level. (See: Late Mountain levels.)

Graphics

If the user is drawing in some way. (See: Flowers.)

If Statements

Include when the level uses if-statements. (Pretty much all levels after early forest.)

Input Handling

Currently this covers flag-input.

Math Operations

Arithmetic covers +/-/*//, but, Math operations is for the Math library. Math.pow(,), Math.sin(), Math.acos().

Object Literals

If the user creates

Parameters

Include this if the user creates functions which take an argument. function foo(_bar).

Strings

Simple string variables. If a level has "this is a string", it probably needs this concept.

Variables

Declaring any variables. So, that's probably a lot of levels.

While Loops

This covers both simple main-loops as well as more complex optimization loops. If it says while, it is a while-loop.

Vectors

Includes all levels which make use of Vector math. Adding, subtracting, dot products, etc.

Recursion

If a player is responsible for creating a self-referencing function.

Clone this wiki locally