Question about sugar & flour for weightloss program


I am curious- in eliminating sugar and flour, but also having preplanned “joy eats” am I still following my protocol (which includes no sugar or flour) to have a very preplanned slice of birthday cake on the 9th? It will contain both sugar and flour. Seems like a dumb question, it’s not in my protocol. But a joy eat is or will be – I’m only just beginning the program. Thank you!