
1
Лариса
no recommendations
no complaints
Closed
Project title: Implement widget "Russian roulette" on the site in the form of a plugin Jquer
Type of cooperation: One-time project
Section: Web development
Prepayment: without prepayment
Acceptance of requests: closed
Type of cooperation: One-time project
Section: Web development
Prepayment: without prepayment
Acceptance of requests: closed
Project description:
Implement the widget "Russian roulette" on the site in the form of a plugin Jquery.
Example:
It's in HTML.
In JavaScript, we prescribe:
CreateRoullet({key1: value1, key2: value2, key3: value3, ..., keyN, valueN})
in the specified div'e we get the required widget with the properties described below.
The algorithm of the work (client):
1) there is a rectangular block (no more than 1000px) which depicts a roulette table in a casino.
2) there is a rectangular area (1) on which red and white rectangles are laid out with tiles (in any order).
Also, instead of a red or white rectangle, there may be a photo of the user who has placed a bet on this position.
(3) Only one user may bet on one entry.
4) The user can place a bet by clicking on the button (2) (after pressing this button, the roulette must take the form (5)) and clicking on the desired free position.
(5) The roulette image (4) is continuously rotated counterclockwise (or clockwise)
6) The counter (3) shows the time remaining before the draw (days, hours, minutes, seconds) (the draw takes place on the server and the server gives the winner's id)
7) During the draw, the roulette (4) is accelerated to rotate several seconds in the opposite direction, then freezes and instead of positions, an image of the winner's avatar and the inscription: the user won %username%
Or (in case of a win by the current user) you won and won %%%%%%%%%%%%%.
(8) After the draw, the widget waits for the server to start the next draw. Once the next draw has started, the roulette (4) is slowly spinning again.
(9) The normal position of the widget is shown in figure 001.jpg and when pressed on the button (0), the widget is smoothly extended and fully displayed. In the center of the browser window
(10) If a user attempts to place a bet on a position, a message must be given to the user that the bet has already been placed on that position.
(11) If the user does not have sufficient funds in his account, he should be informed about this
Input data of the implemented function:
{
Frequency of ajax queries: value1, // (in seconds or milliseconds – no matter)
Roulette speed in normal mode: value2,
The speed of the roulette during the draw: value3,
Roulette rotation direction in normal mode: value4, // (0 - against the hourly, 1 - hourly)
Roulette rotation during the draw: value5
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Size and position of controls: ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Other data that the developer considers necessary to consider
?
Algorithm of work (server):
1) At the request of the client, sends the current state of the roulette (user ID in positions, time before the draw, etc.)
(2) When attempting to place a bet, check whether the user's position and balance are occupied (in the database). In case of luck, the player will bet the game (the bet is fixed and the same for everyone)
(3) If the draw time is up, it generates a random number from 1 to 36 and stores in the cache (memcached) the id of the winner who put on the generated number. Sends all customers the winner's id.
(4) the winner's id is hung in the cache until the next draw.
5) the current state of the roulette is stored in memcached
(6) the time before the draw, the pause between the draws, are taken from the config.
(7) no bet may be placed during the pause between draws. Everyone sees only the previous winner.
Data exchange between AJAX client and server requests
At the discretion of the developer, the server can return both the JSON object and the already ready HTML.
The database structure is attached.
The user session ID is stored in cookies. A on the server side in memcached (Standard PHP session mechanism is not used)
Implement the widget "Russian roulette" on the site in the form of a plugin Jquery.
Example:
It's in HTML.
In JavaScript, we prescribe:
CreateRoullet({key1: value1, key2: value2, key3: value3, ..., keyN, valueN})
in the specified div'e we get the required widget with the properties described below.
The algorithm of the work (client):
1) there is a rectangular block (no more than 1000px) which depicts a roulette table in a casino.
2) there is a rectangular area (1) on which red and white rectangles are laid out with tiles (in any order).
Also, instead of a red or white rectangle, there may be a photo of the user who has placed a bet on this position.
(3) Only one user may bet on one entry.
4) The user can place a bet by clicking on the button (2) (after pressing this button, the roulette must take the form (5)) and clicking on the desired free position.
(5) The roulette image (4) is continuously rotated counterclockwise (or clockwise)
6) The counter (3) shows the time remaining before the draw (days, hours, minutes, seconds) (the draw takes place on the server and the server gives the winner's id)
7) During the draw, the roulette (4) is accelerated to rotate several seconds in the opposite direction, then freezes and instead of positions, an image of the winner's avatar and the inscription: the user won %username%
Or (in case of a win by the current user) you won and won %%%%%%%%%%%%%.
(8) After the draw, the widget waits for the server to start the next draw. Once the next draw has started, the roulette (4) is slowly spinning again.
(9) The normal position of the widget is shown in figure 001.jpg and when pressed on the button (0), the widget is smoothly extended and fully displayed. In the center of the browser window
(10) If a user attempts to place a bet on a position, a message must be given to the user that the bet has already been placed on that position.
(11) If the user does not have sufficient funds in his account, he should be informed about this
Input data of the implemented function:
{
Frequency of ajax queries: value1, // (in seconds or milliseconds – no matter)
Roulette speed in normal mode: value2,
The speed of the roulette during the draw: value3,
Roulette rotation direction in normal mode: value4, // (0 - against the hourly, 1 - hourly)
Roulette rotation during the draw: value5
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Size and position of controls: ...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Other data that the developer considers necessary to consider
?
Algorithm of work (server):
1) At the request of the client, sends the current state of the roulette (user ID in positions, time before the draw, etc.)
(2) When attempting to place a bet, check whether the user's position and balance are occupied (in the database). In case of luck, the player will bet the game (the bet is fixed and the same for everyone)
(3) If the draw time is up, it generates a random number from 1 to 36 and stores in the cache (memcached) the id of the winner who put on the generated number. Sends all customers the winner's id.
(4) the winner's id is hung in the cache until the next draw.
5) the current state of the roulette is stored in memcached
(6) the time before the draw, the pause between the draws, are taken from the config.
(7) no bet may be placed during the pause between draws. Everyone sees only the previous winner.
Data exchange between AJAX client and server requests
At the discretion of the developer, the server can return both the JSON object and the already ready HTML.
The database structure is attached.
The user session ID is stored in cookies. A on the server side in memcached (Standard PHP session mechanism is not used)