add function to determine the active player
Merge pull request #2 from toinsson/master

add action function in main.py