Skip to content

Commit

Permalink
✨ Add Wave Function Collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
matyo91 committed Sep 8, 2024
1 parent 6c1150c commit f9f6b60
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Controller/WaveFunctionCollapseController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

class WaveFunctionCollapseController extends AbstractController
{
#[Route('/wave/function/collapse', name: 'app_wave_function_collapse')]
public function index(): Response
{
return $this->render('wave_function_collapse/index.html.twig', [
'controller_name' => 'WaveFunctionCollapseController',
]);
}
}
20 changes: 20 additions & 0 deletions templates/wave_function_collapse/index.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}

{% block title %}Hello WaveFunctionCollapseController!{% endblock %}

{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>

<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>

This friendly message is coming from:
<ul>
<li>Your controller at <code>/Users/math/Sites/darkwood/flow-live/src/Controller/WaveFunctionCollapseController.php</code></li>
<li>Your template at <code>/Users/math/Sites/darkwood/flow-live/templates/wave_function_collapse/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

0 comments on commit f9f6b60

Please sign in to comment.