kittkat.xyz

System Solve

About

GitHub

Goals

Make a fun game which teaches basic coding concepts to anyone who has no previous experience, but wants to learn. This project was originally created as a final project for App State Software Engineering (CS3667).

Authors

User Guide

Comments

Comments allow for leaving notes in the code without affecting the code. Any line that starts with # will be ignored as code, and will not be run. This means that # moveU will not run. Allowing us to add documentation into our code without affecting how it runs.

Example


# In this case, we can say what the code is doing without interupting the code.
# This code will move the character up three times
moveU
moveU
moveU
			

Movement Components

Controls the movement of the character.
Every time one of these Components is run, the character will attempt to move in the designated direction.

Components

moveU Move the character one tile up
moveD Move the character one tile down
moveL Move the character one tile left
moveR Move the player one tile right

Example


# Move the character up twice, then left twice, then down once.
moveU
moveU
moveL
moveL
moveD
		

Conditions

A condition is a true or false value depending one some condition. These conditions are used in if statements and while loops to determine its behavior. If the condition for the if statement is true, then the if statement will run, otherwise the if's code will be skipped. If statements can also be negated by using ! in front of the condition. For example isOnGoal is true if the player is on the goal, however !isOnGoal is true if the player is NOT on the goal.

Components

true Always true
false Always false, same as !TRUE
canMoveU Is true if the player can move up
canMoveD Is true if the player can move down
canMoveL Is true if the player can move left
canMoveR Is true if the player can move right
isOnGoal Is true if the character is on the goal, or the map has no goal.

Example


# Move the character up only if the player can move up
if canMoveU:
	moveU
fi

# Move the character left if the plater CANNOT move right
if !canMoveR:
	moveL
fi
		

If statements

If statements control what code runs depenting on a given condition. For example, if you only want to mode left if you can move left. You could use an if statement to check if you can move left, and if so, run the code to move left.

Components

If statements are made of several different components.
if Signifies that this is an if statement
# CONDITION: The condition in the if statement
fi Signifies the end of the if statement

If statements are constructed:

# Begenning of if code (replace 'CONDITION' with the actual condition, but keep the ':')
if CONDITION:
	# code
	# code
	# code
# End of if code block
fi
		

Example


if canMoveU:
	moveU
fi
		

While loops

Components

Example


while canMoveU:
	moveU
elihw