Using CSS to create a small game, including handling user interaction and the computer's moves.
You and the computer are taking turns drinking beer. Each player can drink up to 10 bottles at once, and you alternate drinking sessions. During your turn, you must drink at least one beer, and you can drink up to ten beers.
The person to drink the last bottle loses.
You drink first.
The following game is written purely with CSS, including the interaction and game tree. Read more about the code behind it at CSS AI: Declared Intelligence and CSS AI II: Declared Intelligence.