Remove bloat, add level selector and some basic levels that just create input and outputs currently, no checking, make tool box invisible during screenshot

This commit is contained in:
csd4ni3l
2025-10-13 21:24:30 +02:00
parent 00fdbf7fe6
commit f4054fafa8
5 changed files with 99 additions and 14 deletions

View File

@@ -4,8 +4,13 @@ from utils.constants import menu_background_color
import pyglet.display
def lerp(a, b, t):
return a + (b - a) * t
def generate_task_text(level):
text = "Task: You need to use "
text += f"{', '.join([f'{requirement[0]} {requirement[1]} gate(s)' for requirement in level if not requirement[1] in ['INPUT', 'OUTPUT']])}"
text += f" to result in {', '.join([f'{requirement[0]} OUTPUT gate(s) with value {requirement[2]}' for requirement in level if requirement[1] == 'OUTPUT'])}"
return text
def cubic_bezier_point(p0, p1, p2, p3, t):
u = 1 - t