Below is the link to a java applet game I made for a class assignment. I've hosted it online on a free web hosting site (000webhost). You will need java in your browser to run the game. The computer player in the game is implemented using a random algorithm which randomly increases/decreases the difficulty level of winning. See if you can win at Kotta Pora!:)
Note : Kotta Pora is a game of pillow fight traditionally played in Sri Lanka for the Sinhala New Year.
http://harini.hostzi.com/game.html (the game may take a few minutes to load..)