Pātuhitia tēnei: The mathematics of games and gambling