Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- if((die1Value + die2Value < 7) && (request.getParameter("l") != null)){
- double cb = Double.parseDouble(session.getAttribute("balance").toString()) + Double.parseDouble(request.getParameter("amount"));
- session.setAttribute("balance", cb);
- int cc = Integer.parseInt(session.getAttribute("count").toString()) + 1;
- session.setAttribute("count", cc);
- %>
- <p>Current balance: <%=nf.format(cb)%></p>
- <p>Current bet: <%=nf.format(Double.parseDouble(request.getParameter("amount")))%></p>
- <p>Current bet type: <%=request.getParameter("l")%></p>
- <p>Your roll:</p>
- <%
- if(die1Value == 1){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/1/1b/Dice-1-b.svg"/>
- <%
- }
- %>
- <%
- if(die1Value == 2){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/5/5f/Dice-2-b.svg"/>
- <%
- }
- %>
- <%
- if(die1Value == 3){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Dice-3-b.svg"/>
- <%
- }
- %>
- <%
- if(die1Value == 4){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/f/fd/Dice-4-b.svg"/>
- <%
- }
- %>
- <%
- if(die1Value == 5){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/0/08/Dice-5-b.svg"/>
- <%
- }
- %>
- <%
- if(die1Value == 6){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/2/26/Dice-6-b.svg"/>
- <%
- }
- %>
- <%
- if(die2Value == 1){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/1/1b/Dice-1-b.svg"/>
- <%
- }
- %>
- <%
- if(die2Value == 2){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/5/5f/Dice-2-b.svg"/>
- <%
- }
- %>
- <%
- if(die2Value == 3){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Dice-3-b.svg"/>
- <%
- }
- %>
- <%
- if(die2Value == 4){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/f/fd/Dice-4-b.svg"/>
- <%
- }
- %>
- <%
- if(die2Value == 5){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/0/08/Dice-5-b.svg"/>
- <%
- }
- %>
- <%
- if(die2Value == 6){
- %>
- <img src="https://upload.wikimedia.org/wikipedia/commons/2/26/Dice-6-b.svg"/>
- <%
- }
- %>
- <p>Congratulations! You won <%=nf.format(Double.parseDouble(request.getParameter("amount")))%>.</p>
- <%
- }
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement