Snake game implementation in Swift using reactive components