After much brainstorming, added function to validate player input