Skip to content
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

Adds Snake Scenario #2353

Merged
merged 13 commits into from
Feb 20, 2023
Merged

Adds Snake Scenario #2353

merged 13 commits into from
Feb 20, 2023

Conversation

tznind
Copy link
Collaborator

@tznind tznind commented Feb 18, 2023

snake

Fixes #_____ - Include a terse summary of the change or which issue is fixed.

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

@tznind
Copy link
Collaborator Author

tznind commented Feb 18, 2023

Ok weird, there's a test that never ends after adding this Scenario... need to dig into that.

@tig
Copy link
Collaborator

tig commented Feb 19, 2023

Amazing. LineCanvas is game changing for this project.

@tznind
Copy link
Collaborator Author

tznind commented Feb 19, 2023

Ok fixed Tests. I think because the ScenarioTests were not disposing of Scenario they create the game loop never knew to quit and that caused test to keep running sometimes.

UICatalog/Scenarios/Snake.cs Show resolved Hide resolved
@tznind
Copy link
Collaborator Author

tznind commented Feb 20, 2023

Fixed the stack overflow, stupid typo 🤦

@tig tig merged commit 40af5ed into gui-cs:develop Feb 20, 2023
tig added a commit that referenced this pull request Feb 21, 2023
#2372)

* Illustrates #2331 (Scrollview not respecting clip) does not reproduce (#2332)

* Proves that the issue #2331 don't have reason to happen.

* fixes #2336

* Fixes #2331. ScrollView may not be honoring clip region; CustomButton shows outside

* More appropriate solution for the issue #2331.

* Start refactoring LineCanvas for mixing line style support (e.g. double into single)

* Add remaining resolvers

* Implement corner border style mixing in LineCanvas

* Refactor and simplify resolvers

* Move tests to Core folder and namespace to Terminal.Gui.CoreTests

* Fixes #2333. TextField is selecting badly a word on double click.

* Add unit test deleting a word with accented char.

* Fixes 2331. ScrollView may not be honoring clip region.

* Add a custom button scenario.

* Fixes #2350. Clipping broke (see Clipping scenario).

* Is preferable use NeedDisplay instead of Bounds.

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: tznind <tznind@dundee.ac.uk>

* Fixes ASCIICustomButton scenario.

* Adds Snake Scenario (#2353)

* Add empty snake scenario

* Move snake head around

* Snake now has a tail

* Rest of logic implementation

* Ctrl K D layout fixes

* Game gets faster as you collect more apples

* Adjust speed increase rate down

* Use white on black for snake and border and red for apple

* Fix ScenarioTests not Disposing Scenario

* Add disposes and fix to use LineCanvas.GenerateImage

* Fix stack overflow, doh!

---------

Co-authored-by: Tig <tig@users.noreply.github.com>

* Fixes 2368. Nested views with height of 1 not rendering correctly.

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: tznind <tznind@dundee.ac.uk>
Co-authored-by: Thomas Nind <31306100+tznind@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants