averbraeck / housinggame-facilitator

Facilitator app for the housing game
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Approval and rejection of selling a house #16

Closed averbraeck closed 8 months ago

averbraeck commented 9 months ago

The facilitator now approves or rejects selling of a house. The table to do so has to be implemented, with the appropriate buttons and the communication to the players' app.

averbraeck commented 9 months ago

Preparation for selling table made.

averbraeck commented 8 months ago

The table for the facilitator looks good: houses in round 2 have been expanded:

image

averbraeck commented 8 months ago

Screens for the player have been (almost) finalized, with calculations on profit when selling the house, including the (discounted) market price, etc.

image

image

image

averbraeck commented 8 months ago

The above calculation:

image

is correct: the player bought a house in round 1 for 300 k with 200 k mortgage and 100 k savings, One installment of the mortgage payment of 20 k has been paid to the bank, and the player has 16 k savings. When selling back to the bank, the value is still 300 k. The player owes the bank 180 k (200 k loan - 20 k mortgage payment). The profit is 120 k. The player can take a new mortgage of 200 k and has 16 k savings: 200 + 120 + 16 = 336 k for buying a new house.

averbraeck commented 8 months ago

Approval/rejection table v1:

image

Headers are still wrong, and comment might move to the popup screen.

averbraeck commented 8 months ago

The approval / rejection table for selling/staying now looks as follows:

image

averbraeck commented 8 months ago

The APPROVE SELL popup:

image

averbraeck commented 8 months ago

The REJECT SELL popup:

image

averbraeck commented 8 months ago

Suppose we approve the house selling for player t6p1:

Before: image

After: image

One small issue: we forgot to subtract the moving penalty from the personal satisfaction.

averbraeck commented 8 months ago

The house is also available on the market again:

image

averbraeck commented 8 months ago

Personal satisfaction updated with move penalty.

averbraeck commented 8 months ago

Tested and working.