First working version, next step is to do the biwise operation thing and to write a complete main.c so that the game carries on.