GithubHelp home page GithubHelp logo

wordle's Introduction

Wordle

  1. 2D Arrays I used 2D Arrays to implement the board to store each letter and their corresponding states. This is an appropriate use of the concept because each position in the array is a Tile class object. Using 2D Arrays, I can accurately store the game board since it is in the form of a grid.

  2. Collections I used collections to store all the 6 letter english words and act as a word bank. This comes from the feedback I got after submitting my proposal. I used TreeSet to store the words because each word only occurs once and there are no identical words in a word bank. Every time when I want to choose a word in the word bank, it is easy to retrieve the word.

  3. File I/O I used File I/O in two places. First, I used it to read the txt file that stores all the 6-letter words. Because each word is right next to each other with a space in between, it is easy to iterate through the file with File I/O. Then, I used it to save and restore the game state. I stored all the current game states into a file called gamestate.txt. When the restore function is called, the program will read from the text file. It is an appropriate use of File I/O.

  4. JUnit Testable Component I designed the model to be independent from the GUI components so that it can run without the GUI interface. I individually designed functions to deal with checking valid word, picking word, assigning states to each time, and many other functions.

wordle's People

Contributors

fionajiangyf avatar fionaajiang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.