Skip to content

Commit 91eced2

Browse files
committed
A stuck live table plays on, bots play ahead, bots are marked
The table that stopped at "Dealing" (64cf65a3), and what it showed: - A juror says its play or pass again as soon as a person's heartbeat shows they have not backed it, instead of at the next step of the widening repeat, which can be half a minute away: a bot gets fifteen seconds from when a device is back on its line. - A juror let go is drawn again, once, when the table cannot otherwise draw a jury that holds its bot seats: alone with the four backup jurors, a table that let one go could deal no hand again. - The deal note reads this hand's deal, so a table waiting for a jury says "Waiting for jury…" in every hand, not "Dealing" after the first. - A person says again the escrow claim that carried at a turn still waiting on the escrow's card: across a partition the jurors never heard it, and both sides waited for good (the sealed chaos walk at seed 4 found it once play-ahead moved its timing). Bots play ahead: a bot seat's juror works its card out on a copy of the hand (HeartsGame.lookahead) as soon as it hears the bot card before it, and says it for the turn after the open one. Every side holds it until the turn opens. The card names the cards it was worked out on ('after'), and no side takes it where the table came to others, so every bot card is still the bot's own when the hand is opened. With the person's line 300 ms each way, the wait from their card to their next turn fell from 1.3-1.9 s to 0.7-0.9 s. Also on the branch: a robot mark on every bot's icon, solo and live (SeatLook and SeatIcon shared), with ", a bot" spoken; the rating by the profile picture and "· N online" (people only, not backup jurors) on the front door; the six reaction emoji in a font of their own, so the web fetches nothing to draw them; 192-pixel pictures; reserved names; one glow for a trick with points; oh table finding the relay's and the backup jurors' lines; the roadmap from the to-do list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W92ERJ2vuziEpghjrqPe5w
1 parent c4da4e0 commit 91eced2

74 files changed

Lines changed: 2652 additions & 550 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ squashed from a pull request, the pull request's number.
1010

1111
### Added
1212

13+
- At a live table, a bot's juror plays its card as soon as it hears the
14+
bot card before it, rather than waiting for the person's device to
15+
have seen that one: the bots between two of a person's cards take one
16+
round trip of the person's line, not one each. With the line 300 ms
17+
each way, the wait from a person's card to their next turn fell from
18+
1.3–1.9 seconds to 0.7–0.9. (2026-10-24, #38)
19+
20+
- A bot's icon wears a small robot at its lower right, over the icon's
21+
edge only a little; touched, it says "Bot". On the felt and on the
22+
score sheets, alone and at a live table. A screen reader says "a bot"
23+
after the seat's name. (2026-10-24, #38)
1324
- `oh table <id>`: what the backup jurors, the relay and the player's
1425
device each said of one live table, in one timeline. The relay now
1526
logs each socket's coming and going, and the backup jurors' object
@@ -191,6 +202,32 @@ squashed from a pull request, the pull request's number.
191202

192203
### Changed
193204

205+
- The front door's top corner has your rating, the number alone, just
206+
left of your picture, from your first rated game; the sentence under
207+
the game options that said it is gone. A screen reader hears it as
208+
"rated", then the profile button as before. How many other people
209+
are online follows the game line once it is known, "50 points ·
210+
rated · 3 online", and is 0 when nobody else is; nothing is said
211+
while it is on its way. (2026-10-24, #38)
212+
- A picture of your own is cut down to 192 by 192 pixels, not 64 by 64:
213+
sharp at the size the profile page shows it on a phone, where a
214+
64-pixel picture was blurred to three times over. A photograph that
215+
size is still a JPEG under 12,000 bytes, so nothing the relay or the
216+
service carries grows past what they take. The image check's line of
217+
0.5 was tried again at the new size and holds; PhotoDNA matches
218+
Microsoft's test pictures at it as at 64; the privacy policy says the
219+
new size, in every language, as a minor change. Pictures already set
220+
stay as they are until set again. (2026-10-24, #38)
221+
- Names that would pass for Open Hearts itself or for the people who
222+
run it are refused, as a name on the word lists is: the game's own
223+
name, and admin, moderator, support, staff, official, operator and
224+
the like, in the app's five languages, matched as whole words so
225+
that Staffan and Supporter are names like any other. (2026-10-24, #38)
226+
- A trick with points in it is told by one glow, not two: the pink or
227+
red glow comes up round the winner's badge as the trick is won, in
228+
place of the white border a trick without points still gives its
229+
winner, holds while the trick is on the table and swept, and fades
230+
once the cards are in, as before. (2026-10-24, #38)
194231
- Playing alone, the Auto switch plays the rest of the hand as fast as
195232
its cards land: the bots stop thinking, a trick goes as soon as its
196233
last card has landed, and the score sheet follows the last trick's
@@ -296,6 +333,37 @@ squashed from a pull request, the pull request's number.
296333

297334
### Fixed
298335

336+
- A live table that stopped for good when the person's connection
337+
dropped as the bots passed (table 64cf65a3). Back sixteen seconds
338+
later, their device gave each bot fifteen seconds and took all three
339+
seats off their jurors at the end of them, a second before the
340+
jurors' next repeat was due; and with those jurors left out of every
341+
later draw, the next hand could find no jury to hold its bots, while
342+
the screen said "Dealing". Now a juror says its card again the moment
343+
a person's heartbeat shows they lack it, a juror let go is drawn
344+
again once when nobody else can be, and a table waiting for a jury
345+
says "Waiting for jury…" in every hand, not only the first.
346+
(2026-10-24, #38)
347+
- A bot seat given to the escrow while the person's device could not
348+
reach the jury left the table waiting for good once it could: the
349+
jurors never heard of it, and went on waiting for the seat's own
350+
juror. The device now says the claim again until the seat's card is
351+
played. (2026-10-24, #38)
352+
- On the web, the reactions' emoji are there the first time the picker
353+
opens, and the first time a reaction shows. They were empty boxes for
354+
a second or two while the web's engine fetched them from Google's
355+
font servers; the six now come with the app, cut from the same font,
356+
and nothing is fetched to draw them. (2026-10-24, #38)
357+
- The count of who is online counts people. The backup jurors, online
358+
while a table needs them and for ten minutes after, were counted too:
359+
one player back from a game with bots read "5 online", the four
360+
backup jurors and themselves. (2026-10-24, #38)
361+
- `oh table` finds the relay's lines and the backup jurors' object's.
362+
Workers Logs keeps a line of JSON as its fields, with no message, so
363+
looking for the table in the message found only the jurors' own
364+
traces. It asks for the relay's lines by their `tag` and the object's
365+
by their `table` now, and its tests answer as Workers Logs does.
366+
(2026-10-24, #38)
299367
- Choosing which part of a photograph is your picture, a drag moves the
300368
photograph with the finger all the way. Before, each step of a drag
301369
was laid on where the drag began, so the photograph moved by the last

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ its own licence beside it:
7171
- **New Relic's browser agent** (`app/web/observability.js`): its loader,
7272
as New Relic serves it, on play.openhearts.game only. Apache-2.0
7373
(`app/web/nr-loader-full-1.324.0.min.js.LICENSE.txt`).
74+
- **Noto Color Emoji** (`app/fonts/ReactionEmoji.ttf`): the six
75+
emoji of the table's reactions, cut from Google's font for the web
76+
build. SIL Open Font License 1.1 (`app/fonts/OFL.txt`); how it was
77+
cut is in `app/fonts/README.md`.
7478
- **The name filter's word lists** (`third_party/ldnoobw/`): the
7579
English, Spanish, Portuguese, German and French lists from the List
7680
of Dirty, Naughty, Obscene, and Otherwise Bad Words, by Shutterstock

‎ROADMAP.md‎

Lines changed: 123 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,93 @@ is a plan, not a promise. What has shipped is in the
66

77
## Planned
88

9-
### A dashboard of production's metrics
9+
### Getting found
10+
11+
- **Search.** openhearts.game already has a title, a description, link
12+
previews and a page per language. Still to do: a sitemap, and the
13+
site verified in Google Search Console so that it is indexed.
14+
- **Pages people search for:** how to play, the rules in full, shooting
15+
the moon, and strategy. Today the rules are eight lines among the
16+
support page's questions.
17+
- **The store listings:** screenshots (the first three matter most), a
18+
preview video, keywords, and a description that leads with no ads,
19+
free play alone, deals anyone can check, and the Auto switch. In each
20+
of the app's languages. What the stores ask about how the app works
21+
is answered in [what the stores are told](docs/reference/store-answers.md).
22+
- **Asking for a review** after a good moment, such as a win, through
23+
the stores' own prompt.
24+
- **More languages,** where Hearts is played: Dutch first.
25+
26+
### Learning and playing
27+
28+
- **A tutorial** for new players.
29+
- **Themes:** light, dark, classic green, and one for colour blindness,
30+
with a switch for larger cards and text. Today there is the green
31+
felt, and the app follows the device's text size.
32+
- **Bot speed** when playing alone: slow, normal or fast. Today the
33+
bots keep one pace, and the Auto switch plays out a hand that is
34+
already decided.
35+
- **A wait after quitting.** A player who leaves a live game early
36+
can't start another one straight away.
37+
38+
### Your record
39+
40+
- **More statistics** on the profile: losses, win streaks, games
41+
finished, how often you finish in each place, the points you take in
42+
a hand, your rating over time, and the queen and the moon in live
43+
games too. Today the profile has the rating; games played and won,
44+
the average and the best, live and alone; and, alone, the recent
45+
scores, the queens taken and the moons shot and blocked.
46+
- **Badges** for achievements, shown on profiles. Each player chooses
47+
which of theirs to show.
48+
- **A card to share a finished game:** the score and its highlights,
49+
linked to the game's turn-by-turn record and the check of its deal.
50+
Nothing is shared while the game is on.
51+
52+
### Playing with friends
53+
54+
- **Links that open the app** where it is installed, and the web where
55+
it is not. Today a link to a room always opens the web.
56+
- **A notification for an invitation** to a friend's table, and for
57+
nothing else.
58+
- **Clubs:** private groups that last, with their own leaderboard and
59+
tables quick to start, and voice and video chat for games among
60+
friends only. Video needs care on a phone's screen.
61+
- **Family Sharing** for the subscription on iOS. The service would
62+
take a family-shared purchase as a licence for each family member's
63+
own account. Apple doesn't let Family Sharing be turned off once it
64+
is on, so it is turned on only once that works.
65+
66+
### Knowing how it's used
1067

1168
The service and the relay already count what they do, in Workers
1269
Analytics Engine ([Watching it run](docs/explanation/service.md#watching-it-run)):
1370
each request to the service by handler, status and time taken, and each
1471
relay object's connections, events, deliveries and refusals. Today
15-
they are read only by asking the Analytics Engine SQL API. A dashboard
16-
would show them over time in one place, beside New Relic's checks of
17-
whether the site, the app and the relay are up, so that a slow handler,
18-
a rise in refusals or a quiet day is seen without asking. Like the
19-
counts themselves, it would show nothing about anybody.
72+
they are read only by asking the Analytics Engine SQL API.
73+
74+
- **A dashboard** would show them over time in one place, beside New
75+
Relic's checks of whether the site, the app and the relay are up, so
76+
that a slow handler, a rise in refusals or a quiet day is seen
77+
without asking. Like the counts themselves, it would show nothing
78+
about anybody.
79+
- **Product analytics, kept in house,** with no third-party vendor and
80+
an anonymous random ID per device. The first events: the app opened;
81+
a game started, finished or abandoned; each step of the tutorial; the
82+
way to subscribing; an invitation sent and accepted; and the wait for
83+
a table. From them: how many come back after a day, a week and a
84+
month, and games per player per week. This is new: today nothing is
85+
counted about anybody, so the privacy policy and the App Store's
86+
privacy label change before any of it is collected.
87+
88+
### Research
89+
90+
- **What other Hearts games do:** a map of the features of the ten most
91+
active, and the gaps between them. Among them Hearts+, Trickster,
92+
Optime Hearts, Hearts Deluxe, Hearts Card Game Classic, hyilmaz
93+
Hearts, MobilityWare Hearts and Hearts Expert AI.
94+
- **How many people play Hearts,** and could play it here. How to
95+
measure it isn't decided.
2096

2197
## Waiting on more players
2298

@@ -25,12 +101,52 @@ counts themselves, it would show nothing about anybody.
25101
Long-time Hearts players expect some options the game doesn't have yet:
26102

27103
- the Jack of Diamonds counting −10 for whoever takes it;
104+
- choices in how shooting the moon scores;
28105
- a game to 150 points, beside the 50 and 100 there are now;
29-
- passing in no hand at all, not only every fourth.
106+
- other ways of passing, such as passing in no hand at all, not only
107+
every fourth.
30108

31109
Each is small to build. But everyone at a live table plays by the same
32110
rules, so each option splits the players waiting into more pools, as the
33111
100-point game already does (`poolTag` in
34112
`packages/table/lib/src/matching.dart`). Fewer players in each pool
35113
means longer waits for a table. So these options wait until the
36114
standard pool has enough players to spare.
115+
116+
### Leaderboards
117+
118+
All time, and by the day, the week and the month. A board with a
119+
handful of players on it says little, so the boards stay hidden until
120+
enough people play. A board is a view of the ratings, and ratings are
121+
never reset.
122+
123+
### After a game with strangers
124+
125+
Two ways on from the end of a game at a table found at random: **Play
126+
again** with the same people, if they choose it too, and **Mix it up**,
127+
which avoids them unless they are the only ones online. Today Play
128+
again finds a new table the way the last one was found. Mix it up is
129+
shown only when enough people are online for it to mean anything.
130+
131+
## Later
132+
133+
### Game Center and Google Play Games
134+
135+
Badges as achievements in Apple's Game Center and Google Play Games,
136+
and the game found through Apple's Games app. It waits for the badges.
137+
138+
## Decided against
139+
140+
We have thought about these, and aren't building them:
141+
142+
- **Bot difficulty levels.** Bots are rated like players, and a table
143+
takes bots rated near its players, so the matching already gives each
144+
player bots of their level.
145+
- **Hints, and taking a card back.**
146+
- **Daily challenges.**
147+
- **Three to six players, and teams.**
148+
- **Giving a subscription as a gift.**
149+
- **Resetting a rating.**
150+
- **Coming back to a seat once a bot has taken it over.** Coming back
151+
to a seat that is still yours, after a reload or a dropped line,
152+
works today.

‎app/fonts/OFL.txt‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
Copyright 2021 Google Inc. All Rights Reserved.
2+
3+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+
This license is copied below, and is also available with a FAQ at:
5+
http://scripts.sil.org/OFL
6+
7+
---------------------------------------------------------------------------
8+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9+
---------------------------------------------------------------------------
10+
11+
PREAMBLE
12+
13+
The goals of the Open Font License (OFL) are to stimulate worldwide development
14+
of collaborative font projects, to support the font creation efforts of academic
15+
and linguistic communities, and to provide a free and open framework in which
16+
fonts may be shared and improved in partnership with others.
17+
18+
The OFL allows the licensed fonts to be used, studied, modified and redistributed
19+
freely as long as they are not sold by themselves. The fonts, including any
20+
derivative works, can be bundled, embedded, redistributed and/or sold with any
21+
software provided that any reserved names are not used by derivative works. The
22+
fonts and derivatives, however, cannot be released under any other type of license.
23+
The requirement for fonts to remain under this license does not apply to any
24+
document created using the fonts or their derivatives.
25+
26+
DEFINITIONS
27+
28+
"Font Software" refers to the set of files released by the Copyright Holder(s) under
29+
this license and clearly marked as such. This may include source files, build
30+
scripts and documentation.
31+
32+
"Reserved Font Name" refers to any names specified as such after the copyright
33+
statement(s).
34+
35+
"Original Version" refers to the collection of Font Software components as
36+
distributed by the Copyright Holder(s).
37+
38+
"Modified Version" refers to any derivative made by adding to, deleting, or
39+
substituting -- in part or in whole -- any of the components of the Original Version,
40+
by changing formats or by porting the Font Software to a new environment.
41+
42+
"Author" refers to any designer, engineer, programmer, technical writer or other
43+
person who contributed to the Font Software.
44+
45+
PERMISSION & CONDITIONS
46+
47+
Permission is hereby granted, free of charge, to any person obtaining a copy of the
48+
Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell
49+
modified and unmodified copies of the Font Software, subject to the following
50+
conditions:
51+
52+
1) Neither the Font Software nor any of its individual components, in Original or
53+
Modified Versions, may be sold by itself.
54+
55+
2) Original or Modified Versions of the Font Software may be bundled, redistributed
56+
and/or sold with any software, provided that each copy contains the above copyright
57+
notice and this license. These can be included either as stand-alone text files,
58+
human-readable headers or in the appropriate machine-readable metadata fields within
59+
text or binary files as long as those fields can be easily viewed by the user.
60+
61+
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless
62+
explicit written permission is granted by the corresponding Copyright Holder. This
63+
restriction only applies to the primary font name as presented to the users.
64+
65+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall
66+
not be used to promote, endorse or advertise any Modified Version, except to
67+
acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with
68+
their explicit written permission.
69+
70+
5) The Font Software, modified or unmodified, in part or in whole, must be distributed
71+
entirely under this license, and must not be distributed under any other license. The
72+
requirement for fonts to remain under this license does not apply to any document
73+
created using the Font Software.
74+
75+
TERMINATION
76+
77+
This license becomes null and void if any of the above conditions are not met.
78+
79+
DISCLAIMER
80+
81+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
82+
INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
83+
PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
84+
RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
85+
LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
86+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
87+
INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

‎app/fonts/README.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Fonts
2+
3+
`ReactionEmoji.ttf` is the six emoji of the table's reactions (👍 😂 😮
4+
😬 🙏 👋, `Reaction` in `packages/table/lib/src/reactions.dart`), cut
5+
from Noto Color Emoji. The web build draws them in it
6+
(`app/lib/ui/reactions.dart`); a phone draws its own system's emoji.
7+
8+
The web build's own font has no emoji. Without this one, Flutter's web
9+
engine fetches the slice of Noto Color Emoji that holds them from
10+
Google's font servers the first time one is drawn, and draws empty boxes
11+
until it comes. With it, they come with the app, from the app's own
12+
host, before the first frame, and with the rest of the app for a load
13+
with no network.
14+
15+
It is the slice Flutter's engine itself fetches for them, so the web
16+
draws the same glyphs as before: version 2.047, COLRv1 vector glyphs.
17+
18+
To make it again, or to add a seventh reaction's emoji, with
19+
[fontTools](https://github.com/fonttools/fonttools) 4.55.3 and brotli:
20+
21+
```bash
22+
curl -o slice9.woff2 https://fonts.gstatic.com/s/notocoloremoji/v32/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.9.woff2
23+
pyftsubset slice9.woff2 \
24+
--unicodes=U+1F44D,U+1F602,U+1F62E,U+1F62C,U+1F64F,U+1F44B \
25+
--layout-features='*' --name-IDs='*' --name-languages='*' \
26+
--output-file=ReactionEmoji.ttf
27+
```
28+
29+
and then the licence's statement written into its name table, where the
30+
font carries it wherever it is served:
31+
32+
```python
33+
from fontTools.ttLib import TTFont
34+
f = TTFont('ReactionEmoji.ttf')
35+
f['name'].setName('This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://openfontlicense.org', 13, 3, 1, 0x409)
36+
f.save('ReactionEmoji.ttf')
37+
```
38+
39+
A new emoji may be in another slice: the slices and the code points each
40+
covers are in Flutter's `font_fallback_data.dart`. `reactions_test.dart`
41+
fails while any reaction's emoji is missing from the font.
42+
43+
Noto Color Emoji is © Google, under the SIL Open Font License 1.1
44+
(`OFL.txt`).

‎app/fonts/ReactionEmoji.ttf‎

9.55 KB
Binary file not shown.

0 commit comments

Comments
 (0)