Skip to content

Instantly share code, notes, and snippets.

View FRex's full-sized avatar

Błażej Roszkowski FRex

View GitHub Profile
#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;
/*
* File: main.cpp
* Author: frex
*
* Created on February 19, 2016, 9:56 PM
*/
#include <vector>
#include <string>
#include <iostream>
#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];
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;
unit SFUtils;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type