Skip to content

Instantly share code, notes, and snippets.

View H4ppy-04's full-sized avatar
๐Ÿˆ
Probably fighting a compiler

Joshua H4ppy-04

๐Ÿˆ
Probably fighting a compiler
View GitHub Profile
@H4ppy-04
H4ppy-04 / main.js
Created January 3, 2023 06:09
Javascript canvas template
function randint(a=0, b) {
/* Return random whole number between a and b */
return Math.floor(Math.random() * (b - a + 1)) + a;
}
function choice(list) {
/* Return positive integer to index list */
index = Math.abs(Math.floor(Math.random() * (list.length - 0 + 1)) - 1);
return list[index];
}
from __future__ import annotations
import sys
import os
import logging
from typing import Union
import pygame
from pygame.surface import Surface, SurfaceType
import util
@H4ppy-04
H4ppy-04 / main.py
Created June 7, 2022 02:38
pygame template file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
File: main.py
Author: Joshua Rose
Version: 0.1.0
Description: ...
"""
import os