Complete dict assignment

This commit is contained in:
2024-04-18 00:53:15 +02:00
parent 3636335b63
commit 6aca1126a1

View File

@@ -21,15 +21,10 @@ for color in Color:
'''
newX, newY = {
Color.RED: 2 * x, 2 * y,
Color.GREEN_RIGHT: 2 * x, 2 * y,
Color.GREEN_BOTTOM: 2 * x, 2 * y,
Color.BLUE: 2 * x, 2 * y,
Color.GREEN_RIGHT: 2 * (x - 1), 2 * y,
Color.GREEN_BOTTOM: 2 * x, 2 * (y - 1),
Color.BLUE: 2 * (x - 1), 2 * (y - 1),
}[color]
match color:
case Color.RED:
newX, newY = 2 * x, 2 * y
case Color.GREEN_RIGHT:
newX, newY = 2 *
multipleColorsImage.putpixel((x, y), pixel)