Scorekeeper: show an entered 0, tap a past score to edit it
Zeros are now stored so a typed 0 shows as 0 while a blank cell stays blank. Tapping a score in an earlier round opens that round for correction with the cursor in the tapped cell, instead of needing the row number first. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
26ae3fecaa
commit
b98d464954
@@ -182,4 +182,13 @@ class ScoreSheetTest {
|
||||
assertEquals(0, sheet.totals()[sheet.players[0].id])
|
||||
assertEquals(4, sheet.totals()[sheet.players[1].id])
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `a zero that was entered is kept, unlike a cell left blank`() {
|
||||
val sheet = sheetOf("Alice", "Bob").let { it.withRound(mapOf(it.players[0].id to 0)) }
|
||||
val round = sheet.rounds.first()
|
||||
assertEquals(0, round.deltas[sheet.players[0].id])
|
||||
assertEquals(null, round.deltas[sheet.players[1].id])
|
||||
assertEquals(0, sheet.total(sheet.players[0].id))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user