Skip to content

Instantly share code, notes, and snippets.

View cppxor2arr's full-sized avatar

cppxor2arr cppxor2arr

View GitHub Profile
@cppxor2arr
cppxor2arr / particle.cpp
Last active March 20, 2018 14:38
SFML Partice Pulsation
#include <SFML/Graphics.hpp>
#include <cmath>
#include <utility>
#include <vector>
#include <functional>
class prog
{
public:
@cppxor2arr
cppxor2arr / rainbow.py
Created January 26, 2018 16:07
Python IRC Extended Color Code Gradient Rainbow Script
#!/usr/bin/env python3
import random, itertools
from sys import argv
def main():
num_color_hue, num_brightness, min_color, max_color = 12, 6, 16, 76
color_hue, brightness = random.randint(0, num_color_hue - 1), random.randint(0, num_brightness - 1)
direction1, direction2 = random.choice([ -1, 1 ]), random.choice([-1, 1])
color = next(itertools.islice(range(min_color + color_hue, max_color + 1 + color_hue, num_color_hue),
@cppxor2arr
cppxor2arr / gravity.cpp
Created August 26, 2017 05:25
SFML gravity simulator
#include <SFML/Graphics.hpp>
#include <cmath>
class prog
{
public:
prog();
prog(const float&, const float&, const sf::String&);
void open(const float&, const float&, const sf::String&);