edit resource and improve game logic