GithubHelp home page GithubHelp logo

hyperskill's People

Contributors

nghian95 avatar

Watchers

 avatar  avatar

hyperskill's Issues

Changing desired size too often can trigger ArrayIndexOutOfBoundsException

Exception in thread "generation" java.lang.ArrayIndexOutOfBoundsException: Index 31 out of bounds for length 25
at ConwayGameOfLife.Generation.setUniv(Generation.java:173)
at ConwayGameOfLife.Generation.restGen(Generation.java:282)
at ConwayGameOfLife.Generation.run(Generation.java:256)
at java.base/java.lang.Thread.run(Thread.java:833)

Happened when trying to move desired size to 125 and back down. See if it's replicable with smaller sizes but frequent changes (~50 desired size)

Refactor code and separate functionalities into more classes and methods

Currently there's 4 classes and it's difficult to understand what each class is responsible for. The code should be separated and each class and it's methods should have a clear responsibility and function.

  1. Main.java
  2. GameOfLife.java
  3. Generation.java
  4. Universe.java
  • Split up variables into groups that fit each other

UI Enhancements

  1. Make Load & Save the same size as Pause & Reset
  2. Make Desired Generations and Desired Size textboxes a static size.
  3. Add text or some indicator below Change Evolution Speed to show which way is faster/slower
  4. Change "Pause" text to "Resume" when paused.

Nav bar implementation

Nav bar with some basic functionality like: File (Load, Save, Pause, Reset), About (Rules for ConwayGameOfLife)

Infinity mode

Add a functionality that will make the code continuously run until there are no more changes.

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.