Well, it's about as hard as I thought to rewrite popex. I had a big boost of confidence in the first day when I had buying and selling of shares working in a few hours. 90% done I said, this will be easy I said. Only two bits to do now, though quite big bits;
The big stumbling block is I can't quite remember how the original game worked, and I don't have any of the code. There was some magic formula to reprice the shares based on demand. It was a bit gameable (ie tell all your friends to buy shares in the same thing) but not too gameable. So I'm still working on this bit, think I might have come up with a formula today.
The dividends is a bit easier, but the tricky balance was between automating it so it is manageable but not letting it get out of control.
I currently have ten automated players and me buying and selling shares and it's not crashed yet...
Next steps:
I might update the styling before letting people play it. Or I might not.
Here are some exciting logs of the automated players:
16:04:08 REFRESH helen-love 298.33
16:04:08 REFRESH [kenickie](/wiki/#kenickie) 297.85
16:04:08 REFRESH [blur](/wiki/#blur) 999.10
16:04:08 REFRESH mj-[hibbett](/wiki/#mj/hibbett) 299.14
16:04:08 REFRESH [suede](/wiki/#suede) 904.50
16:04:08 REFRESH david-[devant](/wiki/#david/devant) 299.23
16:04:08 REFRESH [oasis](/wiki/#oasis) 1003.56
16:04:08 REFRESH
16:04:17 OOPS whale2 [oasis](/wiki/#oasis) 103 Error: not enough funds
16:04:28 TRADE whale4 [suede](/wiki/#suede) 80
16:04:36 GET /login 302 0ms pauly
16:04:36 GET /portfolio 200 0ms pauly
16:04:47 OOPS whale6 mj-[hibbett](/wiki/#mj/hibbett) -28 Error: not enough [shares](/wiki/#shares)
16:05:05 OOPS whale3 [oasis](/wiki/#oasis) 26 Error: not enough funds
16:05:22 TRADE whale6 david-[devant](/wiki/#david/devant) 258
16:05:35 OOPS whale6 mj-[hibbett](/wiki/#mj/hibbett) -255 Error: not enough [shares](/wiki/#shares)
16:05:54 OOPS whale2 david-[devant](/wiki/#david/devant) 217 Error: not enough funds
16:06:12 TRADE whale6 [oasis](/wiki/#oasis) 19
16:06:29 OOPS whale7 [kenickie](/wiki/#kenickie) -229 Error: not enough [shares](/wiki/#shares)
16:06:30 REFRESH helen-love 297.43
16:06:30 REFRESH [kenickie](/wiki/#kenickie) 296.95
16:06:30 REFRESH [blur](/wiki/#blur) 996.09
16:06:30 REFRESH mj-[hibbett](/wiki/#mj/hibbett) 298.24
16:06:30 REFRESH [suede](/wiki/#suede) 907.90
16:06:30 REFRESH david-[devant](/wiki/#david/devant) 300.73
16:06:30 REFRESH [oasis](/wiki/#oasis) 1001.84
Popbitch still hasn't gone live with my new thing yet.
I bought a Private Eye for the first time in ages and that has been my downtime reading for the last few days, so between that and coding and podcats, I have made no further book progress. My furlough reading list will ultimately look a bit weak.
I think we're going to overtake Italy for number of deaths tomorrow, taking us to number two in the coronavirus death list. We seem unlikely to head this list any time soon though. Go USA!
Country | cases | deaths |
---|---|---|
USA | 1212835 | 69921 |
Spain | 248301 | 25428 |
Italy | 211938 | 29079 |
UK | 190584 | 28734 |
France | 169462 | 25201 |
Germany | 166152 | 6993 |
Russia | 145268 | 1356 |
Turkey | 127659 | 3461 |
Brazil | 108266 | 7343 |
Iran | 98647 | 6277 |
Did my Sainsbury's click and collet and there was no queue!
Coronavirus weekly death graph for USA + Italy + UK + Spain + France + Germany
Paul Clarke's blog - I live in Hythe in the deep South. Wed + father to two, I am a full stack web engineer, + I do js / Node, some ruby, python, php etc. I like pubbing, parkrun, eating, home-automation and other diy stuff, history, family tree stuff, Television, squirrels, pirates, lego, + TIME TRAVEL.