Arrow keys to move the black square. There's not much to it.
This isn't much, but it's collision physics for anyone who wants them. Feel free to remix.