This file contains hidden or 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 <random> | |
#include <vector> | |
const float kSquareSize = 32.f; | |
const int kBoardWidthCells = 10; | |
const int kBoardHeightCells = 10; | |
const int kUpdatesPerTick = 20; |
This file contains hidden or 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
/* | |
* File: main.cpp | |
* Author: frex | |
* | |
* Created on February 19, 2016, 9:56 PM | |
*/ | |
#include <vector> | |
#include <string> | |
#include <iostream> |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
unsigned fnv_hash(const char * str) | |
{ | |
unsigned hash = 2166136261u; | |
unsigned i; | |
for (i = 0u; str[i]; ++i) | |
hash = (hash * 16777619u) ^ str[i]; | |
This file contains hidden or 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
program watergold; | |
uses math; | |
var | |
gold : array [1..500] of Integer; | |
chains : array [1..1000] of record | |
a, b : Integer; | |
end; | |
e, v, i, j : Integer; | |
best2, best3, best4 : Integer; | |
connected : array[1..1000, 1..1000] of boolean; |
This file contains hidden or 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
unit SFUtils; | |
{$mode objfpc}{$H+} | |
interface | |
uses | |
Classes, SysUtils; | |
type |
NewerOlder