java爱心代码-爱代码爱编程
public class loveme {
private static final HashMap<Integer,String> colorMap = new HashMap<>(){{
put(36,"qingse");
}};
public static String getColor(int color, String con){
return String.format("\33[1m\33[36m",6);
}
public static void main(String[] args) throws InterruptedException {
int in=0;
for(float y=2.5f; y>-2.0f;y-=0.12f) {
for (float x = -2.3f; x < 2.3f; x += 0.041f) {
float a = x * x + y * y - 4f;
if ((a * a * a - x * x * y * y * y) < -0.0f) {
String str = "I LOVE YOU ";
int num = in % str.length();
System.err.print(str.charAt(num));
in++;
} else {
System.err.print(" ");
}
}
System.err.println();
Thread.sleep(100);
}
System.out.println(getColor(6, colorMap.get(36)));
System.out.println("你像火柴一般在夜空划过");
System.out.println("刹那的烟火映照整个银河");
System.out.println("你是烟火,我是泡沫、");
}
}
java爱心代码,我觉得这可以了,基础是套壳来的,做了一点修改。
效果图