Daniel-Martinez / Tags

Tags
0 stars 0 forks source link

Score keeper #51

Closed Daniel-Martinez closed 10 years ago

Daniel-Martinez commented 10 years ago

now that we have access to the mock target server we can add a score.

Daniel-Martinez commented 10 years ago

looking at the way the game will work I propose we fire at up to 4 targets and then calculate the score based on that wave of attack.

Daniel-Martinez commented 10 years ago

Will work with test server to see if the newly implemented method will calculate our score. After firing at all targets left to right the call to the server to retrieve an update list is called, then score is calculated. See code snippet below.

Daniel-Martinez commented 10 years ago

GameChoice() is the method that asks the game server for a new list after attack on targets. GameChoice();

            //This block will aquire Target list to include Hit status and update GUI

            foreach (var target in Targets)
            {

                double temp_score = target.Hit * target.Points;
                score = score + temp_score;
                OnPropertyChanged("score");
            }
Daniel-Martinez commented 10 years ago

After re-test of game server the score is now correctly being displayed after each pass at the targets.