-
Notifications
You must be signed in to change notification settings - Fork 53
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
Reversi Example #39
Draft
sunjay
wants to merge
13
commits into
master
Choose a base branch
from
reversi
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Reversi Example #39
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
1a70c74
to
07b5060
Compare
17b4572
to
2b76fff
Compare
fc3d721
to
f96b9e6
Compare
6011b70
to
7730d16
Compare
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
=======================================
Coverage 61.32% 61.32%
=======================================
Files 40 40
Lines 2697 2697
=======================================
Hits 1654 1654
Misses 1043 1043 Continue to review full report at Codecov.
|
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.
Motivation & Vision
One thing I'd like people to see about turtle is that, in a way, it is actually just a graphics engine with a very specific (additive) rendering model. That means that you can write quite a few kinds of applications and games using turtle. With its events model, you can even write interactive applications.
Right now, you can use turtle to create any application that can be modelled so that new pieces of interface are drawn on top of previous ones. Sometimes this takes a bit of creativity, like it did in this example, but you can definitely create a lot using the simple primitives provided by this library. In the future, even that limitation will be lifted and you will be able to create even more using turtle.
The reason that this is important is because it allows turtle to be a legitimate learning tool for applications that go beyond simple toy examples. If we can accomplish this goal, we can take people writing programs that draw simple circles and teach them to write actually useful and productive applications. The smaller we make the gap between crates like turtle and creating applications with more traditional and advanced frameworks, the easier it will be for people to make that transition.
Note: the point is not for people to actually use turtle instead of an actual GUI library. The point is to close most of the gap so that switching to something beyond turtle isn't impossible. It's important to think about where people will go after learning about the library.
Reversi
This example is in progress. By the time it is finished, the game Reversi will be fully implemented. This game is perfectly suited to turtle because it doesn't require completely re-rendering the scene every frame. We can just keep adding things on top of the existing drawings.
As turtle matures and gains more features, this example can improve and gain more advanced features. For example, when undo gets added, there's a possibility of drawing indicators on the valid moves and then undoing them away when the user clicks. With text support (#22), we could render the score on the screen.
Progress So Far
The turtle responds to mouse clicks and draws new pieces on the board. No rules are enforced yet and you cannot win/lose.