Allow defining an ID for a joker to always appear in shop and be tested

This commit is contained in:
MeirGavish
2025-10-13 20:58:44 +03:00
parent 4b35b2f7d8
commit 8c25089966
3 changed files with 39 additions and 4 deletions
+20
View File
@@ -99,3 +99,23 @@ int list_get_size(List *list)
}
return list->size;
}
bool list_exists(List *list, void *value)
{
if (list == NULL) return false;
for (int i = 0; i < list->size; i++)
{
if (list->_array[i] == value)
{
return true;
}
}
return false;
}
bool int_list_exists(List *list, intptr_t value)
{
return list_exists(list, (void*)value);
}