Game Logic and tests

Game Logic and tests