#include "Inventory.h"

u8 inventoryItems = 0;

void addItemToInventory(u8 item)
{
    if (item < 9)
    {
        // -1 so that the item starting at 1 will be 0 which will not change the first flag value from 1.
        inventoryItems |= 1 << (item - 1);
    }
}

u8 inventoryContainsItem(u8 item)
{
    if (item < 9)
    {
        // -1 so that the item starting at 1 will be 0 which will not change the first flag value from 1.
        // If the item matches the flag it will be 1.
        return inventoryItems & (1 << (item - 1));
    }
    else
    {
        return 0;
    }
}