Input filtering
Merge https://github.com/wlan0/battleship