artasparks / glift

Go Lightweight Frontend
MIT License
115 stars 33 forks source link

Decimals in komi #75

Closed varenius closed 9 years ago

varenius commented 9 years ago

This might be the smallest issue ever, but in the info-window it is currently written "Komi: 6.50" for a game of mine. In all komi-versions I am aware, half a point is the smallest granularity. Hence, it would be nicer to output "Komi: 6.5" etc.

dormerod commented 9 years ago

Sometimes on Chinese websites (and Chinese game records) the komi is recorded as 3.75 (you have to double it to get the 7.5 that we're used to). This is because with Chinese counting you only need to count half the board to find out who has more than half. In other words: (361+7.5)/2 = 184.25

So any fix for this should probably drop trailing zeroes rather than rounding.

By the way, it's great to have you on board varenius! I hope you're able to reuse some of the code from the WP plugin for Drupal. Let me know if you make any improvements or have questions.

varenius commented 9 years ago

Ah - Thanks David for enlightening me on the komi issue. What you say makes complete sense. I also think that the best solution is to drop any trailing zeros.

Glad to be of assistance, I have an early version for Drupal working now. I will take a closer look to the wordpress code in the coming days to see what I can borrow, so far I just found the ideas of including options etc. very helpful. For future reference, all drupal development, and related issues, can be found here: https://www.drupal.org/sandbox/varenius/2345991.

artasparks commented 9 years ago

Easy enough. Added to 1.0 milestone.

artasparks commented 9 years ago

Fixed in 1.0