我试图使用超级构造函数和三元运算符将以下代码转换为一行代码。尝试过多种东西但没有任何效果。
if (c == 0) { super(Piece.JMAN, x, y, Color.red); } else if (c == 1) { super(Piece.JMAN, x, y, Color.green); } else { super(Piece.JMAN, x, y, Color.yellow); }