online multiplayer chess game (note server currently down)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
extends Node
class_name Log


static func info(information) -> void:  # logs the input string
	print(to_str(information))


static func debug(information) -> void:  # logs the input string on debug builds
	if OS.is_debug_build():
		print(to_str(information))


static func err(information) -> void:  # logs the input string to stderr
	printerr(information)


static func to_str(arg) -> String:
	if typeof(arg) == TYPE_ARRAY:
		return arr2str(arg)
	elif typeof(arg) == TYPE_STRING:
		return arg
	else:
		err("Called with invalid arguments")
		return ""


static func arr2str(arr: Array) -> String:
	var string = ""
	for i in arr:
		string += str(i) + " "
	return string