Full client-side implementation for board logic. No tests tho. No error handling either.