This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <random> | |
#include <memory> | |
#include <chrono> | |
#include "utility.h" | |
using Matrix = std::vector<std::vector<int>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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). | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Graphics.hpp> | |
#include <array> | |
#include <cmath> | |
struct P | |
{ | |
struct Screen | |
{ | |
float x, y, w, scale; | |
}screen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iterator> | |
#include <algorithm> | |
#include <cstddef> | |
#include <stdexcept> | |
template <typename T> | |
class List | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <exception> | |
class Money | |
{ | |
public: | |
Money(float amount = 0); | |
// Money only has integer types. It doesn't manage any memory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <exception> | |
class Money | |
{ | |
public: | |
Money(uint64_t amount = 0); | |
// c++98 |
OlderNewer