1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Pathfinding Robot

Discussion in 'Java' started by Accendo, Jan 18, 2011.

  1. Accendo

    Accendo New Member

    Hey there go4expert!

    I have been given a piece of coursework and before I go wandering off on my own and messing things up I figured I should best start with a forum of experts.

    • The requirements for the program are to have a "Robot" that moves from one location to another read in from a file, on a 20x20 grid.
    • It can only move forward and turn to look in the directions of NORTH, EAST, SOUTH, WEST.
    • There are also landmarks stored in another file, record the ones I pass over
    • Then print out how far the robot moved.

    Upgrades (Not necessary for a pass)
    • Graphics using swing.
    • Being able to rotate in any direction of 360 degrees.
    • Still print out how far the robot moved but now it's not as simple as I'd need to use trig. now.

    I am a big newbie to programming as a whole, only the basic things I have done through uni I know and I would like any input you guys could give me on how best to start this bad boy of an assignment.

    Kind regards,
  2. virxen

    virxen New Member

    a schema to start
    1) you need code to read from a file
    2)create an 2d array 20x20 of integers make all elements -1;
    3)create a class Landmarks
    4)create an ArrayList of Landmarks objects filled from the data of the file with the
    5)add landmarks into the grid (store position inside the arrayList into the 20x20 grid)

    p.s. if you have any of the files mentioned, post it to see its structure

    post your code to help you more.

    useful links
    Last edited: Jan 21, 2011
  3. Accendo

    Accendo New Member

    Hey there I got to work promptly after this message and am now a little further on and it's scary how similiar what you said is to what I already had :D.

    Please look out for my posts encase I get stuck :p.


Share This Page