gifflen / Javademic

An educational clone of the board game Pandemic by Zman Games
1 stars 3 forks source link

Treat Disease with Rough psuedocode #6

Open drinne opened 12 years ago

drinne commented 12 years ago

Treat Disease

Treat Disease • If player/pawn role == Medic then SpecialAbility is this.SpecialAction • and GUI Special Actions Menu puts “Treat Disease” button on top in “Special Ability” button field • and resorts the other buttons into the “Special Action” buttons • If Medic && mousclicked Treat Disease Button Location diseaseCubes = 0 • Add previous location diseaseCube count back to diseasecube count

Else • If Player/pawn role != Medic && • If Currentplayer’s Location contains diseaseCube == 0 • location then display inactive “Discover A Cure” button • If Currentplayer’s Location contains diseaseCube >0 then display clickable “Discover A Cure” button

Special Action user prompt to select diseasecube for treatDisease “Please select the disease you would like to treat” /buttons “yes” , “no” “return to Action Menu” • Location contains diseaseCube – this.diseasecube • Update location • On Mouseclick the GUI will prompt the Currentplayer “ You have treated Disease (X) !” • Update Board state • this.Location registers to the eradicationCount() && checks to confirm Currentplayer location then update board state and turnActionCount - -
• if turnActionCount == 0 then startDrawPhase else display ActionMenu GUI for Currentplayer

maxknee commented 12 years ago

I'll do this tongiht