Search:

Type: Posts; User: corong1997

Search: Search took 0.08 seconds.

  1. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    Okay it worked! Thank you!
  2. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    Oh right, so the location isn't updating. I'm not sure how to get the location to update though, any ideas?
  3. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    Once the Pawn moves to (4,4), the next valid move should be (3,4). It goes (rows, columns), so it's (y,x), and it starts from (0,0) in the top left corner
  4. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    First call of getMoveLocations(), nothing moved
    locX = 6
    locY = 4
    l1 = (5, 4)
    l2 = (4, 4)
    getGrid().getValid(l1) returns true
    Moves = [(5, 4)]
    getGrid().isValid(l2) returns true
    After...
  5. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    locX = 6
    locY = 4
    l1 = (5, 4)
    l2 = (4, 4)
    locX = 6
    locY = 4
    l1 = (5, 4)
    l2 = (4, 4)
    locX = 6
    locY = 4
  6. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    This is the board2980
    I have moved the pawn to E4 (4,4)2981
    Now, the only move option it is giving me is one space back (5,4)2982
    I move it to that spot2983
    Now it just brings up an empty...
  7. Replies
    15
    Views
    884

    Re: Gridworld Chess Pawn not working

    l1 and l2 are variables for two different locations

    --- Update ---

    And yes I tried debugging it, but the code keeps pulling up logic errors I have no idea how to deal with
  8. Replies
    15
    Views
    884

    Gridworld Chess Pawn not working

    I am making a chess game in Gridworld. My pawn method is not working. For example, when I use getMoveLocations() on a pawn the first time, it brings up both valid moves. Once I move it two spaces and...
  9. Replies
    3
    Views
    870

    Re: Need help with Gridworld

    public ArrayList<Location> getAttackLocations()
    {
    ArrayList<Location> moves = new ArrayList<Location>();
    ArrayList<Location> possibleMoves = new ArrayList<Location>();
    ...
  10. Replies
    3
    Views
    870

    Need help with Gridworld

    I'm writing a Chess program in Gridworld, and I'm running into a bit of a problem coming up with a line of code that checks if a location is occupied or not. Right now, I am using ...
Results 1 to 10 of 10