implemented print() and fixed player turn