Search:

Type: Posts; User: thatguy

Search: Search took 0.10 seconds.

  1. [SOLVED] Re: Tile puzzle game getting tiles to move (help)

    I think i do,
    but what i posted before does what you have asked I believe.

    1 2 3 4
    5 6 7 8
    9 10 11 #
    13 14 15 12
    Enter a number: 12

    The user enter the number 12. so the if statement should...
  2. [SOLVED] Re: Tile puzzle game getting tiles to move (help)

    public void move(int tileNumber) {
    if (!isValid(tileNumber)) {
    return;
    }

    for (int r = 0; r < boardSize; r++) {
    for (int c = 0; c < boardSize;...
  3. [SOLVED] Re: Tile puzzle game getting tiles to move (help)

    Here an example

    you enter in 12 and the move method will switch the 12 with the empty space like so.

    1 2 3 4
    5 6 7 8
    9 10 11 #
    13 14 15 12

    but if you enter 12 again it i will not...
  4. [SOLVED] Tile puzzle game getting tiles to move (help)

    I am building a class called TilePuzzle and it is a text base game and it looks like this.

    1 2 3 4
    5 6 7 8
    9 10 11 12
    13 14 15 #

    The way I programmed the move method it looks...
Results 1 to 4 of 4