HP Forums
(11C) (15C) Scoreboard for Tridom/Tri-Ominos - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (11C) (15C) Scoreboard for Tridom/Tri-Ominos (/thread-10563.html)



(11C) (15C) Scoreboard for Tridom/Tri-Ominos - Michael Zinn - 04-23-2018 05:33 PM

Keep score for up to 8 players of the game Tridom/Tri-Ominos.

Tridom/Tri-Ominos is a game with triangular domino pieces where you have to keep track of points, penalty points and total points separately for each player.

SETUP

1. Change the calculator's number format to the "wrong" decimal separator.
2. Set calculator to USER mode
3. Enter the number of players
4. GSB 0 (The reset/set player program is on a numbered label to prevent accidentally running it)

USER MANUAL

The program will always display the score of the currently active player in this format: PLAYER.POINTS.PENALTY.TOTAL. For example, if player 3 has 254 points and 30 penalty points, the display will show 3.254.030.224.

A awards the active player X points, e.g. 23 A will give the player 23 points.
B awards 5 penalty points. To award 10 penalty points, simply press B twice.
C no use
D select previous player (cycles from 1 to last player)
E select next player (after the last player, this cycles back to player 1)

EXAMPLE USAGE

Two players want to play so you do 2 GSB 0.
The display now displays 1.000.000.000 indicating that player 1 is selected and has no points.
Player one places a piece with a score of 12 and gets 25 bonus points. Do 12 A 25 A.
The calculator now displays 1.037.000.037.
Player 1's turn ends, so do E, which will display 2.000.000.000.
Player 2 places a piece and gets 5 points, so do 5 A, which will result in 2.005.000.005.
End the turn with E showing 1.037.000.037.
Player 1 can't play and draws a piece which incurs 5 penalty points, so you press B, resulting in 1.037.005.032.
Player 1 draws 2 more pieces and still can't play, so you press B twice for the two drawn pieces and then twice again to give 10 penalty points, resulting in 1.037.025.012.
...
Later in the game, you'll notice that player 1 broke the 400 points barrier: 1.403.065.338. This indicates that the current game will be the last one of the match.
At the end of the game you'll see that player 2 has more total points than player 1 (because of less penalty points) and thus wins: 2.388.020.368.

Code:
LBL 0 ; reset, set players
  STO 9
  STO I
  LBL 1
    RCL I
    EEX
    9
    *
    STO (i)
    DSE
      GTO 1
  1
  STO I
  RCL (i)
  RTN

LBL A ; add points
  ENTER
  ENTER
  EEX
  6
  *
  +
  RCL (i)
  +
  STO (i)
  RTN

LBL B ; 5 penalty points
  RCL (i)
  4
  9
  9
  5
  +
  STO (i)
  RTN

LBL D ; previous player
  RCL I
  1
  -
  x=0
    RCL 9
  STO I
  RCL (i)
  RTN

LBL E ; next player
  RCL 9
  RCL I
  1
  +
  x>y
    1
  STO I
  RCL (i)
  RTN



RE: (11C) (15C) Scoreboard for Tridom/Tri-Ominos - Michael Zinn - 06-17-2019 08:28 PM

After some games with several people where each game somebody else had to operate the calculator, I made some improvements to the program which makes it easier and faster to use.

Tridom Scoreboard Version 2

Score display works like in the previous version:
<Player Number>.<Score Points>.<Penalty Points>.<Total Points>

E.g. 3.157.015.142 means that player 3 has 157 positive points and 15 penalty points, which adds up to 142 total points.

<Player Count> GSB 0 : Initialize new game. Up to 8 players.
<Points> A : Award points to the current player, display new score for 1 second, end turn (switches to next player)
B : 5 penalty points for the current player
C : 10 penalty points and end turn (switches to next player)
D : switch to previous player
E : switch to next player

The new commands mean that unless you make an error, you won't have to switch between players manually anymore.

Code
Code:
001  LBL 0        | 42 21  0
002  STO 9        |    44  9
003  STO I        |    44 25
004  LBL 1        | 42 21  1
005  RCL I        |    45 25
006  EEX          |       26
007  9            |        9
008  ×            |       20
009  STO (i)      |    44 24
010  DSE          |    42 28
011  GTO 1        |    22  1
012  1            |        1
013  STO I        |    44 25
014  RCL (i)      |    45 24
015  RTN          |    43 32
016  LBL A        | 42 21 11
017  ENTER        |       36
018  ENTER        |       36
019  EEX          |       26
020  6            |        6
021  ×            |       20
022  +            |       40
023  RCL (i)      |    45 24
024  +            |       40
025  STO (i)      |    44 24
026  GTO E        |    22 15
027  LBL B        | 42 21 12
028  RCL (i)      |    45 24
029  4            |        4
030  9            |        9
031  9            |        9
032  5            |        5
033  +            |       40
034  STO (i)      |    44 24
035  RTN          |    43 32
036  LBL C        | 42 21 13
037  GSB B        |    32 12
038  GSB B        |    32 12
039  GTO E        |    22 15
040  LBL D        | 42 21 14
041  RCL I        |    45 25
042  1            |        1
043  -            |       30
044  X=0          |    43 40
045  RCL 9        |    45  9
046  STO I        |    44 25
047  RCL (i)      |    45 24
048  RTN          |    43 32
049  LBL E        | 42 21 15
050  RCL 9        |    45  9
051  RCL I        |    45 25
052  1            |        1
053  +            |       40
054  X>Y          |    42 20
055  1            |        1
056  STO I        |    44 25
057  RCL (i)      |    45 24
058  RTN          |    43 32

Memory dump
Code:
DM11
04  000000fffff000  00000000000008  0000000000000c  00000000000eae
08  00000000000000  2faf8befbe2280  00000000000000  00000000000000
f4  0000000000b35f  9ff1ecfaf13f59  0eb35f9f59dafb  f13f0d1e2b2b0c
f8  b37ffaf5f9f9f4  5f0b1e7ffa5ffa  fcf6c5c6c60ab3  5f9ff111e57ffc
fc  f9c53f019f7900  00000000000000  000000000002f4  00000000000000
A: 000000fffff000  B: 00000000000eae  C: 00000000000eae
S: 00000000000000
M: 00000000000402  N: 00000000000000  G: 04