add new method to check if game is end, change namespace