Clean up platform assignment

By using ``case`` instead of giant ``if…elif…else`` statements, you can save a lot of space and power. In this commit, I favored using permissive conditions (using *value*), but I'm not sure this is even necessary.