Game flow logic coded