Skip to content

Instantly share code, notes, and snippets.

#include <iomanip>
#include <iostream>
#include <vector>
#include <random>
#ifdef __linux__
/*****************************************************************************
kbhit() and getch() for Linux/UNIX
Chris Giese <geezer@execpc.com> http://my.execpc.com/~geezer
Release date: ?
#include <iostream>
#include <vector>
#include <algorithm>
#include <random>
#if defined(__linux__) || defined(__APPLE__)
/*****************************************************************************
kbhit() and getch() for Linux/UNIX
Chris Giese <geezer@execpc.com> http://my.execpc.com/~geezer
Release date: ?
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <cassert>
#include <iterator>
template<typename Container>
class Columniterator : public std::iterator<std::random_access_iterator_tag,
typename std::decay<decltype(std::declval<Container>()[0][0])>::type>
#include <iostream>
#include <vector>
#include <algorithm>
#include <random>
#include <memory>
#include <chrono>
#include "utility.h"
using Matrix = std::vector<std::vector<int>>;
#pragma once
/**
* File: rlutil.h
*
* About: Description
* This file provides some useful utilities for console mode
* roguelike game development with C and C++. It is aimed to
* be cross-platform (at least Windows and Linux).
*
#include <iostream>
#include <vector>
#include <algorithm>
void printVect(const std::vector<int> path) {
for( std::vector<int>::const_iterator i = path.begin(); i != path.end(); ++i) {
std::cout << *i << ' ';
}
std::cout << "\n";
#include <SFML/Graphics.hpp>
#include <array>
#include <cmath>
struct P
{
struct Screen
{
float x, y, w, scale;
}screen;
#include <iostream>
#include <iterator>
#include <algorithm>
#include <cstddef>
#include <stdexcept>
template <typename T>
class List
{
#include <iostream>
#include <exception>
class Money
{
public:
Money(float amount = 0);
// Money only has integer types. It doesn't manage any memory.
#include <iostream>
#include <exception>
class Money
{
public:
Money(uint64_t amount = 0);
// c++98