republican-creole
Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » Talk » Pub Games » Which Vote count do you prefer??
Search Topic:
Uniqs:
513
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
[signup] Monty Python »
« [OT] So I have this domain....  
page: 1 · 2
AuthorAll Replies


muzscman
Mr. President
Premium,VIP
join:2002-02-15
Florissant, MO
clubs:
·AT&T U-Verse


1 edit
Which Vote count do you prefer??

Option A:

Current Vote Count
Gomez - 3 - TheRul, Drew, aztecnology

Option 2:
Current Vote Count
Gomez - 2 - Rook008, Count Zero - L4

Option #:
Current Vote Count
Gomez - 2 - Rook008, Count Zero - L4

These are my two most common ways of posting a vote count. Option A is simple. Nothing flashy. Option 2 has more to it, including what their L is at.

Thoughts? Does Option 2 make the game easier or is that to much?

edit: Just added Option #....

--
Come play mafia: »Pub Games :it's fun for the whole internet!
Remember the golden rule of the internet..it's the place where men are men, women are also men, and children are the FBI.


drew
Reformation
Premium
join:2002-07-10
Port Orchard, WA
clubs:
I vote for Option 3 (or C), depending on which numbering scheme you use, since the first one is "Option A" and the second is "Option 2".

Option 3/C is Option A with the "L4" at the end.


muzscman
Mr. President
Premium,VIP
join:2002-02-15
Florissant, MO
clubs:
·AT&T U-Verse

said by drew See Profile :

I vote for Option 3 (or C), depending on which numbering scheme you use, since the first one is "Option A" and the second is "Option 2".

Option 3/C is Option A with the "L4" at the end.
3rd one would be option #


aztecnology
O Rly?
Premium
join:2003-02-12
Murrieta, CA
reply to muzscman
Option # - gives u everything u need...


TheRul
You couldn't think of something?
Premium
join:2007-09-18
Victorville, CA
I like the #


Johnny
Premium
join:2001-06-27
Atlanta, GA
·Comcast

reply to muzscman
heh - just like Tom and Ray - "Part 1 and Part B"...

Include the threshold and make it "L-3" instead of "L3"

I actually would prefer using a colon, but I used a dash to keep with custom.

e.g.

Official Vote Count:
Needed To Lynch:4


drew: 2 (muzscman, Karride) (L-2)
muzscman: 1 (drew) (L-3)
Paulg: 1 (BigReds42) (L-3)
Karride: 1 (Count Zero) (L-3)

Not Voting: Paulg, sansri88

Or a table:




Count Zero
MD2Be
Premium
join:2007-01-18
Warner Robins, GA

1 edit
reply to muzscman
2


Gomez
Been drinking brew for breakfast?
Premium,Mod
join:2001-02-21
Atlanta, GA
clubs:
reply to muzscman
I think I don't like this example

But, option #


muzscman
Mr. President
Premium,VIP
join:2002-02-15
Florissant, MO
clubs:
reply to muzscman
I think I will be changing all of my stuff to option #....easy to read and much easier as a mod to write that up...


drew
Reformation
Premium
join:2002-07-10
Port Orchard, WA
clubs:
I can tell you that trying to use the bold tags and all that jazz is hard for me. It's SO complicated to look at when quoting.


muzscman
Mr. President
Premium,VIP
join:2002-02-15
Florissant, MO
clubs:
·AT&T U-Verse

said by drew See Profile :

I can tell you that trying to use the bold tags and all that jazz is hard for me. It's SO complicated to look at when quoting.
lol after modding 30-40 games (has it really been that many??) you get used to it...


drew
Reformation
Premium
join:2002-07-10
Port Orchard, WA
clubs:
Wow, that's a lot of games.

I will say something though. We need to get people more active in the games. Johnny's F11 Short Time game is being eaten alive right now due to inactive players.


Rook008
Miles To Go

join:2002-02-05
Far Rockaway, NY
reply to muzscman
I like Option #.


drew
Reformation
Premium
join:2002-07-10
Port Orchard, WA
clubs:
·wavebroadband

reply to muzscman
Click for full size
My creation
Here's what I've spent the past two days of free time on.


drew
Reformation
Premium
join:2002-07-10
Port Orchard, WA
clubs:
·wavebroadband


2 edits
Mafia.zip 3,114,881 bytes
The Source Code
Success!

After that screenshot and a quick chat with yock, I decided that having the application depend on SQL Server Express 2005 was a bit much. So, after trying unsuccessfully to port the database to Access, I tried SQL Compact 3.5. The .dll's come with the application.

The only downside to this application is that it requires .NET 3.5 Framework to run, which is something I'm OK with.

If you're interested, let me know and I'll be happy to share it with you!

Edit: (man, I think this is the first time I've edited a post in this forum )

»www.wundervoll.us/mafiavc/mafiavc.zip. It's right about 1MB in size. It was written in VB.NET on Visual Studio 2008. It requires .NET 3.5 Framework and the installer -should- let you know and help you download it if you don't have it. Feedback is much appreciated.


Johnny
Premium
join:2001-06-27
Atlanta, GA
·Comcast

Excellent.

That Unvote is a bitch, eh?

Glad to see a Windows build.

I considered Core Data and MySQL backend on mine but thought it was overkill. It probably would have simplified the persistent storage though.

By far the most tedious part was making sure the user could quit at any point and be returned to where they were when they quit.


yock
TFTC
Premium
join:2000-11-21
Fairfield, OH
Incidentally, when Drew got in touch with me last night I was deep into my long-awaited Java port. I've been talking to a friend of mine about some architecture concepts and, as usual, my concept has exploded into a lot more.


Johnny
Premium
join:2001-06-27
Atlanta, GA
·Comcast

Well, the only thing mine needs now is to automate the screen-scraping to collect the votes and unvotes from the thread.

I predicted a couple of years ago that the read-only nature of web pages was going to be a huge problem when someone wanted to control them, as there is no API and no way to manipulate them programmatically. There's not even a way to send a "next page" to get to the next page of a multi-page thread.

Every site is custom in where the next page buttons are, where the indication of what the current page is, etc.

I'm not talking about modifying the pages - simply automating the navigation that the user would do when reading the pages. It's a mess, as there is absolutely no standard and no API.

We could kludge up some incredibly complex and ball-of-spaghetti thing that tried to read a thread and extract the votes and unvotes, but it would:

1) Be specific to this site
2) Still be heuristic to some degree, as people misspell player names
3) Have to somehow discover the setting for posts per page
4) Include some incredibly complex mess for identifying quoted vote text and not counting that, and that quoted text could be an arbitrary number of levels deep
5) Accept numerous variants on the vote text, such as with/without colon
6) Recognize that text such as "You asshole, I said I was not going to vote yock because he's innocent", all in bold, was not a vote

We need an API so we can send HTML to the site to go to the next page of a thread (or better, get a reference to the whole thread as one stream of text), get the number of posts per page, and find text on the pages. Otherwise, trying to screen-scrape this is an exercise in futility.

Automatic night actions are working in my app, although trying to generalize that to large closed games is a big undertaking. Right now all I handle is Cop, Doc, Mafia and Mafia Roleblocker. And even those have to be entered by hand after reading a PM - that too could be automated by having the app receive emails or some similar mechanism.

Roles are automatically generated, but again there is no clean way to send the PMs automatically, as there is no API for the website.

There is also no way to post the vote counts automatically, without resorting to some kludge where you try and click the "Reply" button by UI scripting and then send some tabs and then send a Paste and then click the Post button. And you'd have to read the titles of the pages that loaded to make sure you accommodate network delays and didn't try and send something to a page that had not loaded yet.

There is just no way to control reading and posting to a web site programmatically. I was always amazed that this wasn't thought of.

It's not a security issue, because flood control and login credentials take care of people trying to automate too much.

Then there is the interest factor - for example, just as I finished my C9 recorder, we started playing F11. So I added F11, and then we started playing random deadlines. So I added that, and now all the C9 code is obsolete.

I think a good, general-purpose Moderator Assistant would have to not even try to do screen-scraping or posting or even night actions. Doing night actions on 20 roles that the app had not ever heard of.... LOL.


drew
Reformation
Premium
join:2002-07-10
Port Orchard, WA
clubs:
·wavebroadband


1 edit
reply to Johnny
The unvote was actually my favorite part of the whole thing. That one really taxed my thinking, which is exactly why I did it first. I figured if I could get past it, it'd be fine.

The key was using the String.Split method. To explain it:
"VotedBy" is a column in the database and could contain a string like "drew, Johnny, yock, Muzscman". Using the .Split, I would have an array of strings, in this case the array would contain: "drew", "", "Johnny", "", "yock", "", "Muzscman". I got hung up on the null strings until I realized I was already doing a string compare against the array at index "i" so to speak. So I just added in a condition to the logic to ignore null strings ;)


Oh, and I here I'm going to RAVE about the way Visual Studio handles Data Connections. It's a bit complicated at first, and caused me to give up quite early into the project until I realized there was a local data problem (the table was being over written each time by the nature of a couple settings). However, using the "TableAdapter", I am able to define SQL Queries and then just use them like they're a function of that adapter. You'll see the most used thing in there is "MafiaTableAdapter.GetVotedBy(lbVotee.Text). That is just the quick and dirty way of running the following SQL, which is something I only had to define once:
The "@Votee" is the variable I stuff in there and have it evaluate. It's no where near a complicated SQL, but I only had to write it once and then I could just call it. I have no idea if this was something that's been around for years, as this is my first application non-work related in a non-dead language that touched any kind of DB. I thought it was the cat's meow.


Johnny
Premium
join:2001-06-27
Atlanta, GA
·Comcast

Yep - Here's my pseudocode for Vote:

Given player "Chip" who wants to vote for "Dale":

1) See if Chip already holds a current vote on somebody - i.e. the value of his VotedFor key is non-blank.
2) If so, see if the player currently voted for is Dale. If so, just return - do nothing.
3) If not Dale, then call Unvote: to unvote whomever Chip's current vote is.
4) Insert Dale as Chip's current voted player.
5) Call the routine to re-calculate the list of voters for each player. Dale's list will thus include Chip, and whomever Chip had previously had a vote on will have Chip removed from their list. This routine also stores the count of votes for each player as it makes the list.
6) Call checkForTwilight to see if Chip's vote was the hammer. If so, see if the hammer caused a win situation. Otherwise call setPostText with the "lynch" boolean set to True. This will cause the setPostText method to remove the lynched player, zero the votes, turn off the Vote and Unvote buttons and enable the Night Action buttons.

If the lynched player was a Doc, a Cop, or a Roleblocker, then their respective boolean is set to "dead" so their Night Action will not be enabled.

After the user sets the night action popups for those night actors that are still alive, the Daybreak button carries out the night actions, checks for game over and lynch-or-lose, records the Cop's findings for the log, and turns on the Vote and Unvote buttons and turns off the Night Action buttons, once again setting "dead" for a night actor who was whacked.

The code never interacts with the UI widgets directly - they are all set to observe the booleans and automatically change their states when the booleans change. (Cocoa Bindings). They also automatically set variables in the code when their setting is changed by the user.
Forums » Tech and Talk » Talk » Pub Games[signup] Monty Python »
« [OT] So I have this domain....  
page: 1 · 2


Tuesday, 10-Nov 19:20:39 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [113] Moto Sold About 100,000 Droids
· [93] Verizon Keeps Swinging At AT&T
· [86] VoIP Over 3G Still Not Working For iPhone
· [64] Government Will Release Some Telco Wiretap Lobbying Documents
· [54] Verizon's Hanging Up On Rural America
· [34] Bill Would Force ISPs To Block Financial Scams
· [30] Verizon's Higher ETFs Annoy Senator
· [25] Sprint Announces Job Cuts
· [24] Mediacom Hints At 50, 100 Mbps Speeds
· [21] Google Offers Free Holiday Airport Wi-Fi
Most people now reading
· Google Has Acquired Gizmo5 [VOIP Tech Chat]
· Water heater pilot light won't light [Home Repair & Improvement]
· Windows 7 boot manager editing questions [Microsoft Help]
· Holy work line speeds!! [TekSavvy]
· A fishy CRTC tarriff filed by bell? [TekSavvy]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· House inspector failed to find major gas leak [Home Repair & Improvement]
· Framed for child porn 151; by a PC virus [Security]
· Replace entry door [Home Repair & Improvement]
· [northeast] Comparison of FiOS Broadband Internet to Comcast Bla [Verizon Fiber Optics]