Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <vector>
#include <string>
#include <mutex>
#include <future>
#include <chrono>
#include <utility>
#include <assert.h>
#include <pthread.h>
@wilburding
wilburding / simulate.py
Last active December 15, 2015 11:39
simulate the mechanism of how BigWorld handles priorities of entities in the aoi of a witness. it seems that the priorities will finally all be cleared to zero, though very slow, hundreds of thousands iterations usually required at least and sometimes 100M iterations won't do, if all other entities are static.
#!/usr/bin/env pypy-c
from __future__ import print_function
import random
import math
import sys
import signal
import os
import time