Installations
npm install tambola-generator
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
14.15.4
NPM Version
6.14.10
Score
71.4
Supply Chain
95.2
Quality
75.3
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
Download Statistics
Total Downloads
5,705
Last Day
1
Last Week
23
Last Month
79
Last Year
1,064
GitHub Statistics
5 Stars
8 Commits
5 Forks
2 Watching
2 Branches
1 Contributors
Package Meta Information
Latest Version
1.0.0
Package Id
tambola-generator@1.0.0
Unpacked Size
26.06 kB
Size
5.60 kB
File Count
15
NPM Version
6.14.10
Node Version
14.15.4
Total Downloads
Cumulative downloads
Total Downloads
5,705
Last day
0%
1
Compared to previous day
Last week
-11.5%
23
Compared to previous week
Last month
-41%
79
Compared to previous month
Last year
87.3%
1,064
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
4
tambola-generator
A library for generating tambola tickets and the draw sequence Home / demo page
Installation
We use npm for dependency management, run
1npm install --save tambola-generator
Usage
In your NodeJS application, require the module:
1var tambola = require('tambola-generator');
To get tickets, use the getTickets(count) method:
1tambola.getTickets(100) //This generates 100 tambola tickets
To get the draw sequence, use the getDrawSequence() method:
1tambola.getDrawSequence() //Returns numbers 1-90 scrambled
JSON
1// Tickets array 2[ 3 [ 4 [0,18,23,40,48,0,0,73,0], 5 [5,0,0,0,42,52,0,80,83], 6 [0,20,0,0,49,58,65,0,85] 7 ], 8 [ 9 [10,0,21,34,0,0,65,0,83], 10 [0,11,0,36,41,0,62,0,85], 11 [0,19,26,37,43,0,67,0,0] 12 ] 13]
1// Draw Sequence 2[72,65,47,89,42,4,61,84,36,22,37,18,9,27, 312,71,46,15,30,55,17,3,56,25,68,80,43,26, 450,39,53,38,60,31,28,11,8,62,49,79,51,35, 514,67,45,41,40,5,44,34,73,32,86,69,70,48, 621,33,83,13,54,77,78,90,29,6,52,59,58,66, 776,1,10,24,19,64,85,7,74,2,16,63,88,23,57 8,87,81,82,20,75]
Rules
A ticket consists of a random distribution of 15 numbers between 1-90 in a 3x9 grid
- RULE #1 - Each row cannot have more than 5 numbers
- RULE #2 - Each column is assigned a range of numbers only: 1-10 can appear only in column 1, 11-20 can appear only in column 2, 81-90 can appear only in column 9
- RULE #3 - In a specific column, numbers must be arranged in ascending order from top to bottom
- RULE #4 - Each column must have at least 1 number
Algorithm
- Generate a grouped list of numbers from 1-90, grouped by every 10th number. Each group corresponds to a column of the ticket.
- Generate a 2D array of 3 rows and 9 columns filled with 0s.
- For each column of the ticket, randomly choose a row and number from the grouped list above.
- If the row is not already full (<5) and the number in that location is 0,
- Insert the chosen number
- Delete the chosen number from the grouped list
- If the row is not already full (<5) and the number in that location is 0,
- Recursively, loop through all rows and colums of the ticket:
- Generate a random chance value as a boolean.
- If the row is not already full (<5) and the column is not already full (<3) and the random chance is true and the value at the location is 0
- Insert the chosen number
- Delete the chosen number from the grouped list
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.6
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More