Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Generating three random booleans on: 2013-04-11 05:01:15
Thank you guys so much for the help I got it working
2  Game Development / Newbie & Debugging Questions / Generating three random booleans on: 2013-04-11 00:27:39
Hello everyone,

So i am working on a simple game to play in the java console where you can choose between three cups This is my first program ive written myself. the only problem I am having is making sure two of the cups return false while one is true. Some ideas would be greatly appreciated ballIncup() assigns a true or false variable but it keep returning true when I test it out.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
import java.util.Random;
import java.util.Scanner;

public class pickAcup {
   static Scanner input = new Scanner(System.in);
   static Random ball = new Random();
   static String name;
   static int turn = 1;
   static boolean cup1, cup2, cup3 = false;
   static String choice;
   
   public static void main(String[] args){
      intro();
      ballIncup();
      playerChoice();
   
   }
   
    public static void intro(){
      // Introduction Takes in player name and welcomes them to the game
     System.out.println("Welcome to pick a cup please enter your name");
      name= input.nextLine();
      System.out.println("Hello " + name);
     
   }

    public static void ballIncup(){
       cup1 = ball.nextBoolean();
       cup2 = ball.nextBoolean();
       cup3 = ball.nextBoolean();
       if(cup1 == false && cup2 == false){
          cup3 = true;
       }else if(cup1 == false && cup3 == false){
          cup2 = true;
       }else if(cup2 == false && cup3 == false){
          cup1 = true;
       }
    }
   
    public static void playerChoice(){
       System.out.println("Please pick cup 1, cup 2, or cup 3" + name);
       choice = input.nextLine();
       if(choice.equals("cup 1")){
          if(cup1 = true){
             System.out.println("You win!");
          }else if(cup1 = false){
             System.out.println("Please pick again");
          }
         
       }
    }
}
3  Game Development / Newbie & Debugging Questions / Re: A good resource for anyone, first post introduction on: 2013-04-11 00:22:47
Haha I don't know if this is a normal thing but Im already having dreams about code :p
4  Game Development / Newbie & Debugging Questions / Re: A good resource for anyone, first post introduction on: 2013-04-10 22:03:01
I wanna thank you, I just started writing code, now I feel like i am  learning something and actually retaining what I learn.
5  Game Development / Newbie & Debugging Questions / Re: A good resource for anyone, first post introduction on: 2013-04-10 17:09:42
Thanks everyone for the response and welcome. I took everyone advice I went to the library yesterday the books on java they had were really out dated and I felt bored just looking at them lol. Thank god for the internet. Right now I feel like I have a hang of most the concepts so I am going to just start writing some simple programs today and learn as a I go.

First program I am going to write is the gold ol' ball in cup game where the user picks which cup has the ball in. I look forward to being part of this community thanks everyone for the warm welcome and words of encouragement.

More really basic ideas would be greatly appreciated just some simple console games. I wanna jump right into 2d but I know that's like jumping in the ocean before learning to swim.
6  Game Development / Newbie & Debugging Questions / A good resource for anyone, first post introduction on: 2013-04-08 20:49:15
Hello every one,

I am new to the forum and new to programming and java all together. Game development has always been a childhood dream of mine. I have been jumping around languages trying to find one that will fit me best for my endeavors, and have decided to finally go with java. I I wanted to share a resource that is good for any developer. I did a brief search on the forum and didn't really see it mentioned anywhere so I decided I would go ahead a share it.

http://it-ebooks.info/

I have found lots of good books on here covering pretty much everything you can think of.

This is my first post so ill give a little bit of introduction about myself and where I am at as a developer.

As a said earlier Game development has always been a dream of mine. I am 22 now and have been kinda directionless with my life up until the last couple years. I have decided I finally wanna go after that dream I had as a child. I was reading a book last night about living your dreams and I don't want to be that person latter in their life regretting not doing something they always wanted to do.

When I was younger I spend most my days making maps and skins for counter strike and counter strike source. I loved nothing more then seeing my thoughts come to life and become a virtual playground for others. I wanna get back to that point.

Now here is where I am at with my programming skills. I feel as if I have the basic grasp on programming I can look at some basic code and understand what is going on with the While loops, main game loops, functions, arrays but I lack the competence to put my thoughts into actions. I feel like i am right their on the edge where everything is about to start clicking into place. If anyone experienced this point of where I am what did you do to get yourself over the edge of following tutorials to writing some of or first programs and what where they?
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (37 views)
2014-07-18 06:55:21

Zero Volt (35 views)
2014-07-17 23:47:54

danieldean (28 views)
2014-07-17 23:41:23

MustardPeter (31 views)
2014-07-16 23:30:00

Cero (46 views)
2014-07-16 00:42:17

Riven (47 views)
2014-07-14 18:02:53

OpenGLShaders (36 views)
2014-07-14 16:23:47

Riven (36 views)
2014-07-14 11:51:35

quew8 (32 views)
2014-07-13 13:57:52

SHC (69 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!