zondag 23 januari 2011

Handshaking part 3

like the handshake parts on the team level is implemented by now. Initially I am going for the Team 1 Challenges Team 2. Which is probably the hardest part of the system. Setting up an Admin for team1 vs team2 is only extending the system with a few parts (which is going to be easy).

Initially I had to remodel the database structure once more, since there were 2 things that I felt the need to remodel again. Which is the status field on Dates and Maps.

Eventually I had a similar approach on how I did the whole Match setup, where each team had their own field inside the match table. Now I have extracted the team from the dates and maps and made it their own field.

So maps looks like:

- Id
- MapId
- MatchId
- TeamId
- Status

Dates look like:
- Id
- MatchId
- TeamId
- Status

The reason why I am choosing this method is because it makes it easier to fetch the whole date and maps list. I don't need to worry who is belongs too now since that is just the TeamId in ever table.

This leads me with having the option of an Admin adding a match (since this one was really going to be a bitch with the previous method I setup). In anycase, the status will determine if a 'record' is accepted, declined, pending, or new.

So from an admin point of view, I only need to add the status "New" in there and I am done. For a team challenging another it means that all the dates/maps etc are accepted for Team 1, however they get the New status for Team 2 (since they still need to accept one).

If one is accepted, then THAT specific one gets a new state, the rest just gets ignored. Simple as that.

So the process as it currently goes with the "challenge Team 1 vs Team 2" goes as followed, I as team 1 select my own team. Since I am able to have more then one team, I still need to select which team I am going to pick.

Next up, I need to challenge someone. This is where Team 2 needs to be selected.

Last bit, I have 3 fields to pick from where I can input "potential" dates (which are NOT final) where I think the match can take place.

Also, I have to pick 1 till 3 maps to play (since the other team needs to accept at least one of them). And lastly we have the server bits. Which is in this case optional, and can be altered in a later stage.

I fill in this form, and we have ourself a pending match. At this point, I might add that the "SAVE" button DOES save all the information, however it does not show it after I pressed save. This is something I still need to fix.

When I log out and log in as the team captain I just challenged, I'll see this notification at the lower left corner:

Offcourse, this needs to be tweaked and all that. But at least it keeps track of the amount of pending matches that I have in my "inbox" more or less. So that part of the system is more or less working. But needs a fine tune somewhere. We'll get back to that one.

Anyways, to popup the pending matches, I have used the Team Control panel to show most of the important stuff about the team. This might lead to some confusion in the long run (since the team control panel shows alot of info).



There is a section called "PENDING MATCHES". There is will display the once that have been accepted, declined, pending or are new. Eventually this part needs to have a fine tune moment aswell, since there is no date involved yet (so the list just becomes bigger). But that will come in time.

But anyways, by clicking on the match details (which is in this case "TITLE", and has the status NEW) I can bring up the match details and see what dates the other teams have suggested for the match to run.



At this point it has a few different sections:

- Team vs Team
- Dates
- Maps
- Match information
- Player lineup

The last part is not visible on this picture, but in simple terms it just shows a list of all the players belonging to both teams.

The team vs team still needs to be finished, since I haven't gotten around to the inputs of the scores yet. As soon as I get there, and have a ladder/tourney, I can start adding losses/wins (hopes that makes sense).

The dates section is the dates that were recommended by the other team who challenged me. In this case I can only choose from 1 of the 3 dates. If someone enters 2 dates, I can only select 1 date from 2.

Same goes with the maps. We have 3 maps to choose from, and we need to select at least one.

The rest (match info, player line up) is just additional info which tells us what type of game,map, who made the challenge bla bla etc.

in this case, I'll select 1 feb 2011, and go with the map "Kaboom" (does that map even exists? I don't know).

After pressing the "Accept the match" I'll get the same screen, but... without the optional dates.



In fact, it tells me now that the match takes place on 1 feb 2011 19:00, i have 1 week 1 day, 12 hours and 35 before this match starts. The match accepted is filled in with my name (because I accepted it under the account "YO YO")

And I just realized a bug in the system because it displays the wrong map name... Nice!

Lets fix this one ;)

Geen opmerkingen:

Een reactie posten