Two Games Created Pyglet Python Two Different Files Pyscripter Saved Location Desktop Want Q37021537

I have two games created in pyglet(python),in twodifferent files on PyScripter saved in same location on desktop,Iwant to create a new file in which I may allow option from whichuser can choose between the games and then according to his way ofchosing(keyboard or mouse selection based)the selected game filewill execute.


Solution


Since, you didn’t provide code for your two games so I createdsample of those 2 games as Game1.py and Game2.py to portray theidea of how you can carry out what you want to-

Sample code of Game1.py-

Game1.ру х Game2.ру х Choice_of_Game.pyX def playl) 2 print ( Good luck with Game 1!)

Sample

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.