Skip to content

Instantly share code, notes, and snippets.

View RevenantX's full-sized avatar

Ruslan Pyrch RevenantX

View GitHub Profile
using System;
using System.Collections.Generic;
namespace Game.Shared.Helpers
{
public class GamePool<T> where T : class
{
private readonly Stack<T> _pool;
private readonly Func<T> _creator;
public class AlmostFriendClass
{
interface INestedClass
{
void CallMethod(AlmostFriendClass afc);
}
public class NestedClass : INestedClass
{
public static class ArhiFastHasher
{
private static char[] Buffer = new char[1024];
public static ulong HashStr(string str)
{
str.CopyTo(0, Buffer, 0, str.Length);
ulong hash = 14695981039346656037UL; //offset
for (var i = 0; i < str.Length; i++)