Android Open Source - donatello-y-raphael Coordinate






From Project

Back to project page donatello-y-raphael.

License

The source code is released under:

MIT License

If you think the Android project donatello-y-raphael listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.ATracePath;
//ww  w  .j  a v a 2s.  co m
import android.graphics.Color;

/**
 * Created by yngvi on 5.9.2014.
 */
public class Coordinate {

    private int m_col;
    private int m_row;
    private int color;

    Coordinate( int col, int row, int color ) {
        m_col = col;
        m_row = row;
        this.color = color;
    }

    public int getCol() {
        return m_col;
    }

    public int getRow() {
        return m_row;
    }

    public int getColor() { return color; }

    @Override
    public boolean equals( Object other ) {
        if ( !(other instanceof Coordinate) ) {
            return false;
        }
        Coordinate otherCo = (Coordinate) other;
        return otherCo.getCol() == this.getCol() && otherCo.getRow() == this.getRow() && this.getColor() == otherCo.getColor();
    }

    public boolean compareTo(Coordinate other) {
        return this.getCol() == other.getCol() && this.getRow() == other.getRow();
    }

    @Override
    public String toString() {
        return this.getColor() + "   " + this.getCol() + "," + this.getRow();
    }
}




Java Source Code List

com.example.ATracePath.Board.java
com.example.ATracePath.Cellpath.java
com.example.ATracePath.Challenge.java
com.example.ATracePath.Coordinate.java
com.example.ATracePath.DbHelper.java
com.example.ATracePath.Global.java
com.example.ATracePath.LevelsActivity.java
com.example.ATracePath.MainActivity.java
com.example.ATracePath.MapsActivity.java
com.example.ATracePath.Pack.java
com.example.ATracePath.PlayActivity.java
com.example.ATracePath.ProgressAdapter.java
com.example.ATracePath.Puzzle.java
com.example.ATracePath.SettingsActivity.java