• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Console doesn't show info from Command Line of a MVC when changing state  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any ideas on why the console doesn't show the command line it was supposed to show nor does accept any input when changing an state? the first state is `WAITINGPLAYERS`, everything works fine then, then i pass to `RUNNING` and there' no problem either, then i can pass to `QUICKACTION` or `MAINACTION` and the problem happens when i pass from `QUICKACTION` or `MAINACTION` to `RUNNING`, the console shows that it has successfully changed state to `RUNNING` but it doesn't show what it was supposed to show like it did when i passed to it from `WAITINGPLAYERS` and i can't execute anything anymore. i created another state `CHANGEPLAYER` with the same messages and input as `RUNNING` and it doesn't work there either.


   
 
Rancher
Posts: 2240
28
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you copy the console from when you execute the program and paste it here to show us what you are talking about?
Please add some comments to the post describing what is wrong.
 
marlon saul palpa zavala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Norm Radder wrote:Can you copy the console from when you execute the program and paste it here to show us what you are talking about?
Please add some comments to the post describing what is wrong.

ok, this is the first screen when the game is in the state WAITINGPLAYERS

this is the screen i get once i enter 2 (start a game), as you can see after the notifications from the view the game state now is RUNNING and the info from the player Marcos, down there it shows all the actions from 3 to 10 that i can execute

this is the screen i get after executing the action 3(elect a councillor) now the game is in the state QUICKACTION as you can see after the view messages, now i can only execute actions from 7 to 10 and additionally the action 11(change player)

and this is the screen where i get the error, it changes the player to marcia and the state to CHANGEPLAYER but as you saw in my code it was supposed to show the same actions like it did in the state RUNNING, but it doesn't show anything, and of course i can't executive any action.
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you copy and paste the console's contents and not take screen shots?  It's not possible to search an image for text or to copy parts of it for making a response.

Also the code does not compile for testing because of missing classes.
 
marlon saul palpa zavala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Norm Radder wrote:Can you copy and paste the console's contents and not take screen shots?  It's not possible to search an image for text or to copy parts of it for making a response.

Also the code does not compile for testing because of missing classes.

but the code it's extremely large, i don't it's gonna let me post that much
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right.  That is way too  much code to post and to expect anyone to copy for testing.  You will need to make much smaller versions of the classes needed to compile and test the code with the problem.

Otherwise my only suggestion is to try to work out the logic problem by debugging the code to see why it is not doing what you want.  I use println stateements that print the values of all the variables used in the code with the problems to see what the computer sees when it executes the code.  Seeing those values should help you understand what is happening.
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you make small, simple  versions of the Model and View classes for testing? 
 
Ranch Hand
Posts: 4696
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I remember the first time I was asked for a ssce(short self contained example). I said no way I can do that. The program has 20 classes. But I was able to demonstrate the problem in less than 50 lines of code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!