(*g).pile1
g->pile1
So we can rewrite the function as:
void clear(gameState *g) { g->pile1 = 0; g->pile2 = 0; }