moving gameplay logic to gameplay.go