Skip to content

Instantly share code, notes, and snippets.

struct t_world{}; // t_world
t_world_frag to_client=apply_fog_of_war_for(server_side_world,client);
struct t_world_frag{}; // t_client_side_world
// get_commulative_clients_info(recs,inp_frag).foreach_client(client=>get_frendly_value(client)).sum_all();
// diff(smart_sizeof(t_world),smart_sizeof(t_world_frag))
#include <vector>
#include <iostream>
using std::vector;
template<class TYPE,class FUNC>void qap_foreach(TYPE&&arr,FUNC func){auto n=arr.size();for(size_t i=0;i<n;i++)func(arr[i],i);}
#define QAP_FOREACH(arr,code)qap_foreach(arr,[&](decltype(arr[0])&ex,int i){code;})
#define qapforeach(arr,code)QAP_FOREACH(arr,code)
struct t_env{
struct t_move{/*...*/};
struct t_world{
void use(t_move m){/*...*/}
void AVISceneRenderEx()
{
auto&Dev=D9Dev;
vec2i ClientSize=win.GetClientSize();
if(!Dev.BeginScene())return;
{
D3DVIEWPORT9 ViewPort={0,0,ClientSize.x,ClientSize.y,-1.f,+1.f};
Dev.pDev->SetViewport(&ViewPort);
Dev.Set2D(vec2i(0,0),1.0,0,&ClientSize);
Dev.Clear2D(0xffc8c8c8);
@honza
honza / description.md
Last active January 4, 2022 00:54
Ranking algorithm - Lower bound of Wilson score confidence interval for a Bernoulli parameter All implementations use 95% probability.

Ranking algorithm

Lower bound of Wilson score confidence interval for a Bernoulli parameter

All implementations use 95% probability.

pos is the number of positive votes, n is the total number of votes.

Source