Skip to content

Instantly share code, notes, and snippets.

View alpinus4's full-sized avatar

Mateusz Grzonka alpinus4

View GitHub Profile
@alpinus4
alpinus4 / state_machine.py
Created August 30, 2023 21:12
Simple python state machine
from typing import Union
from enum import Enum
from typing import Callable
from abc import ABC, abstractmethod
class Transition:
def __init__(self, from_state: Union[str, Enum], to_state: Union[str, Enum], condition_func: Callable[[], bool]):
self.from_state = from_state
self.to_state = to_state
[Desktop Entry]
Name=Aseprite
Comment=Animated Sprite Editor & Pixel Art Tool
Exec=/opt/Aseprite/bin/aseprite
Icon=/opt/Aseprite/share/aseprite/data/icons/ase.ico
Terminal=false
Type=Application
Categories=Graphics;Art;