Author
How to show previous 5 throws of game rock,paper and scissor
sumit jagtap
Greenhorn
Joined: Dec 08, 2011
Posts: 19
Hi,
i want to show my previous 5 throws on my single JSP page
can anyone help me?
Jim Pouwels
Ranch Hand
Joined: Feb 22, 2012
Posts: 61
posted Sep 11, 2012 02:10:52
0
There's no possible way for us to provide you with a good answer to this question. There's no context what so ever.
What have you developed so far? What code do you have? What's your way of working?
sumit jagtap
Greenhorn
Joined: Dec 08, 2011
Posts: 19
hope you know the rock , paper and scissor game, its a small game with some rules i have developed it on using java script.
i want to just know how to display my previous or last 5 throws in my jsp page.
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
Please read NotACodeMill and ShowSomeEffort . If you show us what you have tried we will be happy to assist you.
[How To Ask Questions ][Read before you PM me ]
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1003
To display the last 5 previous throws, you need a data structure to store them.
A list/array of previous results would do.
So after each "match" store the choices and the result into this array, expiring the oldest one if necessary.
To display them, you just need to iterate through the array in order.
sumit jagtap
Greenhorn
Joined: Dec 08, 2011
Posts: 19
thanks Stefan Evans
subject: How to show previous 5 throws of game rock,paper and scissor