extends Node

var points = 0

const minSpeed = 0.5
const maxSpeed = 0.15
var currentSpeed := minSpeed

var hasSelectedSpeed = false

const GRID := 64

enum BLOCKTYPES {LIGHT=1, HEAVY=3}

const BLOCKSPATTERS : Dictionary = {
	"Z": "res://scenes/Blocks/Patterns/Z/Z_block_pattern.tscn",
	"L": "res://scenes/Blocks/Patterns/L/L_block_pattern.tscn",
	"L-Reverse": "res://scenes/Blocks/Patterns/L-Reverse/L-Reverse_block_pattern.tscn",
	"Z-Reverse": "res://scenes/Blocks/Patterns/Z-Reverse/Z-Reverse_block_pattern.tscn",
	"2x2": "res://scenes/Blocks/Patterns/2x2/2x2_block_pattern.tscn",
	"T": "res://scenes/Blocks/Patterns/T/T_block_pattern.tscn",
	#"I": "res://scenes/Blocks/Patterns/I/I_block_pattern.tscn",
	"1x3": "res://scenes/Blocks/Patterns/1x3/1x3_block_pattern.tscn"
}
enum Direction {BOTTOM, LEFT, RIGHT, TOP}

var lastUID = 1

var currentUID = lastUID

var time = 60

var lost = false

func getNewUID() -> int:
	lastUID += 1
	return lastUID


func resetGame():
	lost = false
	points = 0
	lastUID = 0
	currentUID = lastUID
	time = 60
	lost = false

func _ready() -> void:
	resetGame()

func lose():
	lost = true
