Skip to content

Instantly share code, notes, and snippets.

View NoodleSushi's full-sized avatar
🛌

Sine Sia NoodleSushi

🛌
View GitHub Profile
@NoodleSushi
NoodleSushi / cursed_tictactoe.rs
Created March 15, 2024 11:14
A cursed implementation of TicTacToe in Rust
use std::io;
struct Board(u32, String);
impl Board {
fn new() -> Board { Board(0, "".to_string()) }
fn run(&mut self) -> () {
loop {
loop {
self.0 &= 0x0FFFFF;
println!(" a b c\n ┌───┬───┬───┐");
while self.0 & 0xF00000 < 0x900000 {
@NoodleSushi
NoodleSushi / noodlibs.md
Last active June 18, 2024 15:17
Noodle's List of Libraries and Tools

Noodle's List of Libraries and Tools

A personally curated list of libraries and tools that I use!

Contents

#include <stdio.h>
#include <stdlib.h>
// SET INITIALIZATION
struct Set {
int *data;
int size;
};
from copy import deepcopy
SIZE = 5
ITEMS = SIZE * SIZE
table = [
[-1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1],
[-1, -1, -1, -1, -1],
@NoodleSushi
NoodleSushi / tictactoe.c
Last active March 16, 2023 08:21
Tic-Tac-Toe game written in C
#include <stdio.h>
void DrawBoard(int pieceMask, int playerMask);
int CheckWinner(int pieceMask, int playerMask);
int GetPlayerInput();
char Bit2OX(int bit);
void main()
{
int boardPieceMask = 0, boardPlayerMask = 0;
int player = 0;
@NoodleSushi
NoodleSushi / Set.gd
Last active February 17, 2024 02:08
GDScript Set Implementation
class_name Set extends RefCounted
## A custom implementation of a set data structure in GDScript.
##
## Usage Example:
## [codeblock]
## var mySet = Set.new([1, 2, 3])
## var otherSet = Set.new([2, 3, 4])
##
## var differenceSet = mySet.difference(otherSet)
## print(differenceSet.elements()) # Output: [1]
using Godot;
using System;
public static class Rhythmer
{
static double ASPTimeSec(AudioStreamPlayer ASP)
{
return ASP.GetPlaybackPosition() + GetPlayLatency();
}
import io
import re
import os as OS
import json as Json
import pyperclip
import math
from rectpack import newPacker
from rectpack.packer import Packer
from PIL import Image
from types import FunctionType
import os
import json
import re
import pyperclip
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
extends Object
class_name Rhythmer
class TimeSeeker:
var begin : float = 0
var delay : float = 0
func reset() -> void:
begin = OS.get_ticks_usec()
delay = AudioServer.get_time_to_next_mix() + AudioServer.get_output_latency()