Skip to content

Snooker table tuning#284

Merged
ekiefl merged 2 commits intoekiefl:mainfrom
alrusdi:update-snooker-table
Apr 7, 2026
Merged

Snooker table tuning#284
ekiefl merged 2 commits intoekiefl:mainfrom
alrusdi:update-snooker-table

Conversation

@alrusdi
Copy link
Copy Markdown
Contributor

@alrusdi alrusdi commented Apr 5, 2026

This is my attempt to fix some annoying things in snooker implementation.

BEFORE AFTER

@alrusdi alrusdi requested a review from ekiefl as a code owner April 5, 2026 12:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9e651ba7-0d3f-4e76-a61c-04abeeda6803

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@@ -47,20 +47,20 @@ class TableName(StrEnum):
model_descr=TableModelDescr(name="seven_foot_showood"),
),
TableName.SNOOKER_GENERIC: SnookerTableSpecs(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snooker table standarts according to WBSPA

"yellow": BallPos([], (0.333, 0.2), {"yellow"}),
"green": BallPos([], (0.666, 0.2), {"green"}),
"brown": BallPos([], (0.5, 0.2), {"brown"}),
"white": BallPos([], (7 / 12, 0.2065), {"white"}),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix baulk line balls positions

@ekiefl
Copy link
Copy Markdown
Owner

ekiefl commented Apr 5, 2026

Looks really good!

I noticed two things.

The parameters defined in collection.py really closely match the table model. Beautiful. The only thing I noticed is highlighted in the picture below.

image

The table geometry height is lower than in the model. I'm not sure which one is correct but ideally they should match. If you want to play around with this, replace lines 136-140 with:

        if True:

Second, the pool table has baked in cushion shadows that adds some easy realism.

image

If you're happy, I'm happy. We can either merge as is or you can make changes to address these two points. Up to you! Just let me know.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.36%. Comparing base (d6b1bef) to head (b3db968).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #284   +/-   ##
=======================================
  Coverage   46.36%   46.36%           
=======================================
  Files         144      144           
  Lines       10315    10315           
=======================================
  Hits         4783     4783           
  Misses       5532     5532           
Flag Coverage Δ
service 46.36% <ø> (ø)
service-no-ani 56.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alrusdi
Copy link
Copy Markdown
Contributor Author

alrusdi commented Apr 6, 2026

Looks really good!

I noticed two things.

...

If you're happy, I'm happy. We can either merge as is or you can make changes to address these two points. Up to you! Just let me know.

I suggest merging this part as is, and I'll address both comments in a separate MR. We can also decide there how best to add the model source file. I'll optimize it a bit, but it'll still be ~70 MB... Won't that bloat the repository too much? Maybe it's better to store it in a separate repo like "pooltool-assets" or something?

@ekiefl
Copy link
Copy Markdown
Owner

ekiefl commented Apr 7, 2026

I suggest merging this part as is, and I'll address both comments in a separate MR. We can also decide there how best to add the model source file. I'll optimize it a bit, but it'll still be ~70 MB... Won't that bloat the repository too much? Maybe it's better to store it in a separate repo like "pooltool-assets" or something?

Ok I'll merge now.

Good thinking about a separate repo. 70MB is tolerable (we've done worse) but it's not sustainable. I'll implement this soon.

@ekiefl ekiefl merged commit ef64fa9 into ekiefl:main Apr 7, 2026
10 of 11 checks passed
@alrusdi alrusdi deleted the update-snooker-table branch April 7, 2026 08:18
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