Lol I had to do a couple of nudges, away from VB towards B4X, and manually add Pane1 in the layout designer, but other than that, I'd call this a pass:
using the b4j dialect of programming language BASIC,
and the B4XPages cross-platform framework,
please write code to draw a circular dartboard,
divided into twenty sectors,
numbered 1 to 20 but in usual dartboard sequence,
shaded alternately in red and green,
with each sector having double and triple zones (rings)
and a bullseye circle in the middle
First nudge:
B4XPath does not have .ArcTo method,
so please change that to approximate an arc using short (~1 degree ) line segments
Second nudge:
Please use B4J Iif function instead of VB If function
Lol I had to do a couple of nudges, away from VB towards B4X, and manually add Pane1 in the layout designer, but other than that, I'd call this a pass:
I tried Grok (different question) a moment ago.
If you don't log in with your account, it won't even give you the second answer; a message says it can't answer CURRENTLY! Very bad!
I tried with Copilot with this prompt. Had the same 9deg offset as others - but easy to fix
Prompt:
you know the layout of a normal dartboard. Can you produce the B4X code needed to draw it on a canvas. Colours not needed and it can just be monochrome to start with.
Thanks for your replies, perhaps I should have been a bit more specific, I need it for b4a, it's for the game of killer, so the dart board has to have each of the twenty segments divided into four sections, not sure it's possible but thought I'd ask
Attached the xDartboardDemo project and the xDartboard.b4xlib.
It is a B4XPages project and the dart board is a b4xlib library.
Clicking on the dart board raises an event returning the ring index and sector.