I am making a clone of the NYT game Wordle in Python and HTML (using Flask as the webserver infrastructure if that’s relevant) for a high-school level cybersecurity-focused summer camp. For context, the game is intended to show the strength of more complex passwords by allowing the students to guess the passwords in a somewhat game-like format, hence my choice of Wordle as the base or example. For more context, ChatGPT has helped me with the bulk of the program, particularly the HTML formatting and Flask integration. I know the basics of Python from college, so I can look at and make changes to most of the Python backend of this program with very little confusion if any. I know very little of the details of HTML so that is where I needed AI’s help.
In my Wordle clone, I don’t intend there to be a maximum number of attempts; I want the students to keep working through the game until they find the right answer. Therefore, the program creates a new row of Wordle-styled feedback (green for correct characters, yellow for misplaced, red for incorrect, and purple for correctly placed but wrong case) for each guess the user inputs. However, after too many incorrect guesses, the top of the program (including the first [#] of incorrect guesses) begin to be cut off; the user is unable to scroll up far enough to reach the top. I have not had any issues with cutoff on the sides or bottom, just the top.
ChatGPT suggested and tried implementing an anchor tag, but that didn’t solve the problem at all. It caused the program to automatically try to scroll to the top when the correct answer was inputted. While this is very good, it didn’t solve the issue; if too many incorrect guesses had been submitted, the top of the webpage was still inaccessible.
I have tried doing some of my own research into HTML with what I’ve learned from working on this to find what can be done, but I have not had any success in finding an answer. Any help would be appreciated. If I need to clarify more about what my HTML currently looks like and/or post the code I can do so. I would do so now, but I just don’t know what exactly might be relevant and it would be quite a bit of code to sift through in my opinion.
Ethan Haeder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.