Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6822133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:37:38+00:00 2026-05-26T21:37:38+00:00

I am kind of new to java, and I am making a MAbovePixel Generator.

  • 0

I am kind of new to java, and I am making a MAbovePixel Generator. Right now my idea is that the very top pixels, and the very right pixels are blue, from then on the generator has a chance of making yellow(sand), then from there, ground, and grass.

So far, I have the ‘generator’ check the pixel above it, and the left of it. Depending on what color the pixel is, the current pixel has a chance of being one of the pixels next to it.

          if (LeftPixel == 0xFF0000FF) OceanChance = OceanChance + 5;
          if (AbovePixel == 0xFF0000FF) OceanChance = OceanChance + 5;
          if (LeftPixel == 0xFFEDC9AF) SandChance = SandChance + 5;
          if (AbovePixel == 0xFFEDC9AF) SandChance = SandChance + 5;
          if (LeftPixel == 0xFF733D1A) GroundChance = GroundChance + 5;
          if (AbovePixel == 0xFF733D1A) GroundChance = GroundChance + 5;
          if (LeftPixel == 0xFF698B22) GrassChance = GrassChance + 5;
          if (AbovePixel == 0xFF698B22) GrassChance = GrassChance + 5;

At this point, I am unsure what to do next.
I have the list, but how do I check whats largest in Java?

How do I compare all the ints in the list, and depending on whats largest, do whatever.
Or if theres a tie, randomly select a int to use anyway from a list of ties.

I did search on the internet “Java compare multiple integers”, but it didn’t come up with anything I could understand, so maybe theres a name for what im trying to do that I don’t know about?

In any case, what is the best thing to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:37:39+00:00Added an answer on May 26, 2026 at 9:37 pm

    So you have 4 Chance integers and you need to find the largest? If so put them in a sorted list TreeSet and get the last element in the list

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm finding this kind of overriding after a new in java code very often
I'm kind of new to lisp, and after coming from languages like C, Java,
I am kind of new to C (I have prior Java, C#, and some
i'm kind of new to java. I use eclipse and i imported some jar
I'm kind of new in web development with Java. I am developing a web
In last few months I have been making a transition from Java to Groovy
We have a one Java Swing app. Now there is one requirement that it
Put another way, you create a new kind of object by making a package
Okey so, im kind of new to JBoss. My problem is that i dont
I'm soon going to check in the very first commit of a new Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.