Gambling company swings back to profit in 2024 after a loss the previous year