Coding of different games in c