Search:

Type: Posts; User: Hughes

Search: Search took 0.14 seconds.

  1. Replies
    21
    Views
    518

    Re: isValidMove Method

    How do I now make it so that I can click on a second button and store its values without storing the values of the first button again.
  2. Replies
    21
    Views
    518

    Re: isValidMove Method

    I just need the values of row and col at board[row][col] so move.fromRow = row and move.fromColumn= col. Then I need to be able to click a second button so at board[row][col] move.toRow = row and...
  3. Replies
    21
    Views
    518

    Re: isValidMove Method

    I need to be able to click a first button then a second to move the chess piece. I need to call the isvaildmove and move method from my Model. I don't it will be necessary to disable the button since...
  4. Replies
    21
    Views
    518

    Re: isValidMove Method

    Can some one help me find a way so that when i click on a button is marks that as clicked so i can click on another button and move the piece.

    public class ButtonListener implements ActionListener...
  5. Replies
    21
    Views
    518

    Re: isValidMove Method

    Did I use it right?

    public class Pawn extends ChessPiece {
    private Player player;
    private boolean firstmove;

    protected Pawn(Player player) {
    super(player);
    boolean firstmove = true;
  6. Replies
    21
    Views
    518

    Re: isValidMove Method

    ok I have no questions for now, but i might later. Thanks for the help.
  7. Replies
    21
    Views
    518

    Re: isValidMove Method

    This is what i have done so far. Going to have to make some more changes.


    public boolean isValidMove(Move move, IChessPiece[][] board) {
    if (super.isValidMove(move, board) == false) {...
  8. Replies
    21
    Views
    518

    Re: isValidMove Method

    I need to make sure a movement with the pawn is valid. So if I do something like if(move.toRow == move.fromRow){
    return false;
    }
    So how do I only allow the pawn to move 1 spot forward and not...
  9. Replies
    21
    Views
    518

    Re: isValidMove Method

    How do I actually code the move using this method public boolean isValidMove(Move move, IChessPiece[][] board){
    }
  10. Replies
    21
    Views
    518

    Re: isValidMove Method

    Yes that is what I am asking.
  11. Replies
    21
    Views
    518

    isValidMove Method

    I need help with the isValidMove Method for my pawn piece. How do I code pawns first move of 2 squares then 1 sqaure after that .


    /**
    * A player of a chess game.
    *
    * @author Zachary Kurmas...
Results 1 to 11 of 11