A virtual currency betting bot for Twitch chat.
https://ddark.net/better
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
433 B
26 lines
433 B
#include <stb_ds.h>
|
|
#include "better_BetTable.h"
|
|
|
|
void BetTable_init(BetTable* bt)
|
|
{
|
|
sh_new_strdup(bt->bets);
|
|
}
|
|
|
|
void BetTable_destroy(BetTable* bt)
|
|
{
|
|
shfree(bt->bets);
|
|
}
|
|
|
|
void BetTable_reset_bets(BetTable* bt)
|
|
{
|
|
shfree(bt->bets);
|
|
sh_new_strdup(bt->bets);
|
|
}
|
|
|
|
f64 BetTable_get_point_sum(BetTable* bt)
|
|
{
|
|
f64 res = 0;
|
|
for (int i = 0; i < shlen(bt->bets); ++i)
|
|
res += bt->bets[i].value;
|
|
return res;
|
|
}
|
|
|