Skip to content

Instantly share code, notes, and snippets.

View mbelicki's full-sized avatar

Mateusz Belicki mbelicki

View GitHub Profile
@mbelicki
mbelicki / stack.c
Created September 14, 2011 16:33 — forked from kgabis/stack.c
Linked stack in C
#include "..\Header\stack.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
void stackpush(Stack ** stack, int value)
{
assert(stack != NULL);
/* perhaps there is way to do it without this if ... else */
@mbelicki
mbelicki / happy.cpp
Created May 23, 2013 19:01
Bjarne Stroustrup has truly created the best obfuscation method ever.
#define private public
#include <iostream>
class Integer
{
int _value;
private:
Integer(int value = 0) : _value(value) {};
Integer operator+(const Integer&) const;
};
#include <iostream>
#include <SFML/Graphics.hpp>
#include <string>
#include "Constants.h"
#include "Paddle.h"
#include "Ball.h"
/* This class will hold the state of the game,
* the state will be used by initialize, render and update functions,
* because the functions will be chaning the state of the class defined below