Current Status

Category Explanation
Purpose The purpose of DuClick is to use the cookie-clicker style of game to demonstrate our team’s understanding of inheritance, sorting, and complexity analysis using Big O Notation
Inheritance Our upgrades will all be child classes of our Upgrade class, with attributes such as current cost, level, and name. Another possible idea we had is to divide the upgrades into two types: automatic upgrades and manual upgrades. We then have child classes of each unique upgrade that extend the parent classes, following the same logic as the first idea.
Sorting The upgrades are listed in the game view as they would usually be. However, they would be sorted by level. This would be achieved by the program re-sorting the upgrades each time an upgrade was leveled up.
Complexity Since we’re currently using Bubble Sort in our frontend, the time complexity in Big O Notation is O(n) = n2

Current Progress

Here is our runtime Link

Below is an image of our current frontend:

And below are the key parts of our frontend code that make the game work:

  • Upgrades table (cookie is simply an image with an ID referenced in the JS, not worth showing):

  • Variables used in the JavaScript:

  • Handling cookie clicking that plays animation and triggers point increase:

  • Function referenced in above image, update the cookie points in the HTML:

  • Auto-Clicker. When bought, use the setInterval() JS method to automatically increase points by certain amount:

  • Clicker upgrader. When bought, clicking on the cookie yields more points than before:

  • If the costs stayed the same, the game would become very easy very fast, so we increase the cost as shown below:

  • Using sorting in our program proven through sorting the table by level:

Improvements

Our code is good. For a beginner’s project. We are second-year CSA students. This is our warm-up project. We can do better. Here are some of the things we plan to improve on in our ideation:

  • Better-looking layout
  • Better architecture (frontend and backend connecting)
  • Implementing object-oriented programming (inheritance) in the Java code instead of JS imperative programming on the frontend.

For A Better-Looking Layout:

Below are some of the layout options we are considering building off of:

For Better Code/Code/Code:

Our current game uses simple JS to make a basic game. Is our game original? No. Does it need any of the warm-up project requirements? No. Are we going to use those requirements to make the game? Yes, because the whole purpose of making a game that already exists is to show our understanding of the requirements that we went over. In 4 days, we were able to make a working, functional template. We will be using the rest of the week and next week to use our knowledge in inheritance, sorting, and complexity analysis to make this project’s purpose come to life.