removed some unnecessary copy-paste code.
split player input in several methods.