gifflen / Javademic

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

Action menu with regular action design with rough pseudocode #3

Open drinne opened 12 years ago

drinne commented 12 years ago

Action Menu Regular actions = 1 action

Drive If Drive is chosen then check Location for LocationConnectsto: • display connected locations menu, (or if we have time in the future just have the connected location glow and activate their hotspots using drop and drag functionality) • user input selects the connected city and player/pawn moves to the new Location, when this.Location registers the player/pawn in it’s occupied zone turnActionCount – • if turnActionCount == 0 then startDrawPhase else display ActionMenu GUI for Currentplayer

Direct Flight If Currentplayer’s Hand contains PlayerCard then DirectFlight submenu displays “Choose Flight Destination” and has buttons for each PlayerCardLocation Direct Flight Submenu has three choices /buttons “yes” , “no” “return to Action Menu • On Mouseclick the GUI will prompt the Currentplayer “ You have chosen (this.PlayerCardLocation), are you sure you’d like to fly there?” • If mouseClick = “yes” then player/pawn moves to the new Location, when this.Location registers the player/pawn in it’s occupied zone this.PlayerCard is moved from PlayerHand to PlayerCardDiscardDeck • turnActionCount – • if turnActionCount == 0 then startDrawPhase else display ActionMenu GUI for Currentplayer else • If mouseClick = “return to Action Menu” Display Action Menu, exit Direct Flight submenu • If mouseClick = “no” reset DirectFlight Submenu

Charter Flight If Currentplayer’s Hand contains PlayerCard == this.Location then display CharterFlight menu CharterFlight submenu displays “Choose Flight Destination” and has buttons for all Locations CharterFlight Submenu has three choices /buttons “yes” , “no” “return to Action Menu” • On Mouseclick the GUI will prompt the Currentplayer “ You have chosen (this.Location), are you sure you’d like to fly there?” • If mouseClick = “yes” then player/pawn moves to the new Location, when this.Location registers the player/pawn in it’s occupied zone this.PlayerCard is moved from PlayerHand to PlayerCardDiscardDeck • turnActionCount – • if turnActionCount == 0 then startDrawPhase else • If mouseClick = “return to Action Menu” Display Action Menu, exit Charter Flight submenu If mouseClick = “no” reset CharterFlight Submenu

Shuttle Flight If Currentplayer’s Location contains Reasearch Station == this.Location then display ShuttleFlight menu Shuttle Flight submenu displays “Choose Flight Destination” and has buttons for all Locations that contain research stations – this.Location ShuttleFlight Submenu has three choices /buttons “yes” , “no” “return to Action Menu” • On Mouseclick the GUI will prompt the Currentplayer “ You have chosen (this.Location), are you sure you’d like to fly there?” • If mouseClick = “yes” then player/pawn moves to the new Location, when this.Location registers the player/pawn in it’s occupied zone then turnActionCount – • if turnActionCount == 0 then startDrawPhase else display ActionMenu GUI for Currentplayer else

  1. If mouseClick = “return to Action Menu” Display Action Menu, exit Charter Flight submenu If mouseClick = “no” reset ShuttleFlight Submenu

Pass On MouseClick the passbutton will check turnActionCount if turnActionCount != 0 then GUI Prompt – are you sure you would still like to pass your turn you still have (turnActionCount) actions left y/n?) • If mouseClick = “yes” then startDrawPhase else display ActionMenu GUI for Currentplayer

ghost commented 12 years ago

I'll see what I can do.

ghost commented 12 years ago

Does this still need to be resolved? I don't want to waste time on this if it is done and I can be used somewhere else.

drinne commented 12 years ago

I have a compile error on the Board code - so I'm not sure if Board is supplying the action menu right now. Could you check the code and see if you can get it to compile?

I don't see code for an action menu to be called up but there are some actions in actions.java Dirve for instance is there.

On Dec 17, 2011, at 3:30 PM, chinogithub wrote:

Does this still need to be resolved? I don't want to waste time on this if it is done and I can be used somewhere else.


Reply to this email directly or view it on GitHub: https://github.com/Gifflen/Javademic/issues/3#issuecomment-3191310

ghost commented 12 years ago

Board.java compiled for me. This was all that I got on jGrasp Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

drinne commented 12 years ago

I seem to be having it miss a connection to researchStations

Ok - I'll keep working on the jgrasp project build

On Dec 17, 2011, at 4:05 PM, chinogithub wrote:

Board.java compiled for me. This was all that I got on jGrasp Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.


Reply to this email directly or view it on GitHub: https://github.com/Gifflen/Javademic/issues/3#issuecomment-3191451

drinne commented 12 years ago

I'm getting this

Board.java:39: cannot access Roles.ResearchStationCollection bad class file: ./Roles/ResearchStationCollection.java file does not contain class Roles.ResearchStationCollection Please remove or make sure it appears in the correct subdirectory of the classpath. private ResearchStationCollection researchStations; ^ 1 error

and this

--jGRASP exec: javac Game.java Board.java:39: cannot access Roles.ResearchStationCollection bad class file: ./Roles/ResearchStationCollection.java file does not contain class Roles.ResearchStationCollection Please remove or make sure it appears in the correct subdirectory of the classpath. private ResearchStationCollection researchStations; ^ 1 error

but the class files are in it.

On Dec 17, 2011, at 4:05 PM, chinogithub wrote:

Board.java compiled for me. This was all that I got on jGrasp Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.


Reply to this email directly or view it on GitHub: https://github.com/Gifflen/Javademic/issues/3#issuecomment-3191451

ghost commented 12 years ago

The one that I pulled from Git in a zip compiles. I pulled the one from Dropbox and that one has a error on

Board.java:15: cannot find symbol symbol : class Pawn location: class Board private Pawn[] players; ^ the code for both are different. Which is more current? Git or Drop?

drinne commented 12 years ago

I would trust git for that one more than dropbox

Bruce wrote it and he's the one maintaining our Git

On Dec 17, 2011, at 4:32 PM, chinogithub wrote:

The one that I pulled from Git in a zip compiles. I pulled the one from Dropbox and that one has a error on

Board.java:15: cannot find symbol symbol : class Pawn location: class Board private Pawn[] players; ^ the code for both are different. Which is more current? Git or Drop?


Reply to this email directly or view it on GitHub: https://github.com/Gifflen/Javademic/issues/3#issuecomment-3191564

ghost commented 12 years ago

Download the git and see if you still have the problem. I will be online for another 30mins and then I have to run. I will see if I can jump back in about 10pm