Win4Generator, written in JavaFX. Uses Selenium for webapp parsing.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luiserebii 483a9b2422
Minor spelling/grammatical changes to README.md (Did Win4 shift to Win 4? Keeping previous spelling for the sake of consistency...)
1 year ago
.settings GUI styled, roughed out. First time using Selenium to scrape data off of the Win4 lottery site, code works, but is not perfect (Needs Thread.sleep(), which causes freezing, and would be preferable to make browser invisible) 4 years ago
bin Committing changes not committed before to push to luis@serebii.io git 1 year ago
data Committing changes not committed before to push to luis@serebii.io git 1 year ago
fonts First commit, setting up basic GUI first, with controller. 4 years ago
img Minor aesthetic changes made, fixed issue of slight gray underline under settings button. Settings button now "grays out" when hovered over. 4 years ago
src Committing changes not committed before to push to luis@serebii.io git 1 year ago
.classpath GUI styled, roughed out. First time using Selenium to scrape data off of the Win4 lottery site, code works, but is not perfect (Needs Thread.sleep(), which causes freezing, and would be preferable to make browser invisible) 4 years ago
.project First commit, setting up basic GUI first, with controller. 4 years ago
LICENSE Create LICENSE 1 year ago
README.md Minor spelling/grammatical changes to README.md (Did Win4 shift to Win 4? Keeping previous spelling for the sake of consistency...) 1 year ago
build.fxbuild First commit, setting up basic GUI first, with controller. 4 years ago
phantomjsdriver.log Minor spelling/grammatical changes to README.md (Did Win4 shift to Win 4? Keeping previous spelling for the sake of consistency...) 1 year ago

README.md

Win4Generator

A Win4 Lotto Number Generator implemented in JavaFX, along with Selenium for website parsing.

The central idea behind this application is to provide randomly generated lotto numbers that have not been used in the past, under the assumption that previous lotto numbers are not used. From a pure probability standpoint, this idea is mathematically incorrect, but makes for an interesting idea nonetheless.

Since the page for finding the previous winning Win4 numbers only really works by interfacing with a web UI (need to interact with a web app), I used Selenium’s PhantomJSDriver to virtually browse and parse the webpage for the winning numbers, which is then saved in the “data” directory as a .txt file.



Image of the Win4Generator GUI

NOTE: This software was written for the Win4 page as it appeared from 2016-2017. This application may not update correctly with the current version of the page, should it have changed.

Features

Win4 Number Generation:

Generates 4 numbers, excluding numbers that have won in the past.

Updating:

Put simply, clicking the “Update” button will update the data/winners.txt file. The latest date to which the data has been updated to is also listed on the main GUI window, useful for knowing whether the data needs updating or not.

Settings:

Clicking the gear in the top right will launch the access to the settings:


Image of the Settings GUI

Order Matters

By default, the program will have this setting checked off. The Win4 numbers follow a particular order, and if one wishes to exclude number combinations that have been used (regardless of order), this setting can be toggled to off. Therefore, keeping this on will simply reject randomly generated lotto numbers if they match exactly, but not if they use the same pool of integers.


Future Implementation

  • Ability to turn filtering of previously used values entirely
  • Updating to work with the current version of of the past winning numbers page

Appendix

A. “Win 4 Past Winning Numbers | New York Lottery”: http://nylottery.ny.gov/wps/portal/Home/Lottery/home/your+lottery/winning+numbers/win4pastwinning+numbers


DISCLAIMER: Win4 and the Win4 logo, as well as the names and logos of related content, are the property of New York Lottery, and any other parties not mentioned hitherto.