With the current code organization how do you
GrosSacASac opened this issue · comments
GrosSacASacs commented
run 2 games side by side ? it seems not doable with the current design because the code uses global variables for the game.
Ayooluwa Isaiah commented
@GrosSacASac You mean 2 instances of the game? Yeah, you'll need to refactor the code so it creates a new instance of each of the pieces (the snake, food, board, etc). Maybe use a factory function or a class
GrosSacASacs commented
are you going to do it ?
Ayooluwa Isaiah commented
@GrosSacASac I'll give it a go!
Ayooluwa Isaiah commented
@GrosSacASac I just found time to get to this now. I've refactored the code
GrosSacASacs commented
nice