The child is playing a game of chance, with one hand competing against the other, for want of a companion to play against.
Here are a couple of examples from other works, to show how the phrase is used:
> One summer afternoon at Capua I was sitting on a stone bench behind the stables of my villa, thinking out some problem of Etruscan history and idly shooting dice, **left hand against right** , on the rough plank table in front of me.
>
> Robert Graves (1934). _I, Claudius_.
> I sat near her on the floor, playing knucklebones, **right hand against left**.
>
> Mary Stewart (1970). _The Crystal Cave_.
What kind of game of chance might be played with a brass button? Perhaps the button is spun to see how it lands; or perhaps the game is played with some other equipment (for example, knucklebones can be played with small bones or pebbles) and the brass button is the stake or prize.