extends RigidBody2D

var force = 500

func _ready():
	var addition_result = add(10,5)
	print(addition_result)
	
	print(add(43,10)) #challenge - this was my answer
	

func _physics_process(delta):
	if Input.is_action_pressed("move_right"): # x+
		apply_force(Vector2(force,0))
	if Input.is_action_pressed("move_left"): # x-
		apply_force(Vector2(-force,0))
	if Input.is_action_pressed("move_down"): # y+
		apply_force(Vector2(0,force))
	if Input.is_action_pressed("move_up"): # y-
		apply_force(Vector2(0,-force))


func test():
	var t = 10
	return (t+10)




func add(param1,param2): #challenge
	return (param1 + param2)
	
	#var result = param1 + param2
	#return result 
	
