Preheat oven to 170 degrees celcius (150 degrees fan forced).
Grease a 20cm square cake tin, then line with baking paper, allowing paper to overhang on 2 sides.
Place half of the butter and half of the sugar into one mixing bowl, then the other half of the butter and sugar into another bowl.
Place dark chocolate into one of the bowls and white chocolate into the other.
Bring two saucepans of water to a simmer. Place bowls over saucepans of simmering water, and stir each gently until mixture is smooth. Remove from heat and allow to cool slightly.
Add one egg to each bowl, add vanilla to the white chocolate mixture. Whisk each mixture until combined.
Sift half of the flour into each bowl and fold until combined.
Drop alternating spoonfuls of each mixture into the prepared pan. Using the end of the spoon, gently swirl the mixture to give it a marbled effect. Be careful not to mix too much.
Bake for 35 minutes, or until the centre is just firm. Allow to cool completely in the pan before cutting and serving.