### Question:
TileGame implements Tile { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + number; result = prime * result + tx; result = prime * result + ty; return result; } TileGame(int number, int tx, int ty, int width, int height); void set(int number); void setSheet(int sheetId); @Override int getNumber(); @Override Integer getKey(); @Override int getSheet(); @Override Integer getSheetKey(); @Override int getInTileX(); @Override int getInTileY(); @Override int getInTileWidth(); @Override int getInTileHeight(); @Override int getWidth(); @Override int getHeight(); @Override double getX(); @Override double getY(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }### Answer:
@Test void testHashCode() { final TileGame tile = new TileGame(1, 16, 25, 4, 5); assertHashEquals(tile, tile); assertHashEquals(tile, new TileGame(1, 16, 25, 4, 5)); assertHashEquals(tile, new TileGame(1, 16, 25, 10, 5)); assertHashEquals(tile, new TileGame(1, 16, 25, 4, 10)); assertHashNotEquals(tile, new Object()); assertHashNotEquals(tile, new TileGame(0, 16, 25, 4, 5)); assertHashNotEquals(tile, new TileGame(1, 0, 25, 4, 5)); assertHashNotEquals(tile, new TileGame(1, 16, 0, 4, 5)); }