swift code game