Skip to content

Instantly share code, notes, and snippets.

View syegulalp's full-sized avatar

Serdar Yegulalp syegulalp

View GitHub Profile
@syegulalp
syegulalp / modal_game.py
Created September 9, 2024 14:33
Simple modal game demo
# Simple example of a game with multiple modes.
# THe only dependency is pygame-ce.
# This code is in the public domain.
# Use it as you see fit.
import random
import pygame
pygame.init()
screen = pygame.display.set_mode((720, 720))
@syegulalp
syegulalp / winapp.py
Last active November 12, 2024 17:18 — forked from mouseroot/winapp.py
Win32 CreateWindow example in python
# Adapted for Python 3.6 + 64-bit Windows
from ctypes import *
from ctypes.wintypes import *
WNDPROCTYPE = WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM)
WS_EX_APPWINDOW = 0x40000
WS_OVERLAPPEDWINDOW = 0xcf0000
WS_CAPTION = 0xc00000
@syegulalp
syegulalp / gist:14cfd2b457589a520b87a75a5491cbaa
Last active February 3, 2018 00:45
MVP goals for Akilang
  • REPL.
  • Primitive numerical types: int, float, boolean.
    • Cast and convert operations for primitive numerical types.
    • Type checking for basic assignment operations.
    • Type checking for math.
  • Support for basic logic and keywords:
    • def
    • do
    • if / then / else
  • when / then / else