Click here to Skip to main content
15,896,557 members
Articles / Mobile Apps / Android

Android Puzzles Solver

Rate me:
Please Sign up or sign in to vote.
4.87/5 (17 votes)
1 Oct 2012Apache13 min read 102.9K   7.1K   77  
Puzzles Solver is an Android application for playing and solving puzzles.
package gr.sullenart.games.puzzles.gameengine.solo;

import java.util.ArrayList;
import java.util.List;

public class SoloBoardPosition {

	private List<List<Integer>> neighbors;

	private List<int []> diagonalNeighbors;

	private int position = 0;

	private int distance = 0;

	private int cornerDistance = 0;

	private int mobility = 0;

	public List<List<Integer>> getNeighbors() {
		return neighbors;
	}

	public List<int []> getDiagonalNeighbors() {
		return diagonalNeighbors;
	}

	public int getPosition() {
		return position;
	}

	public int getDistance() {
		return distance;
	}

	public void setDistance(int distance) {
		this.distance = distance;
	}

	public int getCornerDistance() {
		return cornerDistance;
	}

	public void setCornerDistance(int cornerDistance) {
		this.cornerDistance = cornerDistance;
	}

	public int getMobility() {
		return mobility;
	}

	public void setMobility(int mobility) {
		this.mobility = mobility;
	}

	public void incrementMobility() {
		mobility++;
	}

	public SoloBoardPosition(int position) {
		this.position = position;

		neighbors = new ArrayList<List<Integer>>();
		neighbors.add(new ArrayList<Integer>());
		neighbors.add(new ArrayList<Integer>());
		neighbors.add(new ArrayList<Integer>());
		neighbors.add(new ArrayList<Integer>());

		diagonalNeighbors = new ArrayList<int []>();
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Software Developer (Senior) Self employed
Greece Greece
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions