User Profile

Collapse

Profile Sidebar

Collapse
mathgeek314
mathgeek314
Last Activity: Jul 24 '12, 04:02 PM
Joined: Jun 2 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mathgeek314
    started a topic Saving and Loading Issues
    in Java

    Saving and Loading Issues

    Okay, so I have two methods, one to save selected arrow keys to a text file, and the other to load them as integers. Here's the first:

    Code:
    public void saveKeys()
    {
       String out = Integer.toString(left)+"\n"+Integer.toString(right)+"\n"+Integer.toString(up)+"\n"+Integer.toString(down)+"\n";
       try
       {
          PrintWriter save = new PrintWriter("key_selection.txt",out);
    ...
    See more | Go to post

  • The only place where division occurs is in line 23, and the only way you can divide by zero is if there is no difference between cy and ey, meaning the shape is a line, which I would not do within the parameters of this program. Although perhaps your confusion is related to that fact that I somehow forgot a certain line of code:

    Code:
    Obstacle o = new Obstacle(1,10,10,10,20,5);
    Or maybe it's just because l and 1 look a bit...
    See more | Go to post

    Leave a comment:


  • mathgeek314
    started a topic Why won't my doubles hold their decimals?
    in Java

    Why won't my doubles hold their decimals?

    I am trying to write a program to create boundaries for a polygon on a two-dimensional coordinate plane. Here is my code:

    Code:
    public class Example {
    public Example()
        {
            for (int y = 0; y < game1.o.l; y++)
            {
                System.out.println("( "+game1.o.bind[0][y]+", "+game1.o.bind[1][y]+" ) -> ( "+game1.o.bind[2][y]+", "+game1.o.bind[3][y]+"
    ...
    See more | Go to post
No activity results to display
Show More
Working...