This is an implementation of the 'train game', which is a game for bored people on trains in Sydney, Australia.
The rules are simple. Take the 4 digit train number (normally visible near the stairs inside a carriage) and perform simple arithmatic operations on them such that the result is 10.
For example, take the train number '1234'. We can make 10 by the the following sequence:
1 + 2 + 3 + 4 = 10
also, 1 * 2 + 3 + 4 = 10.
You can even group digits, like so:
44 - 34 = 10
Have a play here: