Bitwise operators part 9

Is comming to an end! With this part, we'll finish the logic and we'll start the UI. This post is about checking the states, the rules and test if, given a specific state, it is allowed to do something when you consult the rule. Our example has this states: loaded: 1 (00000001) playing: 2 (00000010) … Continue reading Bitwise operators part 9

Bitwise Operators Part 7

And I'm back! Still with the back pain but, I must move forward! In the part 6 we created the code which will be responsible for create the statuses, and now, we'll write the part where we set one of this statuses as the current state. Let's recap our interface? export class StateManager { set … Continue reading Bitwise Operators Part 7