Android Question Dart board

Colin Evans

Active Member
Licensed User
Longtime User
Hi, I need to create a dart board, with four sections in each number (1-20 in standard dart board numbering), is this possible graphically?
 

emexes

Expert
Licensed User
Longtime User
Upvote 0

emexes

Expert
Licensed User
Longtime User
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:


1758600775488.png


Grok initial try:
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
 

Attachments

  • TestDartBoard.zip
    4.1 KB · Views: 7
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
I find this incredible. Ideally the board should be rotated nine degrees anticlockwise but I am sure that will be a no-brainer for Grok.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
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.
 
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
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🤣
 
Upvote 0

emexes

Expert
Licensed User
Longtime User
a message says it can't answer CURRENTLY!

Yeah, that's been happening a lot lately. But every time, I hit retry, and then it works. Admittedly, I've been logged in.

I assume either they're hitting some capacity limit during busy times, or it's a ploy to get people to upgrade to a paid login.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Upvote 0
Top