This repo contains an scorecard for the card game Oh Hell. The scorecard is implemented as a single-page HTML + Javascript page. It is for immediate use only, and does not have any backend database.
Oh Hell is a relatively simple trump-based card game. Gameplay consists of 10 rounds of play. The first round consists of 10 cards for each player, reducing by one card each round until the final round has only 1 card per player.
For games played with more than 5 players, the number of tricks per round is capped to fit within a single 52-card deck (with 1 card flipped for trump, leaving 51 cards to deal). The maximum tricks per round is calculated as floor(51 / number of players). The game always has 10 rounds. For example, with 7 players: floor(51/7) = 7, so the rounds are 7, 7, 7, 7, 6, 5, 4, 3, 2, 1 (the first four rounds are capped at 7 tricks each).
Start by picking a dealer for the first round. The dealer deals out 10 cards, or a reduced amount for more than 5 players. Deal evenly to all players leaving the uneven cards out of play. Flip over the top card of the remaining cards. This suit of this card is trump.
The round consists of two phases:
All players inspect their hand, and estimate how many tricks they are going to take in the round. All players simultaneously bid the number of tricks they are going to take in the round. While we traditionally pounded on the table three times and then outstretched fingers to indicate the number of tricks, we now use poker chips hidden inside the hand that we drop on the third pound. Due to dog, was also just wave hands in the air, no pounding.
The scorer records the bids for each player.
The player left of the dealer leads the first hand. No player can lead trump until trump has been "broken". Therefore, the first hand must start with any suit other than trump. All other players must follow suit. If they are out of the suit that was lead, they may play any other card, including trump. All players play one card in order. When the play reaches the person that led, the trick is complete. The player who played the highest card takes the trick. The highest card is the highest trump, if trump was played, or the highest card in the suit that was lead. Card order from highest to lowest is: A K Q J 10 9 8 7 6 5 4 3 2
The player that takes the trick then leads the next trick.
At the end of the round, players count their tricks. There are three possible scenarios:
- If a player takes less then they bid, then they get 0 points for the round.
- If a player takes exactly what they bid, then they get 10 points plus the number of tricks bid / taken.
- If player take more tricks than bid, then they get the number of points taken.
The winner is the player with the most total points over all rounds.
The scorecard consists of a centered title "Oh Hell" with the current date on the right. The rest of the scorecard is a table.
The first column uses a 2x2 grid for each round:
- Left side (merged top and bottom): The number of cards/tricks for that round. Uses the standard progression 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, capped at floor(51 / number of players) for games with more than 5 players. Always displays 10 rounds.
- Top right: The difference between total bids and tricks in the round. Displays with pink background when non-zero.
- Bottom right: The difference between total takes and tricks in the round. Displays with pink background when non-zero.
The remaining columns contain the players. The header row contains the player names. Each player cell uses a 2x2 grid containing:
- Top left: The bid amount in blue.
- Bottom left: The take amount in green (if matching the bid) or red (if not matching).
- Right side (merged top and bottom): The cumulative total in black. Only displays after tricks taken is entered for that round.
- Add players by entering their names (3-12 players supported).
- Reorder players using drag-and-drop:
- Desktop: Click and drag anywhere on the player item.
- iPad: Touch and drag the ☰ handle on the left side.
- Delete individual players using the "Delete" button.
- Clear all players at once using the "Clear" button (with confirmation).
- Click "Start Game" when ready to begin (enabled when 3-12 players are added).
Persistent Keyboard Entry (iPad Optimized)
The scorecard features a persistent keyboard entry system optimized for iPad use:
-
Entry Field: A dedicated input field appears at the top-left labeled "Entry:"
- Keeps the iPad keyboard visible throughout the entire scoring session
- No more keyboard disappearing after each entry!
-
Active Cell Highlighting: The currently selected cell is highlighted with a yellow background and orange outline
- Always shows where your next entry will go
- Tap any bid or take cell to make it active
-
Keyboard Navigation:
- Type a number → Value enters in active cell and automatically advances to next field
- Press Backspace/Delete → Clears current cell and navigates back to previous field
- Flow: All bids for round → All takes for round → Next round bids → etc.
-
Manual Navigation: Click/tap any bid or take cell directly to jump to that field
Score Calculation
- Scores are automatically calculated:
- Less than bid: 0 points
- Exactly bid: 10 + bid amount
- More than bid: tricks taken value
- Cumulative totals are automatically computed and displayed (only shown after tricks taken is entered).
Validation & Feedback
- The first column displays bid and take validation in real-time:
- Top right: Shows difference between total bids and tricks (displays immediately when ANY bid is entered)
- Bottom right: Shows difference between total takes and tricks (displays immediately when ANY take is entered)
- Pink background when ALL values entered and difference is non-zero
- Displays differences with sign (+1, -2, 0, etc.) to help verify correct entry
Winner Determination
- At the end of the game, the winning player's entire column is highlighted with a green background.
- Supports ties (multiple winners highlighted).
- Auto-scaling: The entire scorecard automatically scales to fit on screen with no scrolling
- Optimized for iPad: Full-screen display with all 10 rounds and all players visible at once
- Works on desktop browsers too
- Restart button: Located in the header next to the date
- Clears all scores and returns to player setup
- Preserves the player list so you can start a new game quickly
- Prompts for confirmation before restarting