Finished general gameplay logic