private void checkCollisions() 
	{
		for (int x = 0; x < players.size(); x++) 
		{
			TronPlayer temp = players.get(x);
			if (temp.visible) 
			{
				if (!field.intersects(temp.getBounds())) 
				{
					players.get(x).setVisible(false);
					dead.add(temp.getColor());
				}
				for (int y = 0; y < trails.size(); y++) 
				{
					ArrayList<TronTrail> singletrail = trails.get(y);
					for (int z = 0; z < singletrail.size() - 2; z++) 
					{
						if (temp.getBounds().intersects(singletrail.get(z).getBounds())) 
						{
							players.get(x).setVisible(false);
							dead.add(temp.getColor());
							z = singletrail.size();
						}
					}
				}
				for (int y = 0; y < x; y++) 
				{
					if (temp.getBounds().intersects(players.get(y).getBounds()) && players.get(y).visible) 
					{
						dead.add(temp.getColor());
						dead.add(players.get(y).getColor());
						players.get(x).setVisible(false);
						players.get(y).setVisible(false);
					}
				}
			}
		}
	}