aspose file tools*
The moose likes JSP and the fly likes How to show previous 5 throws of game rock,paper and scissor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to show previous 5 throws of game rock,paper and scissor" Watch "How to show previous 5 throws of game rock,paper and scissor" New topic
Author

How to show previous 5 throws of game rock,paper and scissor

sumit jagtap
Greenhorn

Joined: Dec 08, 2011
Posts: 26
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
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: 26
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: 1649
    
    7

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: 1018
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: 26
thanks Stefan Evans
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to show previous 5 throws of game rock,paper and scissor