Moved currentPlayer from a global variable
to a namespace variable