Skip to content

Instantly share code, notes, and snippets.

@towc
towc / index.html
Created February 9, 2019 14:49
Pacman
<canvas id=c></canvas>
<p>Calculating and prerendering...</p>
#include <chrono>
#include <thread>
#include <cstdlib>
#include <math.h>
#include "render.cpp"
#define PI 3.14159265
int main() {
int i = 0;
[1518-11-22 00:49] wakes up
[1518-05-18 00:01] Guard #1171 begins shift
[1518-11-20 00:28] wakes up
[1518-10-27 00:37] wakes up
[1518-08-14 00:39] falls asleep
[1518-09-08 00:51] falls asleep
[1518-07-27 00:57] wakes up
[1518-10-21 00:00] Guard #2699 begins shift
[1518-09-09 00:16] falls asleep
[1518-03-21 00:51] wakes up
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <map>
#include <memory>
struct InputLine {
int min;
std::string text;
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <map>
#include <memory>
struct InputLine {
int min;
std::string text;
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <map>
#include <memory>
struct InputLine {
int min;
std::string text;
#1 @ 335,861: 14x10
#2 @ 97,613: 24x14
#3 @ 118,29: 25x13
#4 @ 55,721: 10x22
#5 @ 102,127: 23x12
#6 @ 304,347: 24x17
#7 @ 172,726: 28x24
#8 @ 102,115: 25x25
#9 @ 270,568: 14x25
#10 @ 599,384: 10x16
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
struct claim {
int id;
int x;
int y;
int w;
#!/usr/bin/env python3
#
# Example 1-1 call signalling server
#
# Copyright (C) 2017 Centricular Ltd.
#
# Author: Nirbheek Chauhan <nirbheek@centricular.com>
#
import os
import random
import ssl
import websockets
import asyncio
import os
import sys
import json
import argparse
import gi