Write a simple program for a game due

Write a simple program-

Try to write a program to play a simple game.  It could be a game of tic-tac-toe or a game where one person takes one or two chips from a stack of random amount of chips.  The next person does the same.  The player to take the last chip wins.