Mafia Votecount Tool - Page 11
Forum Index > TL Mafia |
Xatalos
Finland9675 Posts
| ||
Keirathi
United States4679 Posts
You're pretty much always going to have to do some manual merging to get around the database stuff unless I can get the heroku version working on my end. I think a lot of it is that you are using Mac? Linux? And the line ending are saved differently. That's why i lot of those blank lines were highlighted, etc, i think. Maybe I can fix that? Not sure. | ||
Xatalos
Finland9675 Posts
![]() | ||
Xatalos
Finland9675 Posts
Be sure to pull these changes before continuing btw ![]() | ||
Xatalos
Finland9675 Posts
| ||
Keirathi
United States4679 Posts
| ||
Xatalos
Finland9675 Posts
Good job ![]() | ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
Keirathi
United States4679 Posts
But it's better than having to sort it all manually! | ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
Check if the second target in the sorted targets list has the same amount of votes as the first. If yes, then go through the votes for that day and see which of the targets has the later last vote. If that target is first in the target list, then switch places of the first and second targets. That might work out well enough? | ||
Xatalos
Finland9675 Posts
| ||
Keirathi
United States4679 Posts
Player A gets a 5th vote at 5:00. Then a 6th vote at 6:30. Player B gets a 5th vote at 6:00. Then the person who voted for Player A at 5:00 unvotes. Now Player A and Player B are tied at 5 votes, Player A should be lynched because they reached 5 votes first, but Player A's last vote is technically after Player B's. I've tried thinking through it, but I can't really think of any easy, logical way to solve the problem. | ||
Xatalos
Finland9675 Posts
| ||
Keirathi
United States4679 Posts
So thinking about it more, I think the way to go about it would be to find the number of votes that players are tied at, then loop through all the votes to findt he last time that they were ever under that number of votes, and compare those times between players to determine the order. For instance, if Player A and Player B were tied at 3 votes, then you do a scan of all votes where A was the target. T: vote A (1:00) - 1 U: vote A (2:00) - 2 V: vote A (3:00) - 3 U: Unvote A (4:00) - 2 W: vote A (5:00) - 3 X: vote A (6:00) - 4 V: unvote A (7:00); - 3 Y: vote A (8:00) - 4 Z: vote A (9:00) - 5 Z: unvote A (10:00) - 4 Y: unvote A (11:00) - 3 Now lets say we're doing a vote count now. We see that A never dropped below 3 votes since 5:00 Compare that time with the same analysis of Player B, and sort them based on whoever was first. Since (I think?) the votes are ordered in the database by when they appear, you don't really need time, just the index of the vote and compare them. It's not going to be simple, but I think it can be done? | ||
Xatalos
Finland9675 Posts
id | game | day | index | voter | target ------+------------------------------------------+-----+-------+----------------+----------------- 2500 | 492852-the-new-personality-voting-thread | 1 | 3 | ritoky | fidei86 2501 | 492852-the-new-personality-voting-thread | 1 | 4 | geript | ritoky 2502 | 492852-the-new-personality-voting-thread | 1 | 5 | Fecalfeast | damdred 2503 | 492852-the-new-personality-voting-thread | 1 | 6 | Damdred | fecalfeast 2504 | 492852-the-new-personality-voting-thread | 1 | 7 | Fecalfeast | 2505 | 492852-the-new-personality-voting-thread | 1 | 7 | Fecalfeast | judgejudy 2506 | 492852-the-new-personality-voting-thread | 1 | 8 | Fecalfeast | 2507 | 492852-the-new-personality-voting-thread | 1 | 8 | Fecalfeast | damdred 2508 | 492852-the-new-personality-voting-thread | 1 | 9 | Chezinu | ritoky 2509 | 492852-the-new-personality-voting-thread | 1 | 10 | Chezinu | ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
| ||