Del-Norte-Farmers-Iowa-Hawkeyes-Fanclub / IHF-Frontend

Blogs and Issues for project Planning
https://del-norte-farmers-iowa-hawkeyes-fanclub.github.io/Del-Norte-Association-of-Sustainable-Farmers-Saftey-OSHA-and-Fantasy-Log-Book/
Apache License 2.0
0 stars 0 forks source link

Big Project Feature Check #1 - Trio: Sreeja, Vinay, Raunak #12

Open raunak2007 opened 3 months ago

raunak2007 commented 3 months ago
  1. Live Demo
  2. Pull Requests!: https://github.com/Del-Norte-Farmers-Iowa-Hawkeyes-Fanclub/The-Del-Norte-Association-of-Farmers-Presents-Interactive-Sustainable-Farming-Initiative/pull/13
  3. Scrum Board (Organization) : https://github.com/orgs/Del-Norte-Farmers-Iowa-Hawkeyes-Fanclub/projects/3
  4. Deployed Link
  5. Wednesday Workshop Materials and PBL Features

image if statements are an example of a control structure

image

Agile Manifesto:

Screen Shot 2024-03-18 at 11 15 12 AM

Our Progress

  1. We have the ability to clear field using slash and burn --> info about the issues with the this method and the various other kinds of forest clearing
  2. We then go to a farm, and make the user prepare the field by tilling explain the issues vs no till
  3. we allow the user to plant corn --> discuss general agricultural topics
  4. flood irrigation --> various aspects of the issues present and compare it to other aspects of irrigation and the ability for soil salinization
  5. We then allow them to apply pesticides --> discuss harms of synthetic pesticides and talk about general aspects of integrated pest management
  6. We then allow them to harvest the corn --> sell it --> we predicted the pirces using the linear regresssion model using corn futures --> then go into sports betting
  7. We also integrated the basketball user stats into index.html (the login page) to show that the payment system can be seamlessly integrated between the two games.

Work Each Person Did

Sreeja

Vinay

Raunak

Pull Requests For Integrating NBA and Corn Farmer Game!: https://github.com/Del-Norte-Farmers-Iowa-Hawkeyes-Fanclub/The-Del-Norte-Association-of-Farmers-Presents-Interactive-Sustainable-Farming-Initiative/pull/13

raunak2007 commented 3 months ago

this is the code more related to accessing the cookie as mort requested:

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

@PostMapping("/getCash")
public ResponseEntity<Object> getCash(HttpServletRequest request) {

    Cookie[] cookies = request.getCookies();
    String email = null;
    if (cookies != null) {
        for (Cookie cookie : cookies) {
            if (cookie.getName().equals("email")) {
                email = cookie.getValue();
                break;
            }
        }
    }

    if (email == null) {
        return new ResponseEntity<>("Cookie 'email' not found", HttpStatus.BAD_REQUEST);
    }   

    Person player = personDetailsService.getByEmail(email);

    if (player == null) {
        return new ResponseEntity<>("Person not found", HttpStatus.NOT_FOUND);
    }

    int cash = player.getCash();

    return new ResponseEntity<>(cash, HttpStatus.OK);
}