-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game #18
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
can determine whether or not a shot is legal (push-outs not implemented)
messages are torn down when game is exited
code in upwards of 6 places for each mode added. Now, I only need to create the mode.py file and have ModeManager inherit it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR takes pooltool from an interactive simulation to a full game.
games
module addedpooltool is no longer an interactive simulation, it can also facilitate single and multiplayer (offline) games, such as 8-ball, 9-ball, etc. Rules for a game are defined in the
pooltool.games
module.Options menu now functional
The user can now choose which game they want to play, the table dimensions, ball dimensions, coefficients of friction, etc from the options menu
New modes:
To meet the requirements of certain games, which require the ability to call shots, move the ball with your hand, cue different balls, etc., I have added several necessary game modes:
PickBallMode
). Controls: hold 'q' to choose ball, click to confirmBallInHandMode
). Controls: hold 'g' to choose ball, click to confirm, mouse to move ball, click to finalize placementCallShotMode
). Controls: hold 'c' to choose ball, click to confirm, mouse mouse to choose pocket, click to confirmInterface vs ShotViewer vs Play
There used to be 1 class that managed the interactive interface. Now there is a superclass
Interface
, and two subclassesShotViewer
andPlay
.ShotViewer
enables the interactive viewing of a shot that is calculated offscreen in a script (for example, seesandbox/looseness.py
), whereasPlay
creates a game environment with menus, a HUD, shot-taking controls, etc. This is a huge milestone, as pooltool can now be used by billiards researchers for fine-tuned programmatic control of shot simulations.