ezio2010
October 5th, 2010, 03:05 PM
hi i have a small web project that i am working on and have gotten stuck trying to convert what i have in concept into code.
the idea is to make a tournement event reporter for a online card game that has no pre installed reporter below is how the reporter would run
outline for event reporter
On load
Player Logs in
ask player if they want to enter event
if yes
enter player into the listings
if no
player watches listings
before round starts
if first round
randomly generate match pairings
else
pair players on last rounds win/draw/lose ratio and who players haven't played against during this event
during round
show current standings of the event
countdown timer
start timer at 1:00:00 text colour green
if timer.time is less than 0:30:00
text colour = amber
alert message Half hour left
else if timer.time is less than 0:15:00
text colour = Red
alert message fifteen minutes left
else if timer.time is 0:00:00
alert message end of round
players enter match scores in the form of 2-0/2-1 1-2/0-2 or 1-1
if player =2-0/2-1
add 1 to win counter
else if player = 1-2/0-2
add 1 to loss counter
else
add 1 to both players draw counter
update standings
i have already got the user table set up with end of match scores set in a MySQL database the main bits that are troubling me are the IF statments and the 1 hour count down timers
and sample codes would be greatly apriciated
the idea is to make a tournement event reporter for a online card game that has no pre installed reporter below is how the reporter would run
outline for event reporter
On load
Player Logs in
ask player if they want to enter event
if yes
enter player into the listings
if no
player watches listings
before round starts
if first round
randomly generate match pairings
else
pair players on last rounds win/draw/lose ratio and who players haven't played against during this event
during round
show current standings of the event
countdown timer
start timer at 1:00:00 text colour green
if timer.time is less than 0:30:00
text colour = amber
alert message Half hour left
else if timer.time is less than 0:15:00
text colour = Red
alert message fifteen minutes left
else if timer.time is 0:00:00
alert message end of round
players enter match scores in the form of 2-0/2-1 1-2/0-2 or 1-1
if player =2-0/2-1
add 1 to win counter
else if player = 1-2/0-2
add 1 to loss counter
else
add 1 to both players draw counter
update standings
i have already got the user table set up with end of match scores set in a MySQL database the main bits that are troubling me are the IF statments and the 1 hour count down timers
and sample codes would be greatly apriciated