-3

I'm making a small game and I don't know whether I should have the majority of the statements in the main function or instead just put them as void functions in my player object (I'm not really returning anything other than boolean values throughout each iteration).

4

1 回答 1

2

一般来说,您应该致力于main()成为执行环境(操作系统)和您实现的系统之间的桥梁。这意味着main应该“破解”命令行参数,然后及时将控制权传递给实例化顶级对象并运行系统的方法。

于 2013-09-24T00:52:47.400 回答