In the game, the only place I check the platform is to see how big I should make the screen (like 3 lines). Everything else is shared!
The big news here is that you can use a single codebase (and a nice advanced language like ocaml), and deploy to 4 platforms.
The framework I'm using is called "reprocessing", which is a ~port of the "processing" language to OCaml, targetting OpenGL. It abstracts out the different platforms.