// credit to Benoit //

// (int * int) -> room*

#ifndef HASH_H
#define HASH_H

#include "structure.h"
#include <stdbool.h>

bool linkedList_mem(linkedList lst, int chx, int chy);
room linkedList_find(linkedList lst, int chx, int chy);
room* linkedList_find_opt(linkedList lst, int chx, int chy);
void linkedList_add(linkedList lst, int chx, int chy, room* area);
void linkedList_free(linkedList lst);

int cantor(int x, int y);
int generate_hash(int x, int y);

hashtbl hashtbl_generate(int initial_size);
bool hashtbl_mem(hashtbl tbl, int chx, int chy);
room hashtbl_find(hashtbl tbl, int chx, int chy);
room* hashtbl_find_opt(hashtbl tbl, int chx, int chy);
void hashtbl_add(hashtbl tbl, int chx, int chy, room* area);
void hashtbl_free(hashtbl tbl);

#endif