Two pairs of the text fields, in each pair one field for giving a login, and the second for a password
The contents of all the fields should be validated: in each pair the first one should
contain a one word login, containing small case letters, digits and '_' only, the second should be an at least 8-character password,
and should be masked with ******** while typing in; there is no further
validation of the password
After the page is submitted, we are redirected to the page 2
Page 2:
A prompt label
two game fields for two players, each containing:
a label showing player's login
three slots for dice images
use the dice images contained in the zip file here; make sure that each of the players has a different dice color
three combo boxes, containing two options: "Hold" and "Roll", each under one of dice images
a "Roll" and "Confirm" button
An "Result" button, which redirects to the page 3
Game rules:
At start, both fields contain the empty images only, and only the "Roll" buttons are visible
Move 1: The player rolls the dice ("Roll" button). After this three (randomly chosen) dice images appear in the dice slots. Under the dice appear the combo boxes (with the default "Hold" option), and a "Confirm" button
Move 2: The player can roll his dice for the second time: he can choose which of the dice he wish to roll again (selects "Roll" on an appropriate combo box), and pushes the "Roll" button again; He can also confirm (with the "Confirm" button), that he doesn't want to roll again
Both players move one after another: player 1 move 1, player 2 move 1, player 1 move 2, player 2 move 2; make sure, that the controls of the player, who doesn't have the right to move are not accessible
After both players finish their moves, only the dice images are visible, and the "Result" button appears, which redirects to the page 3
The winning player is the one who:
has the higher number of dice with the same value
if both have the same number (3 or 2) of dice with the same value, the winner is the one with the highest value on them
if both players have only 2 dice with the same value, and these values are the same, the winner is the one, who has a third dice with the highest value
if both players have all the dice with different values, the winner is the one with a dice with the highest value; if these are the same, the second highest value decides, and if these are also the same, the value on the third dice gives the result
if there is a draw (both players have the same dice), each of them scores a point
Page 3:
two labels with players logins
two labels with already scored points
a label saying who won the last game
Two buttons: "Continue" and "Finish"
The
"Continue" button redirects to the page 2 which enable to play the game again. Apply one (and only one) of two following rules:
1) the player, who lost the last game, starts a new one
2) the player, who hasn't been starting the last game, starts a new one
The "Finish" button redirects to the page 1, enabling two new players to play (remember to clear the score)
Technical requirements:
Use the FlowLayout for the appropriate page display
Hints:
RegularExpressionValidator for validating the players' logins and passwords
use <img src="file_name"> for displaying the images
Approximate points:
pages layout: 3.0
page 1 validation and submission: 1.0
page 2 use of dropdown boxes, image changes and submission: 3.0
page 3 price sheet display, validation and submission: 1.0
game functionality 2.0 + 1.0 extra for applying game rules for 5 dice